Select & context menu improvements
See original GitHub issue- options are currently specified as
{ value: string, option?: string }
. Actually, options are treated in the code as always specified, and there are runtime errors when they are omitted. - we should consider removing options altogether, and have the component simply take a list of strings. This would make the component much easier to use, and leave the minimal responsibility of mapping the labels to raw values to the library user. If need be, they can produce a wrapper that restores the current API with very minimal code.
- a redesign to match
DatePicker
is in order, adding a minimum width to look good. - when the values pop up, their design should match
ContextMenu
. - redesign the label to be consistent with input and date picker.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Explorer Context Menu Enhancements - WinZip
Using the context menu To use the context menu, simply right click on a file or folder in the Windows File Explorer. WinZip...
Read more >CONCEPT: Improving Edge's context / right click menu
My new context menu proposes two major improvements. First, the menu cuts down on bulky elements by using the address bar versions of...
Read more >Extending the Context Menu and Share Dialog in Windows 11
Windows 11 brings refinement to contextual file operations in the right-click context menu and share dialog. These are extensible by apps, ...
Read more >Microsoft is Improving the Right-Click Menus in Windows 11
One of those improvements involves cleaning up the context menus, ... The new right-click context menu showing commands in windows 11.
Read more >Windows 11's classic context menu is finally getting a better ...
Microsoft is testing the improved classic right-click menu in the Dev Channel of the Insider Program and it will eventually get better.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I favor number 1 because it seems like better design and will provide two very well thought through, robust components to serve both purposes of
Select
andContextMenu
.I favor number 2 because it delegates the power to
ContextMenu
, while allowing for something simpler if needed.I favor both approaches and your engineering skills and literally cannot decide. Sorry I’m not much help, but if it was up to me, I’d say do whatever seems best to you.
¯\_(ツ)_/¯
Maybe it’s helpful to write it out a bit better how you would use the new API in the mindset of the old one:
Select is easier to use now (
<Select options={["apples", "other fruit"]} />
just works), the<option>
tag still gets a semantic value, and you can map things back quickly.