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

fix(PPDSC-2634): select panel zindex #527

Merged
merged 26 commits into from
Dec 29, 2022
Merged

Conversation

mutebg
Copy link
Contributor

@mutebg mutebg commented Dec 20, 2022

PPDSC-2634

What

  1. Background - the select panel goes over other elements with fixed position and z-index -> https://codesandbox.io/s/busy-stonebraker-rdxer2?file=/src/App.tsx
  2. What did you do - the select panel is rendered inside a layer organizer, which means it has its own stacking context and is on top of everything. However, there are some cases you want to have a fixed header or other elements on top of that. In order to solve this I added zIndex as an override to the panel. By default uses the keyword "layer" which keeps the current behaviour ( rendering in a layer organizer ) but users can override that by passing a z-index value which applies to the panel.
  3. What does the reviewers should expect

I have done:

  • Written unit tests against changes
  • Written functional tests against the component and/or NewsKit site
  • Updated relevant documentation

I have tested manually:

  • The feature's functionality is working as expected on Chrome, Firefox, Safari and Edge
  • The screen reader reads and flows through the elements as expected.
  • There are no new errors in the browser console coming from this PR.
  • When visual test is not added, it renders correctly on different browsers and mobile viewports (Safari, Firefox, small mobile viewport, tablet)
  • The Playground feature is working as expected

Before:

After:

Who should review this PR:

How to test:

@github-actions github-actions bot added the fix This change fixes a bug label Dec 20, 2022
@mutebg mutebg changed the base branch from main to fix/PPDSC-2631-fix-select-panel December 20, 2022 13:35
@newskit-engineering
Copy link
Collaborator

Base automatically changed from fix/PPDSC-2631-fix-select-panel to main December 22, 2022 12:04
@mutebg mutebg marked this pull request as ready for review December 22, 2022 13:02
@mutebg mutebg requested a review from a team as a code owner December 22, 2022 13:02
site/pages/components/select.tsx Outdated Show resolved Hide resolved
@baburay23 baburay23 self-requested a review December 29, 2022 09:08
@mutebg mutebg merged commit 85e582b into main Dec 29, 2022
@mutebg mutebg deleted the fix/PPDSC-2634-select-panel-zindex branch December 29, 2022 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This change fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants