-
Notifications
You must be signed in to change notification settings - Fork 29
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
New: Add option to make entire menu items clickable (fixes #157) #188
+45
−4
Closed
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e794c5b
Add _areEntireItemsClickable option, update documentation
swashbuck 732e195
Update schemas
swashbuck 426b8c1
Optimizations to className() and events()
swashbuck 372f4e1
Refactor className() using an array
swashbuck 0dee1c9
Update attributes() to simplify getting parent attributes
swashbuck a4fa56d
Move click event to boxmenu-item__inner instead of boxmenu-item
swashbuck 2c85651
Make areEntireItemsClickable a getter function
swashbuck 8410ee8
Refactor attributes()
swashbuck 7ccc459
Update itemCount in attributes()
swashbuck be16139
Move aria labels to .boxmenu-item__inner
swashbuck ad3f8c4
Move aria-label to new element
swashbuck 01bcaee
Fix typo
swashbuck 230d46a
Fix missing closing if
swashbuck f806326
Update README.md
oliverfoster df96e26
Make boxmenu-item__inner focusable by adding tabindex attribute
swashbuck 0310042
Add keydown event for keyboard navigation
swashbuck 14979b3
Move preventDefault
swashbuck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like this setting name. I have feelsies it should be something like
"_useTilesNotButtons"
or"_useTiles"
but I can't quite put my finger on it. I don't suppose it matters that much.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm not committed to this setting name. Could even be as simple as
_hideItemButtons
or_hasItemButtons
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used
_boxMenuItemIsClickable
when doing similar on projects.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kirsty-hames @oliverfoster I like
_boxMenuItemIsClickable
. Shall I change it to that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No other property in box menu is prefixed with
_boxMenu
.Summary:
The behaviour hides the button and makes the item clickable. It is a layout alteration. The proposed names so far only describe either removing the button or making the item clickable, not both, which is more important? Is there another concept that encapsulates both changes? We haven't provided a rationale as to why one would enable/disable this property and choose the layout change.
Suggestion:
_isItemClickable
perhaps? To keep it simple.