Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

fix: trigger advanced mode confirmation and use defaults #2555

Merged
merged 15 commits into from
Jul 30, 2020

Conversation

brenopolanski
Copy link
Contributor

@brenopolanski brenopolanski commented Jul 29, 2020

Summary

  • Update title to Profile Settings
  • Trigger advanced mode modal
  • Populate profile settings with data

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@ghost ghost added Complexity: Medium Less than 256 lines changed. Type: Refactor The pull request improves or enhances an existing implementation. labels Jul 29, 2020
@brenopolanski brenopolanski marked this pull request as draft July 29, 2020 21:07
@brenopolanski brenopolanski marked this pull request as ready for review July 30, 2020 01:48
@codecov
Copy link

codecov bot commented Jul 30, 2020

Codecov Report

Merging #2555 into 3.0-react will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           3.0-react     #2555     +/-   ##
=============================================
  Coverage     100.00%   100.00%             
=============================================
  Files             24       254    +230     
  Lines            142      2825   +2683     
  Branches          18       504    +486     
=============================================
+ Hits             142      2825   +2683     
Flag Coverage Δ
#unit 100.00% <100.00%> (?)

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

Impacted Files Coverage Δ
src/app/components/Button/Button.tsx 100.00% <ø> (ø)
src/app/components/Card/CardControl.tsx 100.00% <ø> (ø)
src/app/App.tsx 100.00% <100.00%> (ø)
src/app/components/Address/Address.tsx 100.00% <100.00%> (ø)
src/app/components/Alert/Alert.tsx 100.00% <100.00%> (ø)
src/app/components/Avatar/Avatar.tsx 100.00% <100.00%> (ø)
src/app/components/Badge/Badge.tsx 100.00% <100.00%> (ø)
src/app/components/Breadcrumbs/Breadcrumbs.tsx 100.00% <100.00%> (ø)
src/app/components/Card/Card.tsx 100.00% <100.00%> (ø)
src/app/components/Checkbox/Checkbox.tsx 100.00% <100.00%> (ø)
... and 276 more

Continue to review full report at Codecov.

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

Copy link
Contributor

@faustbrian faustbrian left a comment

Choose a reason for hiding this comment

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

Values that use Select are not prefilled with a default.

@brenopolanski
Copy link
Contributor Author

@faustbrian i will add it

@@ -266,7 +266,9 @@ export const General = ({ env, formConfig, onSubmit }: GeneralProps) => {
}).toString(),
})}
options={PlatformSdkChoices.passphraseLanguages}
defaultValue={activeProfile?.settings().get(ProfileSetting.Bip39Locale)}
defaultValue={
activeProfile?.settings().get(ProfileSetting.Bip39Locale) || "english"
Copy link
Contributor

Choose a reason for hiding this comment

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

Those defaults shouldn't be handled here, they should be set when a profile is created.

The issue I reported with the defaults/values not being filled happens when you save your settings and reload the wallet. The values exist but the Select doesn't seem to be using them. Testing this requires to change the storage driver to indexeddb because the yarn dev command will use an in-memory storage without persistence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahhh make sense now.. i saw that you added these default values here: 110939c

I will remove my default values

@faustbrian faustbrian changed the title refactor: profile settings tweaks fix: trigger advanced mode confirmation and use defaults Jul 30, 2020
@faustbrian faustbrian merged commit 2c9e1fb into 3.0-react Jul 30, 2020
@ghost ghost deleted the refactor/profile-settings branch July 30, 2020 04:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Complexity: Medium Less than 256 lines changed. Type: Refactor The pull request improves or enhances an existing implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants