Fix/clipboard icons alignment#4923
Fix/clipboard icons alignment#4923GautamBytes wants to merge 12 commits intolearningequality:unstablefrom
Conversation
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
This seems like a mistake to add so many extra new lines?
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Yes noticed this after pushing will work on this soon.
There was a problem hiding this comment.
Thanks for addressing the extra new lines in the other files. The new lines are still present here though.
| </script> | ||
|
|
||
| <!-- Remove "scoped" so that our override rules apply globally to KCheckbox internals --> | ||
| <style lang="less"> |
There was a problem hiding this comment.
We're no longer supporting LESS. SCSS or plain CSS only please
There was a problem hiding this comment.
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.
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.
Okay sure , will do the suggested changes. Thanks!
9698f49 to
ac56318
Compare
bjester
left a comment
There was a problem hiding this comment.
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.
What prompted you to add this simulated click event?
There was a problem hiding this comment.
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.
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"> |
| top: 1.7px !important; /* Added downward shift */ | ||
| flex-shrink: 0; | ||
| width: 28px !important; | ||
| height: 28px !important; |
There was a problem hiding this comment.
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.
It isn't appropriate to style elements based off this dynamic attribute data-v-4219cdf2
There was a problem hiding this comment.
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!
|
Closing in favor of #4947 |

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