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

Layout shifts when adding / removing filters on list pages #2050

Closed
AlanGreene opened this issue May 21, 2021 · 5 comments · Fixed by #2061
Closed

Layout shifts when adding / removing filters on list pages #2050

AlanGreene opened this issue May 21, 2021 · 5 comments · Fixed by #2061
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@AlanGreene
Copy link
Member

Describe the bug

The content below the filter shifts up / down slightly (maybe 1 or 2px) as filters are removed / added.

Expected behaviour

Content should be positioned consistently and layout shouldn't shift as I'm using the Dashboard.

Steps to reproduce the bug

Environment details

  • Versions:
    • Tekton Dashboard: main

Additional Info

May-21-2021 16-21-23

@AlanGreene AlanGreene added kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels May 21, 2021
@wingyplus
Copy link
Contributor

I try inspecting this issue. It seems min-height is not enough. After I change from 2px to 4px. The issue is disappear.

Screen Shot 2564-05-25 at 18 32 18

@wingyplus
Copy link
Contributor

wingyplus commented May 25, 2021

I see that it use calc(#{$spacing-08} + #{$button-border-width}). If I understand it correctly, button-border-width come from lib carbon which is 2px value, right?. Maybe it doesn't fit with filter tag?

@AlanGreene
Copy link
Member Author

button-border-width come from lib carbon which is 2px value, right?

yes that's right, it's defined here https://github.com/carbon-design-system/carbon/blob/30d28f9e4c87d0494fc2e098dfef6a842adf88d0/packages/components/src/globals/scss/_theme-tokens.scss#L228

@wingyplus
Copy link
Contributor

wingyplus commented May 25, 2021

I guess that because of tag and clear all button is quite bigger. The workaround might increase the min-height offset (~2px) on the tkn--filters can be fixed.

What do you think?

@AlanGreene
Copy link
Member Author

yes that seems reasonable 👍

wingyplus added a commit to wingyplus/dashboard that referenced this issue May 25, 2021
Label filter seems quite bigger than before. Add offset to min-height in
tkn--filters to prevent layout shift.

Closes tektoncd#2050
wingyplus added a commit to wingyplus/dashboard that referenced this issue May 25, 2021
Label filter seems quite bigger than before. Add offset to min-height in
tkn--filters to prevent layout shift.

Closes tektoncd#2050
tekton-robot pushed a commit that referenced this issue May 25, 2021
Label filter seems quite bigger than before. Add offset to min-height in
tkn--filters to prevent layout shift.

Closes #2050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants