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

Improve performance of settings dialog: remove connect statement from… #518

Merged
merged 4 commits into from
Sep 25, 2018

Conversation

bruce-binary
Copy link
Contributor

… connect method

  • Split SettingDialogStore components
  • bug fix: updates object incorrect with 'numbercolorpicker' form type

… connect method

 + Split SettingDialogStore components
 + bug fix: updates object incorrect with 'numbercolorpicker' form type
Copy link
Contributor

@shayan-binary shayan-binary left a comment

Choose a reason for hiding this comment

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

All Look good, just a one suggestion

for (const { id, category, value, type } of items) {
if (type === 'numbercolorpicker'
? (study[category][`${id}Color`] !== value.Color
|| study[category][`${id}Value`] !== value.Value)
Copy link
Contributor

Choose a reason for hiding this comment

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

@brucebinary these two much inline conditions, doesn't it confusing?

isChanged = study[category][id] !== value;
}

if (isChanged) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shayanbinary this better?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah much better 👍

Copy link
Contributor

@shayan-binary shayan-binary left a comment

Choose a reason for hiding this comment

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

LGTM

isChanged = study[category][id] !== value;
}

if (isChanged) {
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah much better 👍

@bruce-binary bruce-binary merged commit dbac0f3 into deriv-com:dev Sep 25, 2018
@bruce-binary bruce-binary deleted the settings-dialog-performance branch September 25, 2018 09:24
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.

2 participants