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

Menu: adopt open/opener properties of the ResponsivePopover #5095

Closed
1 of 4 tasks
ilhan007 opened this issue Apr 19, 2022 · 12 comments · Fixed by #5984
Closed
1 of 4 tasks

Menu: adopt open/opener properties of the ResponsivePopover #5095

ilhan007 opened this issue Apr 19, 2022 · 12 comments · Fixed by #5984

Comments

@ilhan007
Copy link
Member

ilhan007 commented Apr 19, 2022

Feature Request Description

The Menu component has ben recently developed and it provides "showAt" method in order to open up.
However, since 1.2.0 we provide declarative API in the Popover, Dialog web components - properties open and opener, that define the open/close state. And, if possible we need to stick to this concept for all components that open/close popups.

Proposed Solution

Currently the Menu has showAt method, which calls the ResponsivePopover's showAt method.
This should continue working as it is. And in addition we need to the same with declarative API.
The Menu component have to introduce two new properties open and opener that need to be forwarded and set to the internally used ResponsivePopover.

Priority

  • Low
  • Medium
  • High
  • Very High

Stakeholder Info (if applicable)

  • Organization: {...}
  • Business impact: {...}
@ilhan007
Copy link
Member Author

FYI @SAP/ui5-webcomponents-topic-b

@scameron
Copy link
Contributor

Hello,

As described in issue #5653, we're looking for a way to keep have our menu button appear as "pressed" while the menu is open. @ilhan007 suggested a way to accomplish this that sounds promising:

I guess if you use a ToggleButton and manually switch its "pressed" state based on the Menu's state, you will get that behavior - a button that is toggled when the menu is open and а button in default state when closed.

However, to realize this, we need some way to detect whether the Menu is open or closed. We also need some event to know when the Menu closes.

This feature request sounds like what we would need to implement this. The description does not say anything about surfacing the before-open, before-close, after-open, after-close events up to Menu, but hopefully those will come along with the proposed open/opener properties.

Would it be possible to consider implementing this in the relatively short term? It sounds like our UX team will not let us release without this behavious in place...

@ilhan007
Copy link
Member Author

ilhan007 commented Sep 19, 2022

To make sure this reaches you, I am writing this FYI @petyabegovska @SAP/ui5-webcomponents-topic-b - there was an update to an old feature request, described by @scameron above.

@vishnuvardhan-s
Copy link

Hello,

We have one more use case where we need the event listeners that @scameron mentioned. (before-open, before-close, after-open, after-close) for the Menu component.

We have to dispatch some actions when the Menu item is opened and few more actions when it is getting closed. Please let me know if there is any update for this feature.

Thank you,
Vishnu.

CC: @petyabegovska

@NHristov-sap
Copy link
Contributor

Hi @vishnuvardhan-s ,

The mentioned events are also included in the PR regarding open/opener: #5984

Hope this is what you need.

BR,
Nikolay

@vishnuvardhan-s
Copy link

Hi @NHristov-sap

Yes, this is what I need. Thank you so much for the information.

@petyabegovska
Copy link
Collaborator

Hello,

Feature is implemented with the PR above.

There are new properties defined: opener and open, and by setting them the menu can be opened and closed declaratively.

Also there are new events provided: before-open (can be prevented), after-open, before-close (can be prevented) and after-close that are fired on opening and closing of the menu.

Best regards,
Petya

@vishnuvardhan-s
Copy link

Hi @petyabegovska

In which version of ui5-webcomponents-react, can we consume this implementation?

CC: @scameron

Thanks,
Vishnu.

@petyabegovska
Copy link
Collaborator

Hello @MarcusNotheis , @Lukas742,

Can you answer?

Thanks and Best regards,
Petya

@Lukas742
Copy link
Collaborator

This is not released yet, right?
As usual, we update @ui5/webcomponents-react as soon as a new version of @ui5/webcomponents is available. (Normally we need max. two working days for the update).

@petyabegovska
Copy link
Collaborator

Right, it will be part of 1.10.0, which should be released in the end of November.

@vishnuvardhan-s
Copy link

Thanks for the update 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

6 participants