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

MenuItem: Disable on click #6847

Open
17 tasks
yuriy-fix opened this issue Oct 8, 2024 · 0 comments
Open
17 tasks

MenuItem: Disable on click #6847

yuriy-fix opened this issue Oct 8, 2024 · 0 comments
Labels
acceptance criteria used for the acceptance criteria checklist draft The acceptance criteria that is still WIP

Comments

@yuriy-fix
Copy link
Contributor

Description

Enable developers to use the setDisableOnClick(boolean) method on MenuItems, similar to the existing API on buttons. This feature will prevent multiple triggering of heavy-running code associated with MenuItems when clicked, ensuring that MenuItems are disabled on click and can only be re-enabled from the server side.

Use cases

As a developer
I want to set the MenuItem to disable on click using setDisableOnClick(boolean)
So that I can prevent the user from repeatedly triggering heavy processes and improve the performance and user experience of the application

As an end user
I want to have the MenuItem disabled after I click it once
So that I can avoid accidentally triggering multiple instances of a resource-intensive process

Acceptance criteria

  • The setDisableOnClick(boolean) method is available for MenuItems.
  • MenuItems with setDisableOnClick(true) are disabled immediately after being clicked, including both top-level and dropdown items.
  • MenuItems are only re-enabled from the server, similar to buttons with the setDisableOnClick feature.
  • Clicking a disabled MenuItem (whether top-level or dropdown) does not trigger any additional actions.
  • setDisableOnClick(true) does not affect MenuItems with submenus (applicable also when Open on Hover is enabled).
    • This behavior should be documented
  • Toggling items respect setDisableOnClick(true), disabling after toggling and preventing further actions until re-enabled.
  • The client-side state of the MenuItem is correctly updated with setEnabled(boolean), ensuring proper handling of changes during the same round trip.
  • Re-attaching a MenuItem with setDisableOnClick(true) retains the disableOnClick behavior correctly.

General criteria

  • APIs reviewed
  • Design
  • Performance
  • UX/DX tests in Alpha
  • Documentation:
  • How to test?
  • Limitations:

Security

  • Security implications have been taken into account (elaborate or link to product security requirement specification if there are implications)
@yuriy-fix yuriy-fix added acceptance criteria used for the acceptance criteria checklist draft The acceptance criteria that is still WIP labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance criteria used for the acceptance criteria checklist draft The acceptance criteria that is still WIP
Projects
None yet
Development

No branches or pull requests

1 participant