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

fix: modal dismiss #246

Merged
merged 13 commits into from
Dec 18, 2024
Merged

fix: modal dismiss #246

merged 13 commits into from
Dec 18, 2024

Conversation

dommirr
Copy link
Contributor

@dommirr dommirr commented Aug 5, 2024

Type

  • Bugfix πŸ›
  • New feature 🌈
  • Change request πŸ€“
  • Documentation πŸ“š
  • Tech debt πŸ‘©β€πŸ’»

Changes proposed βœ”οΈ

@nimbus-ds/[email protected]

πŸ› Bug fixes

  • Made onDismiss property optional for Modal component. If onDismiss is not provided, the modal can no longer be closed by clicking outside or pressing the close button
  • Removed the close button (X) from Modal component when onDismiss is not provided. (#246 by @dommirr)

Copy link

github-actions bot commented Aug 5, 2024

Getting started

Please make sure you read our documentation on how to write code for components, stories and styles.

  • Provide a list of changes
  • Include images to help better visualize your work
  • If your PR closes an issue, please link it
  • Add reviewers
  • Add a label to help better understand what your changes are related to

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 99.24%. Comparing base (0669a1b) to head (8250472).
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #246   +/-   ##
=======================================
  Coverage   99.24%   99.24%           
=======================================
  Files         298      298           
  Lines        1977     1978    +1     
  Branches      290      291    +1     
=======================================
+ Hits         1962     1963    +1     
  Misses         13       13           
  Partials        2        2           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@dommirr dommirr changed the title Fix/modal dismiss fix: modal dismiss Aug 5, 2024
code: "Escape",
keyCode: 27,
});
expect(screen.queryByTestId("dismiss-modal-button")).toBeNull();
Copy link
Contributor

Choose a reason for hiding this comment

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

no me quedΓ³ claro la ejecuciΓ³n de esta prueba, si en el modal que no tiene el dismiss ejecutamos Escape cuando vamos a verificar el elemento con el testId dismiss-modal-button no deberiΓ‘ existir? .. Eso quiere decir que con el Escape se estarΓ­a cerrando? πŸ€”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hola @harrytiendanube, gracias por la observaciΓ³n. En realidad el botΓ³n no se renderiza nunca, este evento se colΓ³ haciendo algunas pruebas. Ahora lo saco

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@harrytiendanube ahΓ­ subΓ­ los cambios en este commit. No saquΓ© el evento, sino que agreguΓ© un assert para determinar que el modal quedΓ³ abierto

@dommirr dommirr marked this pull request as ready for review August 12, 2024 15:57
@dommirr dommirr requested a review from jcampos89 as a code owner August 12, 2024 15:57
@harrytiendanube harrytiendanube requested a review from a team as a code owner December 16, 2024 16:54
@harrytiendanube harrytiendanube changed the base branch from master to release December 18, 2024 18:01
@harrytiendanube harrytiendanube merged commit 376fd2c into release Dec 18, 2024
6 checks passed
@harrytiendanube harrytiendanube mentioned this pull request Dec 18, 2024
5 tasks
harrytiendanube added a commit that referenced this pull request Dec 18, 2024
* fix(modal): make `onDismiss` optional and conditionally render close button

* feat: add change

* feat: fix change

* feat: add change log

* feat: add change log

* feat: fix change log

* feat: fix change log

* feat: fix change logs

* fix: versions yml

* feat: fix test

---------

Co-authored-by: dommirr <[email protected]>
Co-authored-by: Ignacio Zullo Salvucci <[email protected]>
Co-authored-by: Harry Barzola <[email protected]>
@harrytiendanube harrytiendanube mentioned this pull request Dec 18, 2024
1 task
harrytiendanube added a commit that referenced this pull request Dec 18, 2024
* fix: modal dismiss (#246)

* fix(modal): make `onDismiss` optional and conditionally render close button

* feat: add change

* feat: fix change

* feat: add change log

* feat: add change log

* feat: fix change log

* feat: fix change log

* feat: fix change logs

* fix: versions yml

* feat: fix test

---------

Co-authored-by: dommirr <[email protected]>
Co-authored-by: Ignacio Zullo Salvucci <[email protected]>
Co-authored-by: Harry Barzola <[email protected]>

* fix(tabs): align center buttons (#261)

* fix: tabs align center when is full

* chore: include patch to components

* docs: add changelog

* chore: fix version release

---------

Co-authored-by: dommirr <[email protected]>
Co-authored-by: dommirr <[email protected]>
Co-authored-by: Ignacio Zullo Salvucci <[email protected]>
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.

4 participants