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

UX Icon: Updated Icon for Disclosure #17877

Merged
merged 8 commits into from
Mar 9, 2023
Merged

UX Icon: Updated Icon for Disclosure #17877

merged 8 commits into from
Mar 9, 2023

Conversation

NidhiKJha
Copy link
Member

This PR is to update fa-add with ICON_NAMES.ADD

Before

vh

After

cv vb

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

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.

@NidhiKJha NidhiKJha added team-design-system All issues relating to design system in Extension team-extension-client team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead labels Feb 23, 2023
@NidhiKJha NidhiKJha requested a review from a team as a code owner February 23, 2023 11:54
@NidhiKJha NidhiKJha requested a review from Gtonizuka February 23, 2023 11:54
@metamaskbot
Copy link
Collaborator

Builds ready [a601769]
Page Load Metrics (1733 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1001771302010
domContentLoaded15152103171415775
load15152103173316077
domInteractive15142103171415775
Bundle size diffs
  • background: 0 bytes
  • ui: 332 bytes
  • common: 0 bytes


i {
&--icon {
Copy link
Contributor

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}?

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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

Screenshot 2023-03-06 at 3 40 55 PM

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a 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 {
Copy link
Contributor

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

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)

Suggested change
className="disclosure__summary--icon"
className="disclosure__summary-icon"

Copy link
Contributor

@garrettbear garrettbear left a 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

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a 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
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #17877 (c8c8ac7) into develop (601e02c) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop   #17877   +/-   ##
========================================
  Coverage    63.45%   63.45%           
========================================
  Files          903      903           
  Lines        35264    35264           
  Branches      8919     8919           
========================================
  Hits         22374    22374           
  Misses       12890    12890           
Impacted Files Coverage Δ
ui/components/ui/disclosure/disclosure.js 62.50% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [c8c8ac7]
Page Load Metrics (1602 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint95149114157
domContentLoaded13531897157911656
load14511898160211254
domInteractive13531897157911656
Bundle size diffs
  • background: 0 bytes
  • ui: 350 bytes
  • common: 0 bytes

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

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

LGTM

@NidhiKJha NidhiKJha merged commit bf06598 into develop Mar 9, 2023
@NidhiKJha NidhiKJha deleted the fa-add branch March 9, 2023 05:18
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-design-system All issues relating to design system in Extension team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants