Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalise what can appear as field-grid-dropdown items #2482

Open
1 task done
microbit-matt-hillsdon opened this issue Jan 30, 2025 · 0 comments
Open
1 task done
Assignees
Labels
type: feature request New feature or request

Comments

@microbit-matt-hillsdon
Copy link

Check for duplicates

  • I have searched for similar issues before opening a new one.

Component

field-grid-dropdown

Problem

MakeCode has a variety of grid-like dropdowns that have items that don't match what's possible with field-grid-dropdown. We're exploring whether it makes sense to switch (see microsoft/pxt-microbit#6077).

One scenario is text + images such like this:

Image

There are other uses of text + images where the styling and approach to item sizing doesn't match field-grid-dropdown. It might be possible to address those in subclasses.

Request

We'd like to explore whether it makes sense to:

  • add specific support for image + text to this plugin so we can adopt it in MakeCode (in this case we'd need to review further to be sure there were no other problematic cases)
  • alternatively, generalise this further so that the dropdown items can be supplied as DOM elements (or functions returning DOM?). It's not clear to me whether this is practical but it might be better than trying to anticipate all ways clients need to lay out an item. Would this be possible?

Alternatives considered

Without this we'd probably need to add more keyboard navigation to MakeCode rather than leveraging common code that can work across projects. See also #2481.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
Status: Needs Discussion
Development

No branches or pull requests

3 participants