-
Notifications
You must be signed in to change notification settings - Fork 5k
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
UX Icon: Updated Icon for Disclosure #17877
Conversation
Builds ready [a601769]
Page Load Metrics (1733 ± 77 ms)
Bundle size diffs
|
|
||
i { | ||
&--icon { |
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.
@georgewrmarshall Am I correct in that we want to remove these styles completely and instead add marginInlineStart={x}
and marginInlineEnd={x}
?
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 can add the maginInlineStart={-5}
and that should work but I am not sure about using marginInlineEnd
since its value is 10
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.
We can just round down to the closest divisible by 4 value so 8px
marginInlineEnd={2}
I don't think the box component supports negative values though so -5
won't work. Do you know what the reason is for the negative margin? It seems quite random?
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 @georgewrmarshall @darkwing . I have updated the marginInlineEnd value. Seems like the negative margin was added to keep the icon in place, since padding-left: 24px;
in disclosure-summary
was adding extra padding to the container.
New
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.
Checked storybook looks good. Would like to see what the reason is for the -20px margin. Left a comment under the margin thread
|
||
i { | ||
&--icon { |
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 can just round down to the closest divisible by 4 value so 8px
marginInlineEnd={2}
I don't think the box component supports negative values though so -5
won't work. Do you know what the reason is for the negative margin? It seems quite random?
@@ -23,7 +25,12 @@ const Disclosure = ({ children, title, size }) => { | |||
{title ? ( | |||
<details> | |||
<summary className="disclosure__summary"> | |||
<i className="fa fa-plus" /> | |||
<Icon | |||
className="disclosure__summary--icon" |
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.
In BEM standards would still keep this as disclosure__summary-icon
and reserving the double dash --
for when it is a modifier (e.g. disclosure__summary-icon--size-xs
)
className="disclosure__summary--icon" | |
className="disclosure__summary-icon" |
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 - just made the one comment but won't let that hold you back from completing task
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.
Code looks good just need a storybook build for visual review
Codecov Report
@@ Coverage Diff @@
## develop #17877 +/- ##
========================================
Coverage 63.45% 63.45%
========================================
Files 903 903
Lines 35264 35264
Branches 8919 8919
========================================
Hits 22374 22374
Misses 12890 12890
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Builds ready [c8c8ac7]
Page Load Metrics (1602 ± 54 ms)
Bundle size diffs
|
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
This PR is to update
fa-add
withICON_NAMES.ADD
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.