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 theme): fix modal vertical positioning #658

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

Ncookiez
Copy link
Contributor

@Ncookiez Ncookiez commented Mar 6, 2023

Description

As of the changes of #601 (fixing #600), modals can no longer be positioned vertically. This is because the height of the modal is always 100% and thus items-start, items-center or items-end do not affect the flex items. This PR reverts the simple change made that broke this.

The bug can be observed in the docs here where positioning the item anywhere but the top does nothing.

In my opinion, the fix for overflowing modals seen in #601 and also suggested on #537 is not accurate. Setting a max height for your modal when using the component is more than sufficient to fix this issue on any given project, but eventually having a fix on this package could be ideal (some of this discussion overlaps with #520).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manually adding md:h-auto to my own project and the docs' site.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (525b90d) 99.42% compared to head (34eff42) 99.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #658   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files         130      130           
  Lines        6439     6439           
  Branches      481      481           
=======================================
  Hits         6402     6402           
  Misses         37       37           
Impacted Files Coverage Δ
src/lib/theme/default.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@tulup-conner tulup-conner left a comment

Choose a reason for hiding this comment

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

Confirmed this behavior on the docs, thank you

A previous PR (themesberg#601) broke vertical positioning for modals. This reverts such changes.
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.

2 participants