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

feat(modal): Expose a closable property to be able to hide x icon #619

Merged
merged 8 commits into from
May 29, 2024

Conversation

mistermalm
Copy link
Contributor

@mistermalm mistermalm commented May 20, 2024

Describe pull-request

Expose a collapsible property to be able to hide x icon

Issue Linking:

How to test

  1. Set closable property to false.
  2. See that the close button is no more.

Checklist before submission

  • I have added unit tests for my changes (if applicable)
  • All existing tests pass
  • [] I have updated the documentation (if applicable)

Suggested test steps

  • Browser testing (Chrome, Safari, Firefox)
  • Keyboard operability
  • Interactive elements have labels.
  • Storybook controls
  • Design/controls/props is aligned with other components
  • Dark/light mode and variants
  • Input fields – values should be displayed properly
  • Events

Additional context

Unit tests will be added if requested.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-619.d3fazya28914g3.amplifyapp.com

Copy link
Contributor

@timrombergjakobsson timrombergjakobsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice man! Maybe we should add a test case for covering this also?

Copy link
Collaborator

@mJarsater mJarsater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has been requested before and if I remember correctly this is a design decision. That the modal should always have a close button?

@theJohnnyMe
Copy link
Contributor

I think this has been requested before and if I remember correctly this is a design decision. That the modal should always have a close button?

I had the same memory so I asked yesterday about it but designers approved it. I am not sure if was I confusing it with the banner component thou.

@timrombergjakobsson
Copy link
Contributor

I think this has been requested before and if I remember correctly this is a design decision. That the modal should always have a close button?

I had the same memory so I asked yesterday about it but designers approved it. I am not sure if was I confusing it with the banner component thou.

Yes, I think memory serves you correct. Although as I believe you can hide it in Figma, it made sense to have this flexibility in the component also. But please, @charlottelorensson or Laurens, you could also give your view on it.

Copy link
Contributor

@nathalielindqvist nathalielindqvist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, nicely done! Maybe introduce a test case for it to cover all bases? 😄

@mistermalm
Copy link
Contributor Author

I agree that it's not best practice UX to disable the close button, sometimes users do not want to make a decision, even if it has a cancel button, they just want to close.

Will add tests as well to ensure quality

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mistermalm
Copy link
Contributor Author

I have now pushed tests for close button aswell

@timrombergjakobsson timrombergjakobsson changed the title feat(modal): Expose a collapsible property to be able to hide x icon feat(modal): Expose a closable property to be able to hide x icon May 27, 2024
Copy link
Contributor

@nathalielindqvist nathalielindqvist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great work! 🚀

Copy link
Contributor

@theJohnnyMe theJohnnyMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mistermalm mistermalm merged commit ecde209 into develop May 29, 2024
2 checks passed
@mistermalm mistermalm deleted the feat/CDEP-3294-hide-x-icon-property branch May 29, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants