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: use dynamic viewport units for height of Modals #3951

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

DavideIadeluca
Copy link
Contributor

@DavideIadeluca DavideIadeluca commented Jan 6, 2024

Fixes #3950

Changes proposed in this pull request:
This change addresses an issue where the height and position of Modals on mobile is inconsistent. I propose to use dynamic viewport units which take UI elements of the browser/device into consideration and adjusts the height accordingly.

Reviewers should focus on:
Since nearly every browser on a reasonable version supports dynamic viewport units, I'm not sure if it makes sense to include the fallback everywhere. Maybe it would make more sense to automatically add fallback values when the CSS is complied?

Screenshot

After.MP4

QA
Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@DavideIadeluca DavideIadeluca changed the title Di/dynamic modal height [2.x] Use dynamic viewport units for Modals Jan 6, 2024
@DavideIadeluca DavideIadeluca changed the title [2.x] Use dynamic viewport units for Modals [2.x] Use dynamic viewport units for height of Modals Jan 6, 2024
@DavideIadeluca DavideIadeluca marked this pull request as ready for review January 6, 2024 12:48
@DavideIadeluca DavideIadeluca requested a review from a team as a code owner January 6, 2024 12:48
@nodeloc
Copy link

nodeloc commented Jan 9, 2024

Hi, @DavideIadeluca I modified the file but the issue haven't resolved. My iOS version is 17.1.2.

@DavideIadeluca
Copy link
Contributor Author

@DavideIadeluca DavideIadeluca force-pushed the di/dynamic-modal-height branch from 8a7e41c to 7b883c2 Compare October 19, 2024 17:08
@DavideIadeluca DavideIadeluca changed the title [2.x] Use dynamic viewport units for height of Modals fix: use dynamic viewport units for height of Modals Oct 19, 2024
@DavideIadeluca
Copy link
Contributor Author

@SychO9 I removed the fallback values, as Dynamic viewport units have broad browser support and other parts of the ecosystem would fail sooner. I think this fix can be merged anytime

@SychO9 SychO9 added this to the 2.0 milestone Oct 21, 2024
@SychO9 SychO9 merged commit b86a4a0 into flarum:2.x Oct 21, 2024
18 checks passed
@DavideIadeluca DavideIadeluca deleted the di/dynamic-modal-height branch October 26, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Height of Modals on Mobile Inconsistent
3 participants