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

[DDW-423] Finish ETC code cleanup #1108

Merged
merged 24 commits into from
Oct 5, 2018

Conversation

thedanheller
Copy link
Contributor

This PR finishes the ETC code cleanup

Note: The second commit removes the isAdaApi and any other if the API is ADA.


Review Checklist:

Basics

  • PR is updated to the most recent version of target branch (and there are no conflicts)
  • PR has good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub
  • Automated tests: All acceptance tests are passing (yarn run test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn run dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn run package / CI builds)
  • There are no flow errors or warnings (yarn run flow:test)
  • There are no lint errors or warnings (yarn run lint)
  • Text changes are proofread and approved (Jane Wild)
  • There are no missing translations (running yarn run manage:translations produces no changes)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn run storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly documented and commented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-rendering
  • Any code that only works in Electron is neatly separated from components

Testing

  • New feature / change is covered by acceptance tests
  • All existing acceptance tests are still up-to-date
  • New feature / change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review:

  • Merge PR
  • Delete source branch
  • Move ticket to done on the Youtrack board

@thedanheller thedanheller added bug and removed feature labels Oct 3, 2018
@nikolaglumac nikolaglumac changed the title [DDW-423] finish etc code cleanup [DDW-423] Finish ETC code cleanup Oct 3, 2018
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Great work @daniloprates!
I have left you some comments and also I think we should reorganize some of the files - e.g. we still have ada subdirectory under source/renderer/app/actions and source/renderer/app/stores. Those should be eliminated / merged with other files from the parent directory. This will result in different structure - we will finally be able to get rid of the ada namespace and thus we will no longer have stores.ada.wallets but stores.wallets (should be the same for the actions)...

@@ -24,7 +24,7 @@ const environment = Object.assign({
TEST: 'test',
PRODUCTION: 'production',
NETWORK: process.env.NETWORK || 'development',
API: process.env.API || 'ada',
API: 'ada',
Copy link
Contributor

Choose a reason for hiding this comment

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

@daniloprates I think we can remove this line as it is no longer used in the code.

!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);
const apiLogoStyles = classNames([
styles[`${environment.API}-apiLogo`],
styles['ada-logo'],
Copy link
Contributor

Choose a reason for hiding this comment

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

@daniloprates here you used ada-logo and it should be ada-apiLogo...

@@ -69,7 +68,7 @@ export default class TermsOfUseForm extends Component<Props, State> {
isSubmitting ? styles.submitButtonSpinning : styles.submitButton,
]);

const checkboxLabel = environment.isEtcApi() ? 'checkboxLabelWithDisclaimer' : 'checkboxLabel';
const checkboxLabel = 'checkboxLabel';
Copy link
Contributor

Choose a reason for hiding this comment

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

@daniloprates we don't need this variable any longer - we can now use directly messages. checkboxLabel

} = environment;

const apiName = intl.formatMessage(environmentSpecificMessages[API].apiName);
const apiName = intl.formatMessage(environmentSpecificMessages.ada.apiName);
Copy link
Contributor

Choose a reason for hiding this comment

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

@daniloprates we no longer need environmentSpecificMessages as we are using only ADA now. Please move all those messages under globalMessages (which means they will still be in the same file but just in the default export).

@nikolaglumac
Copy link
Contributor

@daniloprates I have added the WIP tag - please remove it once the code is ready to be reviewed again. Thanks!

@thedanheller thedanheller removed the WIP label Oct 4, 2018
@thedanheller
Copy link
Contributor Author

@nikolaglumac

@nikolaglumac
Copy link
Contributor

@daniloprates there are some flow issues - can you please fix those?

@nikolaglumac nikolaglumac dismissed their stale review October 4, 2018 15:20

Outdated review

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

@daniloprates can you please merge the Ada specific stores into the generic ones? We should no longer need to have one WalletStore and then AdaWalletStore which extends it. It should only be WalletStore which contains merged code from both of these. The same rule should be applied to the others stores as well. Thanks!

@nikolaglumac
Copy link
Contributor

@daniloprates I have added some code style imporvements. The last part to be done in this PR is to merge the ADA specific stores to the generic ones (like stated in my review).

@nikolaglumac
Copy link
Contributor

@daniloprates I have added the WIP tag now. Please remove it once ready to be merged again.

@thedanheller
Copy link
Contributor Author

@nikolaglumac

@thedanheller thedanheller removed the WIP label Oct 5, 2018
@nikolaglumac nikolaglumac dismissed their stale review October 5, 2018 11:49

Outdated review

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@nikolaglumac nikolaglumac merged commit 4073037 into develop Oct 5, 2018
@nikolaglumac nikolaglumac deleted the fix/ddw-423-finish-etc-code-cleanup branch October 5, 2018 14:37
This was referenced Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants