-
Notifications
You must be signed in to change notification settings - Fork 193
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/clipboard icons alignment #4923
base: unstable
Are you sure you want to change the base?
Fix/clipboard icons alignment #4923
Conversation
|
||
|
||
|
||
|
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 seems like a mistake to add so many extra new lines?
|
||
|
||
|
||
|
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.
And more new lines here?
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.
Yes noticed this after pushing will work on this soon.
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.
Thanks for addressing the extra new lines in the other files. The new lines are still present here though.
@@ -148,12 +148,61 @@ | |||
|
|||
</script> | |||
|
|||
<!-- Remove "scoped" so that our override rules apply globally to KCheckbox internals --> | |||
<style lang="less"> |
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.
We're no longer supporting LESS. SCSS or plain CSS only please
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.
Okay sure . Also , Any guidance on how to make sure code passes javascript cl tests , i am troubling with that a bit also?
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.
The error I saw in the tests in failing checks here on the PR seems related to this issue. Presumably, switching back to SCSS should help?
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.
Okay sure , will do the suggested changes. Thanks!
9698f49
to
ac56318
Compare
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.
Overall, I think this PR alters too much about the checkbox itself. The checkbox is used in places all over Studio, which don't all have the same issue. A more localized fix in the Clipboard code is more appropriate.
simulateClick() { | ||
// Provide a dummy event object with a stopPropagation method | ||
this.handleChange(!this.isChecked, { stopPropagation() {} }); | ||
}, |
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.
What prompted you to add this simulated click event?
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.
The js frontend test was failing so tried to fix it . The tests click the entire container instead of the actual checkbox, so the change event wasn’t firing. The simulateClick method makes sure clicking the container toggles the checkbox and emits the expected event, which fixes the test failures.
|
||
|
||
|
||
|
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.
Thanks for addressing the extra new lines in the other files. The new lines are still present here though.
> | ||
<slot></slot> | ||
</KCheckbox> | ||
<div class="checkbox-container" :data-test="'checkbox-' + value" @click="simulateClick"> |
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.
top: 1.7px !important; /* Added downward shift */ | ||
flex-shrink: 0; | ||
width: 28px !important; | ||
height: 28px !important; |
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.
We shouldn't be modifying the checkbox itself, just the alignment, which is most important with regards to where the checkbox is used.
} | ||
|
||
/* Fix for specific hardcoded selector if needed */ | ||
::v-deep [data-v-4219cdf2] { |
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.
It isn't appropriate to style elements based off this dynamic attribute data-v-4219cdf2
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.
Okay @bjester , will do the suggested changes and then revert back , I might be not able to do in next 1-2 days so i will convert the pr to draft till then . Thanks!
Summary
Fixed checkbox alignment issues in the UI that were causing misalignment between checkbox icons and their corresponding text labels. The checkboxes were appearing slightly misaligned with channel names and folder items in different views.
Modified checkbox.vue to improve alignment using a flexbox-based approach
Added a slight vertical offset to properly align checkbox icons with text
Standardized checkbox icon dimensions to ensure consistency
Manually verified on both channel and folder item views to ensure proper alignment
The fix addresses the inconsistent vertical positioning that was affecting UI appearance
#Before -->

#After -->

References
Addresses #4771
Reviewer guidance