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(wallet): improve component imports #1743

Merged
merged 14 commits into from
Aug 14, 2024

Conversation

panteleymonchuk
Copy link
Contributor

Description of change

Please write a summary of your changes and why you made them.

Links to any relevant issues

Closes #1704

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
@panteleymonchuk panteleymonchuk added the tooling Issues related to the Tooling team label Aug 9, 2024
Copy link
Member

@begonaalvarezd begonaalvarezd left a comment

Choose a reason for hiding this comment

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

Just submitting a quick review before this PR grows bigger 🙏🏼
The original issue was open just to create an index for components which is missing and update those imports so you can import like import { CompA, CompB, ...} from blabla instead of having 1 line per component like now.

I would not get into refactoring more imports for now, refactoring imports can escalate a lot, lets try to narrow the task to the only refactor described in the issue 🙏🏼

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
…/improve-components-imports

# Conflicts:
#	apps/wallet/src/ui/app/components/accounts/ImportPrivateKeyForm.tsx
#	apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx
#	apps/wallet/src/ui/app/pages/accounts/ImportPassphrasePage.tsx
#	apps/wallet/src/ui/app/pages/accounts/ImportPrivateKeyPage.tsx
#	apps/wallet/src/ui/app/pages/accounts/ProtectAccountPage.tsx
#	apps/wallet/src/ui/app/pages/approval-request/transaction-request/index.tsx
#	apps/wallet/src/ui/app/shared/forms/FormField.tsx
@panteleymonchuk panteleymonchuk marked this pull request as ready for review August 13, 2024 09:59
@panteleymonchuk panteleymonchuk requested review from a team as code owners August 13, 2024 09:59
Copy link
Contributor

@marc2332 marc2332 left a comment

Choose a reason for hiding this comment

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

What about imports like import { Button } from '../../../shared/ButtonUI'; ?

@evavirseda
Copy link
Contributor

What about imports like import { Button } from '../../../shared/ButtonUI'; ?

it seems that we could do it in another PR, 121 files are enough for this one I think :trollface:

@marc2332
Copy link
Contributor

What about imports like import { Button } from '../../../shared/ButtonUI'; ?

it seems that we could do it in another PR, 121 files are enough for this one I think :trollface:

The task can't be closed then. Or a new one needs to be opened. Still, I would just do it in this PR, up to you @panteleymonchuk I guess

@panteleymonchuk
Copy link
Contributor Author

The task can't be closed then. Or a new one needs to be opened. Still, I would just do it in this PR

I calculated only ~9 places with ButtonUI imports as relative path.
However, tasks is about components folder only, so let's keep refactoring of ButtonUI for later

@marc2332
Copy link
Contributor

marc2332 commented Aug 13, 2024

The task can't be closed then. Or a new one needs to be opened. Still, I would just do it in this PR

I calculated only ~9 places with ButtonUI imports as relative path. However, tasks is about components folder only, so let's keep refactoring of ButtonUI for later

Seems like we have a different understanding about the task, but it doesn't matter as I am not the one doing it 😄 Let's leave the changes related to shared to another task 💯

@marc2332 marc2332 self-requested a review August 13, 2024 11:31
…/improve-components-imports

# Conflicts:
#	apps/wallet/src/ui/app/pages/accounts/ImportSeedPage.tsx
@begonaalvarezd begonaalvarezd changed the title feat(wallet): Improve component imports. refactor(wallet): improve component imports Aug 14, 2024
@begonaalvarezd begonaalvarezd merged commit 18cbfd7 into develop Aug 14, 2024
23 checks passed
@begonaalvarezd begonaalvarezd deleted the tooling-wallet/improve-components-imports branch August 14, 2024 16:45
bingyanglin pushed a commit that referenced this pull request Aug 19, 2024
* feat(wallet): Improve component imports.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat(wallet): improve imports.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat(wallet): revert not '_component' imports.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat(wallet): Change import to '_components'.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat(wallet): Change import to '_components'. Update after merge.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat(wallet): Update imports after merge develop. Fix PR comments.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* feat(wallet): Fixes after merge.

Signed-off-by: Eugene Panteleymonchuk <[email protected]>

* fix: import

---------

Signed-off-by: Eugene Panteleymonchuk <[email protected]>
Co-authored-by: Mario <[email protected]>
Co-authored-by: Begoña Alvarez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Issues related to the Tooling team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task (tooling/wallet): improve components imports
5 participants