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

chore: inline notification visual tweaks #5089

Merged
merged 5 commits into from
Mar 13, 2024

Conversation

bakoushin
Copy link
Contributor

@bakoushin bakoushin commented Mar 13, 2024

Description

Visual tweaks to accommodate current design variants:

  • added Success variant (green background)
  • added icon override: can provide alternative icon or null to render without one

Renames:

  • Severity -> NotificationVariant because from my standpoint it's better aligned with all options it contains
  • Informational -> Info just because it's shorter

Test plan

  • Added unit test for icon override

Related issues

Backwards compatibility

Y

Network scalability

NA

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.55%. Comparing base (8d4fc0f) to head (99f2b2e).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5089   +/-   ##
=======================================
  Coverage   85.55%   85.55%           
=======================================
  Files         724      724           
  Lines       29479    29486    +7     
  Branches     5090     5094    +4     
=======================================
+ Hits        25221    25227    +6     
- Misses       4023     4024    +1     
  Partials      235      235           
Files Coverage Δ
src/account/Profile.tsx 78.08% <100.00%> (ø)
src/account/Settings.tsx 91.55% <100.00%> (ø)
src/components/InLineNotification.tsx 100.00% <100.00%> (ø)
src/jumpstart/JumpstartEnterAmount.tsx 91.42% <100.00%> (ø)
src/qrcode/QRCode.tsx 96.15% <100.00%> (ø)
src/send/EnterAmount.tsx 94.02% <100.00%> (ø)
src/send/SendSelectRecipient.tsx 96.07% <100.00%> (ø)
src/swap/SwapScreen.tsx 94.36% <100.00%> (ø)
src/tokens/TokenImport.tsx 93.50% <100.00%> (ø)
src/walletConnect/screens/ActionRequest.tsx 96.77% <100.00%> (ø)
... and 1 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d4fc0f...99f2b2e. Read the comment docs.

Copy link
Collaborator

@kathaypacific kathaypacific left a comment

Choose a reason for hiding this comment

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

💅🏼

@@ -110,7 +110,7 @@ function Profile({ navigation, route }: Props) {
</View>
<View style={styles.disclaimerContainer}>
<InLineNotification
severity={Severity.Informational}
variant={Variant.Info}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
variant={Variant.Info}
variant={NotificationVariant.Info}

maybe? i'm not sure, i wonder if the generic names are confusing. we haven't been terribly consistent with this but the old "Severity" name bothered me. for the button enums, we prefix with "Btn" so it'd be nice to do something similar here?

<View style={styles.attentionIcon}>
<Icon color={severityColor.primary} size={20} />
</View>
{icon !== null && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: it seems like we're using icon to either provide a custom icon or hide the default icon, to reduce surprises and implicit meanings in props, could we split this into 2 props? hideIcon and customIcon maybe?

@bakoushin bakoushin added this pull request to the merge queue Mar 13, 2024
Merged via the queue into main with commit 2a861db Mar 13, 2024
17 checks passed
@bakoushin bakoushin deleted the alex/inline-notification-tweaks branch March 13, 2024 15:11
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
### Description

Visual tweaks to accommodate current [design
variants](https://www.figma.com/file/erFfzHvSTm5g1sjK6jWyEH/Working-Design-System-Components?type=design&node-id=1144-35&mode=design&t=kUIyzJiXtW1ebQAL-0):
* added `Success` variant (green background)
* added icon override: can provide alternative icon or `null` to render
without one

Renames:
* `Severity` -> `NotificationVariant` because from my standpoint it's
better aligned with all options it contains
* `Informational` -> `Info` just because it's shorter

### Test plan

* Added unit test for icon override 

### Related issues

- Related to RET-1004

### Backwards compatibility

Y

### Network scalability

NA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants