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 badge not expanding on click when appropriate #6029
Conversation
Signed-off-by: Sebastian Malton <sebastian@malton.name>
if (elemHasBeenSet.current) { | ||
return; | ||
} | ||
|
||
if (elem.current) { | ||
elemHasBeenSet.current = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is here because we only want to compute if a badge is expandable once (when it is closed). Otherwise it will be re-computed when it is clicked and then expanded.
elemHasBeenSet.current = true; | ||
} | ||
|
||
setIsExpandable(( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be state because we need to trigger a re-render if it is now true
(to add the class names)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to clean up unused code a bit. Otherwise, looks good.
if (elemHasBeenSet.current) { | ||
return; | ||
} | ||
|
||
if (elem.current) { | ||
elemHasBeenSet.current = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work absolutely fine without these lines. Probably there's no need for this checks.
Signed-off-by: Sebastian Malton <sebastian@malton.name>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Fix badge not expanding on click when appropriate Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update other snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove unneccessary code Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix badge not expanding on click when appropriate Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update other snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove unneccessary code Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix badge not expanding on click when appropriate Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update other snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove unneccessary code Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix create release PR to cherry-pick commits Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix create release PR to cherry-pick commits Signed-off-by: Sebastian Malton <sebastian@malton.name> * release v6.0.2-alpha.0 Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix Badges being too small when scrollable and not expandable (#5987) Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove Tabs hover line width transition (#6020) Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix distribution detector erroneously depending on previous metadata (#6023) Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> * Override @astronautlabs/jsonpath's underscore version (#6044) * Override @astronautlabs/jsonpath's underscore version Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove use of buggy 'yarn check' Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> * Don't error out if we can't find resources from helm in our cluster, and handle "blank" output from kubectl gracefully. (#6039) * Use official node-fetch 2.x (#6049) * Fix UI for scaling ReplicaSets (#6052) * Use color-scheme: auto on all iframes (#6074) Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Use abort-controller package to fix typing issues (#6077) * Use default export to fix issue with package lying with types (#6081) Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> * Switch ubuntu CI to ubuntu-20.04 (#6078) Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix <Select/> text overflow below baseline (#6085) * Fix: do not crop <Select/> single value Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix: do not crop namespace selector placeholder Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Align working dir input height with others Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Linter fix Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Prevent massed remounting of dock tabs when dock height changes (#6104) * Update injectable to make withInjectables have authentic React reconciliation Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Make some dock tabs have primitive props to have them React reconcile properly Currently tab objects that are stored in a storage change reference on every change of dock height, making them less usable as React prop for causing involuntary remounting. Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> * Fix node conditions column text-align (#6092) Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Make cluster #app component transparent (#6076) until theme ready Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix badge not expanding on click when appropriate (#6029) * Fix badge not expanding on click when appropriate Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Update other snapshots Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove unneccessary code Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> * Disable fail-fast on the testing CI jobs (#6080) - There are several reasons why these might fail that are irrelavent to the other pipelines. So we should just let them continue Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi> Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com> Co-authored-by: Michael Pearson <mipearson@gmail.com> Co-authored-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> Co-authored-by: Carlos René Mederos Arias <krlosmederos@gmail.com> Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Sebastian Malton sebastian@malton.name
Before (master):
Screen.Recording.2022-08-12.at.12.15.20.PM.mov
After:
Screen.Recording.2022-08-12.at.12.13.30.PM.mov