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

[ENG-813] Consent banner stacked in front of modals #218

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

carlmw
Copy link
Contributor

@carlmw carlmw commented Jun 28, 2024

How to review this PR

  • Check component hierarchy is followed correctly
  • Check the design Heuristics have been followed
  • Check naming conventions have been applied
  • Check for these gotchyas:
    • Missing exports for Oak components
    • Accidental export of Internal components
    • Snapshots of unexpected components have been modified
    • Circular dependencies
    • Code duplication (via not using base components)
    • Non-functional storybook for this or related components
    • Sensitve files changed eg. atoms, or style tokens
    • Relative imports
    • Default exports

Add your PR description below

We need to ensure that the cookie banner is rendered above all the content on the page but still allow the app to function while it is visible . We discovered that modals were being rendered below the banner owing to the z-index being overridden and the default in-front being insufficient to stack it above.

I looked at introducing some sort of React context->provider layer manager thingy to create portals and manage z-indices. But that is a lot of maintenance and would require future developers to have knowledge of its purpose when creating new components that need to stack.

So a simple but tidy thing we can do is add a constant that ensures the consent banner (and other future banners) will be stacked behind all modals. This constant should communicate its intent to future developers while making it hard to regress and/or miss

Testing instructions

There isn't much to test here since the issue only presents itself in OWA currently — there will be a PR there where the fix can be verified

Copy link

Copy link

netlify bot commented Jun 28, 2024

Deploy Preview for lively-meringue-8ebd43 ready!

Name Link
🔨 Latest commit 637bce8
🔍 Latest deploy log https://app.netlify.com/sites/lively-meringue-8ebd43/deploys/668280a205126b00087809ce
😎 Deploy Preview https://deploy-preview-218--lively-meringue-8ebd43.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@carlmw carlmw force-pushed the fix/ENG-813/consent-banner-stacked-in-front-of-modals branch from d5fa862 to f90998c Compare July 1, 2024 09:34
this adds a constant that ensures that the consent banner (and other
future banners) will be stacked behind all modals.

hopefully this approach will help future visitors to the file from
regressing this issue since the constants will reveal the intent.
@carlmw carlmw force-pushed the fix/ENG-813/consent-banner-stacked-in-front-of-modals branch from f90998c to 637bce8 Compare July 1, 2024 10:10
@carlmw carlmw merged commit ec7059c into main Jul 1, 2024
5 checks passed
@carlmw carlmw deleted the fix/ENG-813/consent-banner-stacked-in-front-of-modals branch July 1, 2024 11:02
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.

2 participants