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

Fixed post items getting cut off on iOS #17189

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

JBYoshi
Copy link
Contributor

@JBYoshi JBYoshi commented Jul 3, 2023

Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this list, thanks!

  • There's a clear use-case for this code change, explained below
  • Commit message has a short title & references relevant issues
  • The build will pass (run yarn test:all and yarn lint)

We appreciate your contribution!


This PR is a fixed version of #16765. I took a different approach for this to work around some of the issues that were found after that one got merged. In that PR's description, I mentioned that there were multiple scroll areas for the post editor that were somehow displaying at different sizes. The reason appears to be that the CSS vh unit includes some areas that are obscured by Safari's toolbars, since those toolbars may disappear if the <body> element is scrolled. However, since Ghost's admin area uses <div> elements for all scrolling, those toolbars never disappear, and so the space becomes unused. We can work around this by changing to the CSS dvh unit, which always represents the current size of the viewport.

Most pages have enough padding that the vh unit doesn't cause any problems. In this PR, I've changed it for two places that do break, the post editor and the post settings menu (which can get the "Delete" button cut off). I also included the sidebar width fix from the previous PR.

Video of the fixed behavior (compare with the old behavior video linked in #16765): link

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (be209cd) 66.98% compared to head (417b710) 71.76%.
Report is 4 commits behind head on main.

❗ Current head 417b710 differs from pull request most recent head 8934abd. Consider uploading reports for the commit 8934abd to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17189      +/-   ##
==========================================
+ Coverage   66.98%   71.76%   +4.78%     
==========================================
  Files        1475     1836     +361     
  Lines       83777   116454   +32677     
  Branches    11332    17301    +5969     
==========================================
+ Hits        56115    83575   +27460     
- Misses      26531    31756    +5225     
+ Partials     1131     1123       -8     
Flag Coverage Δ
admin-tests ?
e2e-tests 66.51% <ø> (-15.13%) ⬇️
unit-tests 63.72% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 755 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniellockyer daniellockyer changed the title Fix post items getting cut off on iOS. Fixed post items getting cut off on iOS Oct 6, 2023
@daniellockyer daniellockyer merged commit e884051 into TryGhost:main Oct 6, 2023
14 checks passed
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.

3 participants