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

ui: Remove class-map reference from 1.11 #12358

Merged
merged 2 commits into from Feb 18, 2022

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Feb 15, 2022

Fixes #12351

A new helper added for 1.12 work unfortunately ended up in our 1.11 branch. This removes the helper and replaces it with equivalent code.

@johncowen johncowen added the theme/ui Anything related to the UI label Feb 15, 2022
@johncowen johncowen marked this pull request as ready for review February 15, 2022 19:21
@johncowen johncowen requested review from a user, natmegs, jgwhite and amyrlam February 15, 2022 19:21
(array 'empty' (eq checks.length 0))
(array status (not-eq checks.length 0))
}}
class={{concat 'consul-instance-checks' (if (eq checks.length 0) ' empty') (if (not-eq checks.length 0) (concat ' ' status))}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this could maybe be simplified to one if/else condition like (if (eq checks.length 0) ' empty' (concat ' ' status)) but def not a blocker

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, so I decided to leave this as is, it's pretty much deadcode now anyway (1.12 is different to this an wioll always be different moving forward). Plus if there are any changes upstream than need to come down here also (unlikely but you never know), the code here is logically as close as possible to the 1.12 version without using the helper that only exists in 1.12. For example if we needed to add another class in 1.12 we wouldn't be able to use an if/else here, we'd have to revert it to as it is now.

All in all I getcha completely on the query, and also that it's not a blocker, thought I'd give my reasoning for leaving it as is. Thanks again for the review!

@vercel vercel bot temporarily deployed to Preview – consul-ui-staging February 18, 2022 17:21 Inactive
@vercel vercel bot temporarily deployed to Preview – consul February 18, 2022 17:21 Inactive
@johncowen johncowen added the pr/no-changelog PR does not need a corresponding .changelog entry label Feb 18, 2022
@johncowen
Copy link
Contributor Author

Added a no-changelog here as our changelog checker doesn't work if the base branch isn't main, but I did add a changelog to the PR.

@johncowen johncowen merged commit 3bdbcb6 into release/1.11.x Feb 18, 2022
@johncowen johncowen deleted the ui/bugfix/remove-class-map-from-1.11 branch February 18, 2022 17:30
@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/589395.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants