Skip to content

Conversation

CopyJosh
Copy link
Contributor

@CopyJosh CopyJosh commented May 15, 2023

Bug introduced in v2.30.0

What does this PR do?

Fixes a bug introduced in v2.30.0 where the Layer would not restrict scroll when passed the modal prop.

Where should the reviewer start?

v2.29.1...v2.30.0

What testing has been done on this PR?

Local testing against our website

How should this be manually tested?

This can be manually tested in storybook, by toggling on "modal" and adjusting the screen width such that hitResponsiveBreakpoint returns false.

This can be manually tested in the docs at https://v2.grommet.io/layer by adding the modal prop and observing the window still scrolls.

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • userEvent is used in place of fireEvent.
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

Up until now the modal prop alone would appear to restrict the scroll of the page, but maybe that was not a widespread intention given the code comments. If that is the case this PR could be ignored..

What are the relevant issues?

#6632

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Should this PR be mentioned in the release notes?

Is this change backwards compatible or is it a breaking change?

@CopyJosh CopyJosh changed the title Fix Layer with modal prop did not restrict scroll Fix Layer with modal prop does not restrict scroll May 15, 2023
@CopyJosh CopyJosh changed the title Fix Layer with modal prop does not restrict scroll fix: Layer with modal prop does not restrict scroll May 15, 2023
@jcfilben jcfilben added the PRty Biweekly PR reviews by grommet team with hoping of closing such PRs label May 25, 2023
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

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

LGTM.

@taysea taysea requested a review from jcfilben May 25, 2023 19:55
@halocline
Copy link
Collaborator

Thank you, @CopyJosh. We appreciate the contribution.

@jcfilben jcfilben merged commit 2fc88c4 into grommet:master May 25, 2023
@CopyJosh CopyJosh deleted the patch-1 branch May 25, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PRty Biweekly PR reviews by grommet team with hoping of closing such PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants