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

feat: added KeyValueRow to component-library/components-temp #11294

Merged
merged 25 commits into from
Sep 24, 2024

Conversation

Matt561
Copy link
Contributor

@Matt561 Matt561 commented Sep 18, 2024

Description

This PR adds <KeyValueRow /> to the components-temp library. The motivation is to improve DX and reusability since we commonly display a variety of key/value pairs within the app.

What's Included?

1. <KeyValueRow />

  • default export to handle majority of common use cases. Example usages have been added to the storybook.

2. KeyValueRowStubs

  • <Root />: The main container. Its children should be two <Section /> components representing the left side (key) and right side (value) of the pairing.
  • <Section />: A container representing either the key or the value.
  • <Label />: A convenience component that provides built-in support for icons, tooltips, and formatting.

3. Updated withNavigation Storybook Decorator

This change was made to support the tooltip modal used within the <KeyValueRow />. I think it's appropriate for the story to accurately reflect the interactivity of the components on display.

This should also allow others to use modals in their stories.

These stubs can be used to extend this and create new variants of the KeyValueRow.

Related issues

STAKE-829: [FE] Create Key Value Row component - link

Manual testing steps

  1. Switch to the storybook view (instructions here)
  2. Select the KeyValueRow story inside of "Components Temp" folder.
  3. Example usages of <KeyValueRow /> found within the story

Screenshots/Recordings

Before

N/A this is a net new change.

After

image

Design Link

https://www.figma.com/design/1c0Y9jDJe6p0j82jydJDcs/Mobile-Staking?node-id=2187-96037&t=kOEnlk3CXZ727Qjb-1

Storybook Health Check

Storybook is still working after making the withNavigation decorator changes

stake-829-storybook-health-check.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@Matt561 Matt561 changed the title feat: added KeyValueRow to component-library/components-temp DRAFT: feat: added KeyValueRow to component-library/components-temp Sep 18, 2024
@Matt561 Matt561 changed the title DRAFT: feat: added KeyValueRow to component-library/components-temp Draft: feat: added KeyValueRow to component-library/components-temp Sep 18, 2024
@Matt561 Matt561 changed the title Draft: feat: added KeyValueRow to component-library/components-temp feat: added KeyValueRow to component-library/components-temp Sep 18, 2024
@Matt561 Matt561 added team-stake Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 18, 2024
Copy link
Contributor

github-actions bot commented Sep 18, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 3a353a3
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2385d618-f5de-4d93-91ab-edd3a558f789

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Matt561 Matt561 force-pushed the feat/stake-829-create-key-value-row-component branch from 3a353a3 to 1761159 Compare September 18, 2024 21:24
@Matt561 Matt561 force-pushed the feat/stake-829-create-key-value-row-component branch from 333d4e7 to be40200 Compare September 18, 2024 21:32
@Matt561 Matt561 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 18, 2024
Copy link
Contributor

github-actions bot commented Sep 18, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 7b8036c
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/0bcd5df0-709e-4750-b6fa-b083d2bd7a50

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Matt561 Matt561 marked this pull request as ready for review September 18, 2024 22:24
@Matt561 Matt561 requested review from a team as code owners September 18, 2024 22:25
Copy link
Contributor

@brianacnguyen brianacnguyen left a comment

Choose a reason for hiding this comment

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

Can you provide a Figma link in the comment?

@Matt561 Matt561 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 19, 2024
Copy link
Contributor

github-actions bot commented Sep 19, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 120b2b4
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/66d0e771-6f80-4aa2-97a5-bc8227495297

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Matt561
Copy link
Contributor Author

Matt561 commented Sep 19, 2024

Can you provide a Figma link in the comment?

Sure thing! Here's what I used. I don't think it's part of DS yet though.

https://www.figma.com/design/1c0Y9jDJe6p0j82jydJDcs/Mobile-Staking?node-id=2187-96037&t=kOEnlk3CXZ727Qjb-1

@Matt561 Matt561 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 24, 2024
@Matt561 Matt561 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 24, 2024
Copy link
Contributor

github-actions bot commented Sep 24, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: da9d4f4
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b168438f-af66-460b-8071-726dd6b0f598

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 81.25000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 55.95%. Comparing base (b9dbf4d) to head (a4c66f5).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
...omponents-temp/KeyValueRow/KeyValueRow.stories.tsx 0.00% 4 Missing ⚠️
...s-temp/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx 83.33% 2 Missing ⚠️
...ibrary/components-temp/KeyValueRow/KeyValueRow.tsx 83.33% 0 Missing and 2 partials ⚠️
...y/components-temp/KeyValueRow/KeyValueRow.utils.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11294      +/-   ##
==========================================
+ Coverage   55.84%   55.95%   +0.10%     
==========================================
  Files        1594     1607      +13     
  Lines       37855    37974     +119     
  Branches     4545     4597      +52     
==========================================
+ Hits        21142    21250     +108     
- Misses      16214    16218       +4     
- Partials      499      506       +7     
Flag Coverage Δ
55.95% <81.25%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Matt561 Matt561 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 24, 2024
Copy link
Contributor

github-actions bot commented Sep 24, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: a5f3f07
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/7e698b09-e5cb-4d8a-b336-5bdb562b0b30

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Matt561 Matt561 added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 24, 2024
@Matt561 Matt561 removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Sep 24, 2024
Copy link
Contributor

github-actions bot commented Sep 24, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: ad5f60f
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/b075ebb8-75e4-4d6e-a353-fdeb0188d8ee

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@Matt561 Matt561 added the Run Smoke E2E Triggers smoke e2e on Bitrise label Sep 24, 2024
Copy link

@Matt561 Matt561 enabled auto-merge September 24, 2024 21:40
@Matt561 Matt561 added this pull request to the merge queue Sep 24, 2024
Merged via the queue into main with commit a3d8917 Sep 24, 2024
42 checks passed
@Matt561 Matt561 deleted the feat/stake-829-create-key-value-row-component branch September 24, 2024 21:56
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2024
@metamaskbot metamaskbot added the release-7.33.0 Issue or pull request that will be included in release 7.33.0 label Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.33.0 Issue or pull request that will be included in release 7.33.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-stake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants