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

[2.x] Use dynamic viewport units for height of Modals #3951

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

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

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.

Height of Modals on Mobile Inconsistent
2 participants