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 badge not expanding on click when appropriate #6029

Merged
merged 5 commits into from Aug 25, 2022
Merged

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented Aug 12, 2022

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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 added bug Something isn't working area/ui labels Aug 12, 2022
@Nokel81 Nokel81 added this to the 6.0.2 milestone Aug 12, 2022
@Nokel81 Nokel81 requested a review from a team as a code owner August 12, 2022 16:16
@Nokel81 Nokel81 requested review from nevalla and jim-docker and removed request for a team August 12, 2022 16:16
Comment on lines 49 to 55
if (elemHasBeenSet.current) {
return;
}

if (elem.current) {
elemHasBeenSet.current = true;
}
Copy link
Collaborator Author

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((
Copy link
Collaborator Author

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>
Copy link
Contributor

@aleksfront aleksfront left a 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.

Comment on lines 49 to 55
if (elemHasBeenSet.current) {
return;
}

if (elem.current) {
elemHasBeenSet.current = true;
}
Copy link
Contributor

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>
Copy link
Contributor

@jweak jweak left a comment

Choose a reason for hiding this comment

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

LGTM

@Nokel81 Nokel81 merged commit e2b854d into master Aug 25, 2022
@Nokel81 Nokel81 deleted the fix-badge-again branch August 25, 2022 13:19
@Nokel81 Nokel81 mentioned this pull request Aug 26, 2022
Nokel81 added a commit that referenced this pull request Aug 26, 2022
* 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>
@Nokel81 Nokel81 mentioned this pull request Aug 26, 2022
Nokel81 added a commit that referenced this pull request Aug 26, 2022
* 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>
Nokel81 added a commit that referenced this pull request Aug 26, 2022
* 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>
Nokel81 added a commit that referenced this pull request Aug 26, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants