Skip to content

Avoid looping behavior with color selection #305

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

Merged
merged 1 commit into from
Jul 25, 2021
Merged

Conversation

henryksloan
Copy link
Contributor

@henryksloan henryksloan commented Jul 25, 2021

Fixes #304

  • Removed watch declarations for swatch colors
  • Allow response handler to update frontend colors
    • This was previously handled by the update methods through watch, causing loopy pitfalls
  • Refactor frontend color updates to a update_working_colors helper function
  • Update frontend color updates when SelectPrimaryColor or SelectSecondaryColor is called

This change is Reviewable

@henryksloan henryksloan requested review from Keavon and TrueDoctor July 25, 2021 05:48
Copy link
Member

@Keavon Keavon left a comment

Choose a reason for hiding this comment

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

Excellent! I'm going to try and go through most of our input widgets and update them to use the @update:foo="handlerFunction" approach instead of using watchers, which is clearly a dangerous approach (it gave me hours of troubles with the dropdown menu widget also). Thanks for fixing this.

@henryksloan henryksloan merged commit 4453297 into master Jul 25, 2021
@henryksloan henryksloan deleted the safe-color-select branch July 25, 2021 06:31
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.

Frontend color selection response is prone to infinite loops
2 participants