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

CAP: Add buttonsetAPI to dialog #1101

Closed
whernebrink opened this issue Aug 10, 2021 · 8 comments · Fixed by #1133
Closed

CAP: Add buttonsetAPI to dialog #1101

whernebrink opened this issue Aug 10, 2021 · 8 comments · Fixed by #1133
Assignees
Labels
team: m3 Issues for m3 type: enhancement ✨ [5] Velocity rating (Fibonacci)

Comments

@whernebrink
Copy link
Collaborator

whernebrink commented Aug 10, 2021

Is your feature request related to a problem? Please describe.
Missing buttonsetAPI for CAP dialog (should have it just like standard dialog).

Describe the solution you'd like
I want the buttonsetAPI to be available for CAP dialog, i.e. added to the enterprise project (don't think it is), and typings added to this enterprise-ng project.

Additional context
This issue/feature request was mentioned in #1048 but was not addressed. We need this for new UI of M3 where we heavily rely on the CAP dialog, and need to be able to disable dialog buttons when forms are not valid etc.

We will need these types in Angular as well

@tmcconechy tmcconechy added [5] Velocity rating (Fibonacci) type: enhancement ✨ labels Aug 10, 2021
@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Aug 10, 2021
@tmcconechy tmcconechy added the team: m3 Issues for m3 label Aug 10, 2021
@tmcconechy
Copy link
Member

I dont know how tricky this is going to be as the buttonsetAPI is for the modal and the CAP has a toolbar. So maybe its something else. Will have to look

@whernebrink
Copy link
Collaborator Author

@tmcconechy, alright, didn't know that. Basically, I think we just need a way (API) to enable/disable the buttons, users should not be able to press save when a form is invalid etc. Preventing the dialog from closing we can do in the newly added/exposed beforeClose (previously lacking from CAP) I assume.

@whernebrink
Copy link
Collaborator Author

If this is to any help, this is what one would have to do today:
image

@tmcconechy
Copy link
Member

That doesn't seem too bad maybe we can just map this to one thing (buttonSetAPI)

@whernebrink
Copy link
Collaborator Author

Although, not sure if there can be other elements in the toolbar? Will it always be buttons? Searchfields? Also, if there will be a map to buttonsetAPI, just make sure the name is buttonsetAPI, not camelCase. :)
image

@tmcconechy tmcconechy changed the title Add buttonsetAPI to CAP dialog CAP: Add buttonsetAPI to dialog Aug 27, 2021
@whernebrink
Copy link
Collaborator Author

There is an example with dropdown and searchfield, would be nice to know how this is incorporated in the buttonsetAPI etc (how do disable a option in dropdown based on something etc).

image

@tmcconechy
Copy link
Member

Its possible without angular (or maybe this is a usable way as well) if you make the toolbar use all HTML like this example https://github.com/infor-design/enterprise/blob/main/app/views/components/contextualactionpanel/test-complex-toolbar.html#L14 and dont use the button setting https://main-enterprise.demo.design.infor.com/components/contextualactionpanel/test-complex-toolbar.html (use flex toolbar instead tho).

There is no way to do it in angular with the button settings. I would make a new feature request and we could add the ability to set the button type to menubutton and the ability to reference a menuID to use if the other suggestion doesnt work.

@CindyMercadoReyes
Copy link

This issue is now resolved.

@CindyMercadoReyes CindyMercadoReyes moved this from Ready for QA (beta) to Done in Enterprise 4.56.x (Sept 2021) Sprint Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: m3 Issues for m3 type: enhancement ✨ [5] Velocity rating (Fibonacci)
Projects
No open projects
5 participants