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

WWW-1157: iOS modal bug #2414

Merged
merged 8 commits into from
Jan 21, 2022
Merged

Conversation

colbytcook
Copy link
Contributor

@colbytcook colbytcook commented Jan 6, 2022

Jira

https://pegadigitalit.atlassian.net/browse/WWW-1157
https://pegadigitalit.atlassian.net/browse/DS-448

Summary

Added a new utility class to help solve a iOS scroll bug with the modal, updated the modal CSS for more consistent behavior

Details

  • Added a utility CSS class that will apply a color background directly behind the modal and fix a regression bug with table modals
  • Adjusted the modal styling to provide more consistent behavior on iOS Safari

How to test

Pull down the branch and complete the following tasks.

Non-iOS Devices

  1. Review the Patternlab modal examples for any regressions.
  2. Confirm that on Chrome, Edge, Safari (on mac and not iOS), and Firefox, the "u-bolt-ios-content-fill" is NOT being added to the body (I have confirmed this on Mac but not on Windows though I cannot see that there would be a difference).

iOS Devices (either an iPhone or an iPhone emulator)

  1. On a iOS device, review the Patternlab modal examples and confirm that the class "u-bolt-ios-content-fill" is being added to the body after a modal is opened.
  2. Navigate to the BoC Gallery Page and confirm that when the iOS URL bar hides (this requires scrolling up), the modal remains the same size and a navy color is filling the space below the modal (this behavior can be found on the Carbon Design System Modal). This is to check the DS-448 regression.
  3. Navigate to Next in Tech: 2022 Forecast and click on the "Register Now" button
  4. Inspect the modal and update the CSS with the modal.scss changes.
  5. Add a ::before element to the body and update this new element with the CSS found in the _utilities-ios-content-fill.scss file.
  6. Scroll so the iOS URL bar is hidden and observe that you can no longer see the page content. This is to confirm that this fixes the bug reported in WWW-1157.

Visual changes

On iOS Safari there will now be a navy blue background behind the modal, this can only be seen by having thee URL bar at the bottom of the screen and scrolling up (the URL bar should disappear off the bottom of the screen). If the URL bar hides these will be a navy blue color between the bottom of the modal and the bottom of thee view port.

…al, updated the modal CSS for more conistent behavior
@colbytcook colbytcook changed the title WWW-1157: iOS modal bug [DO NOT MERGE] WWW-1157: iOS modal bug Jan 6, 2022
@github-actions github-actions bot added the type: feature List this PR in the 'Features' section of the release notes. label Jan 6, 2022
@colbytcook colbytcook had a problem deploying to feature/www-1157-modal-height-bug--a81c09b2--commit-preview January 7, 2022 15:20 Failure
@colbytcook colbytcook temporarily deployed to feature/www-1157-modal-height-bug--branch-preview January 7, 2022 15:32 Inactive
@colbytcook colbytcook changed the title [DO NOT MERGE] WWW-1157: iOS modal bug WWW-1157: iOS modal bug Jan 7, 2022
@colbytcook colbytcook temporarily deployed to feature/www-1157-modal-height-bug--branch-preview January 7, 2022 20:29 Inactive
@colbytcook colbytcook temporarily deployed to feature/www-1157-modal-height-bug--branch-preview January 10, 2022 19:57 Inactive
Copy link
Collaborator

@mikemai2awesome mikemai2awesome left a comment

Choose a reason for hiding this comment

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

Approving. But feels weird to use a component class on the body, thoughts, @danielamorse?

…or the iOS fix and removed a unneeded tesst page
@colbytcook
Copy link
Contributor Author

@danielamorse I updated this PR based on our conversation, the color overlay is now scoped to the bolt-modal[open] attribute, removed the breakpoints from themodal.js, the utility class is not removed and refactored the modal docs to remove all examples of a modal nested inside a table since it is not supported anymore.

@mikemai2awesome please take a look at the update modal docs and let me know if you have any suggestions on improving them (I based the UI on the elements page structure).

@colbytcook colbytcook temporarily deployed to feature/www-1157-modal-height-bug--branch-preview January 13, 2022 13:35 Inactive
Copy link
Collaborator

@danielamorse danielamorse left a comment

Choose a reason for hiding this comment

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

@mikemai2awesome @colbytcook updated the CSS to leverage the existing overlay, see commit.

@colbytcook colbytcook requested a deployment to feature/www-1157-modal-height-bug--branch-preview January 14, 2022 21:16 In progress
@colbytcook colbytcook temporarily deployed to feature/www-1157-modal-height-bug--branch-preview January 14, 2022 21:29 Inactive
@colbytcook colbytcook requested a deployment to feature/ds-517-headline-and-text-element--fbf15410--commit-preview January 14, 2022 22:09 In progress
@mikemai2awesome mikemai2awesome merged commit 8e14f3a into master Jan 21, 2022
@mikemai2awesome mikemai2awesome deleted the feature/www-1157-modal-height-bug branch January 21, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature List this PR in the 'Features' section of the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants