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

Improve immersive Modal display on iOS #1087

Merged
merged 2 commits into from
Aug 5, 2021
Merged

Improve immersive Modal display on iOS #1087

merged 2 commits into from
Aug 5, 2021

Conversation

connor-baer
Copy link
Member

@connor-baer connor-baer commented Aug 5, 2021

Addresses this Slack thread.

Purpose

Reported by @chaserunner:

We have an issue with notification banner component, it’s not respecting safe-area-insets when displayed in iOS web view. And is covered by the components in the window. Probably this also reproducible in safari.

Reported by @Zayebatsu:

Is there a possibility to have a higher modal on mobile than 80vh? eg. on this modal we have a lot of content and 80vh is not enough to display all without scroll

Approach and changes

  • Add bottom padding to the modal content to clear any browser chrome overlays
  • Remove a previous workaround that limited modals to 80vh on iOS (Fixes in the Modal #1070)

Note: Best viewed without whitespace changes

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

@vercel
Copy link

vercel bot commented Aug 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sumup/oss-circuit-ui/GDBq1okFJGCdG4WjzwLdh312XtHh
✅ Preview: https://oss-circuit-ui-git-bugfix-modal-ios-sumup.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Aug 5, 2021

🦋 Changeset detected

Latest commit: 7658274

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sumup/circuit-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Merging #1087 (7658274) into next (c1a00e3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #1087   +/-   ##
=======================================
  Coverage   91.54%   91.54%           
=======================================
  Files         165      165           
  Lines        2908     2908           
  Branches      855      855           
=======================================
  Hits         2662     2662           
  Misses        233      233           
  Partials       13       13           
Impacted Files Coverage Δ
packages/circuit-ui/components/Modal/Modal.tsx 81.08% <100.00%> (ø)

@connor-baer connor-baer added the 🐞 bug Something isn't working as it should label Aug 5, 2021
@connor-baer connor-baer marked this pull request as ready for review August 5, 2021 09:16
@connor-baer connor-baer requested a review from a team as a code owner August 5, 2021 09:16
@connor-baer connor-baer requested review from amelako and removed request for a team August 5, 2021 09:16
`,
variant === 'immersive' &&
cssString`
top: 0;
Copy link
Member Author

Choose a reason for hiding this comment

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

@robinmetral This did the trick for fullscreen on iOS: by setting both top and bottom to 0, we can use 100% instead of 100vh.

Copy link
Contributor

@robinmetral robinmetral left a comment

Choose a reason for hiding this comment

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

@connor-baer connor-baer merged commit 9ac7aa8 into next Aug 5, 2021
@connor-baer connor-baer deleted the bugfix/modal-ios branch August 5, 2021 09:23
@github-actions github-actions bot mentioned this pull request Aug 5, 2021
@chaserunner
Copy link

chaserunner commented Aug 5, 2021

@robinmetral amazing work! thanks for so quick reaction 🚀

This was referenced Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working as it should 🗂 circuit-ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants