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

refactor(app, components): parametersTable moved to Components dir for PL #14734

Merged
merged 5 commits into from
Mar 26, 2024

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Mar 26, 2024

closes AUTH-240

Overview

This PR moves the parameters desktop app table and empty state from the app directory to the components directory and also moves the formate value util to shared data

Test Plan

In the desktop app, check the protocol details parameters tab and make sure it renders as expected

Changelog

  • pull the table out into its own folder in the components directory: parametersTable and move the no parameters component in that folder as well
  • add tests
  • move the format value util to Shared-data and fix all instances of it
  • pass down an optional t as a prop for the app since it uses i18n but PL does not

Review requests

see test plan

Risk assessment

low

@jerader jerader requested a review from a team as a code owner March 26, 2024 13:40
@jerader jerader requested review from mjhuff, koji, y3rsh and a team and removed request for a team and mjhuff March 26, 2024 13:40
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.18%. Comparing base (29414e2) to head (6aa54d4).
Report is 5 commits behind head on edge.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #14734   +/-   ##
=======================================
  Coverage   67.18%   67.18%           
=======================================
  Files        2495     2495           
  Lines       71651    71651           
  Branches     9075     9075           
=======================================
  Hits        48140    48140           
  Misses      21367    21367           
  Partials     2144     2144           
Flag Coverage Δ
shared-data 75.93% <ø> (ø)

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

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

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

can the folder be named ParametersTable to match the current pattern (see CheckboxField)

@jerader
Copy link
Collaborator Author

jerader commented Mar 26, 2024

can the folder be named ParametersTable to match the current pattern (see CheckboxField)

@shlokamin oh ya, i was following the other folders at the src level in components and saw they were all camel case like tabbedNav. I will capitalize the P though!


interface NoParametersProps {
t?: any
Copy link
Contributor

Choose a reason for hiding this comment

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

if the type in utils.test.ts, probably using that instead of any would be good.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the type of t comes from useTranslation but components doesn't have i18Next as a dependency, so i left it typed as any. Idk if there are any better methods? Do you have suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

at this moment no, I will keep an eye on that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cool thanks, same here. I also don't like typing it as any but i'm not sure how else to do it so the app is still translated.

Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

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

lgtm

@jerader jerader merged commit 1b28bab into edge Mar 26, 2024
57 checks passed
@jerader jerader deleted the app_move-parameters-table-to-components branch March 26, 2024 18:54
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.

3 participants