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

Modal: Support icons in title for Modal component #5905

Closed
edinfor opened this issue Nov 23, 2021 · 15 comments · Fixed by #6403
Closed

Modal: Support icons in title for Modal component #5905

edinfor opened this issue Nov 23, 2021 · 15 comments · Fixed by #6403
Assignees
Labels
design Needs input from IDS Design Team type: enhancement ✨ [3] Velocity rating (Fibonacci)

Comments

@edinfor
Copy link
Contributor

edinfor commented Nov 23, 2021

Is your feature request related to a problem? Please describe.
Modal dialog currently only supports text in modal header,
https://design.infor.com/code/ids-enterprise/latest/modal

Can we do the same as the message component and allow icon in the header for consistency?
https://design.infor.com/code/ids-enterprise/latest/message

Message component only takes text in the body.

Describe the solution you'd like
Enable the same configuration option to display icon in the modal title like message component.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
We have removed icon in modal component for now until the option becomes available.

Additional context
Add any other context or screenshots about the feature request here.

@tmcconechy tmcconechy transferred this issue from infor-design/enterprise-ng Nov 29, 2021
@tmcconechy tmcconechy changed the title Support icons in title for ModalDialog component Modal: Support icons in title for Modal component Nov 29, 2021
@tmcconechy tmcconechy added design Needs input from IDS Design Team type: enhancement ✨ [3] Velocity rating (Fibonacci) labels Nov 29, 2021
@tmcconechy
Copy link
Member

The design of modals does not encourage icons as this would mean we would have to create icons for every use case. The icons will generally become less meaningfull.

Any particular use case or reason you think we shiould do this @edinfor.

cc @kevinwhitedesign in design for his thoughts

@edinfor
Copy link
Contributor Author

edinfor commented Nov 29, 2021

@tmcconechy we are already using icons in message modal, we are just reusing the same icons for the same purpose

@tmcconechy
Copy link
Member

We only allow alert icons there https://main-enterprise.demo.design.infor.com/components/message/example-index.html as it is a different use case. I.E. error/info..

So still not sure if we want icons on every type of modal. Probably not

@edinfor
Copy link
Contributor Author

edinfor commented Nov 29, 2021

in that case, we need to support message component to allow passing component as body instead of text only then...we need to show more details to customers in addition to just text messages, e.g.

  1. multiple shift details that need to be on different lines and styled differently based on error severity
  2. combine error and warnings messages so we don't have to display multiple messages popups

@tmcconechy
Copy link
Member

  1. You can pass HTML to the message but some tags are stripped so you need to set allowedTags to ones you might need (see allow tags on https://main-enterprise.demo.design.infor.com/components/message/example-index.html). I think a simple styling for the shifts should be fine but should just be text/table ect not interactive components).
  2. How can it be both an error and a warning?

@edgarinfor
Copy link

@tmcconechy, perhaps, this ticket should have been opened in the NG project as the content of the dialog is an Angular Component and NOT plain TEXT or HTML.

The problem is that, there is a gap between the Message Component and the Modal Component. The message one, allows you to show a status icon with the title BUT, it doesn't let you use a component as content. The opposite is true for the modal one, you can use a component as content BUT, it doesn't let you display a status icon with the title.

So, basically, we need a setting like this in the Modal Component api:

settings.status string='' Pass a status to style icon and title color ('error', 'alert', 'success', 'info')

Additionally, we would like to be able to pass a custom icon name other than 'error', 'alert', 'success', 'info'; similar to what other IDS components do.

@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Dec 10, 2021
@tmcconechy
Copy link
Member

I still think this is clouding up the API for one use case then people may get confused and use modals for message status. I dont think we want to support status on modal when its really the function of the message component.

We can see if we want modals to have icons in general but i think using them for status mixes concerns. So i have labeled this as something to review with design.

The message component was intended to be string based and simple messages since its a directive i dont think we can make it take content like that either. But maybe in the future web component version...

So given all that maybe just manually put the icons on the modal for now.

@edgarinfor
Copy link

edgarinfor commented Dec 10, 2021

Yes, I can see your point about having separate concerns; but, maybe we could ignore calling it "status" for the Modal Component and just provide a "settings.icon" which would place the icon with the title.

I think that we could add the icon "manually" by passing the title as HTML to the Modal Component but, it doesn't render/look consistent with the Message Component.

@tmcconechy
Copy link
Member

You may need to add a bit of css to do it manually. But I agree if we go ahead with this it would maybe an an icon setting and maybe an iconClass.

Do you have any mockups/designs of what you a re trying to achieve? I'll review with the team

@edgarinfor
Copy link

That's right, the iconClass as well might be needed in case we want to change colors, for example.

Here's a mockup provided by our designer:
modal_title-icon_example

@tmcconechy
Copy link
Member

@kevinwhitedesign what do you think about this request?

@kevinwhitedesign
Copy link

@tmcconechy I don't see a problem with the team adding more context into the message for the user into why there's an error.

This design is a bit narrow and some of the inconsistent vertical spacing should be addressed.

@tmcconechy
Copy link
Member

ok sounds good - we can add an icon option to the modal.

@tmcconechy tmcconechy removed the design Needs input from IDS Design Team label Feb 9, 2022
@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Feb 9, 2022
@tmcconechy tmcconechy added the design Needs input from IDS Design Team label Feb 9, 2022
@tmcconechy tmcconechy added this to To do in Enterprise 4.62.x (Mar 2022) Sprint via automation Feb 23, 2022
@tmcconechy tmcconechy added this to To do in Enterprise 4.63.x (Apr 2022) Sprint via automation Apr 4, 2022
@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Apr 26, 2022
@tmcconechy tmcconechy added this to To do in Enterprise 4.64.x (May 2022) Sprint via automation Apr 27, 2022
@ericangeles ericangeles self-assigned this May 2, 2022
@ericangeles ericangeles moved this from To do to In progress in Enterprise 4.64.x (May 2022) Sprint May 10, 2022
@ericangeles ericangeles moved this from In progress to Pending Review in Enterprise 4.64.x (May 2022) Sprint May 11, 2022
@ericangeles ericangeles moved this from Pending Review to Ready for QA (beta) in Enterprise 4.64.x (May 2022) Sprint May 16, 2022
@jbrcna
Copy link
Contributor

jbrcna commented May 17, 2022

@jbrcna jbrcna moved this from Ready for QA (beta) to Done in Enterprise 4.64.x (May 2022) Sprint May 17, 2022
@CindyMercadoReyes
Copy link
Collaborator

BDD attached.
BDDStory_github5905.docx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Needs input from IDS Design Team type: enhancement ✨ [3] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

7 participants