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

fix: Update plot color in theme_generator.py #1971 #1972

Merged
merged 2 commits into from
May 11, 2023
Merged

Conversation

marek-mihok
Copy link
Contributor

@marek-mihok marek-mihok commented May 11, 2023

This PR fixes a bug introduced by this commit where plot listens only for meta.theme changes but not for meta.themes when updating colors.

Screen.Recording.2023-05-11.at.11.41.18.mov

Closes #1971

Copy link
Collaborator

@mturoci mturoci left a comment

Choose a reason for hiding this comment

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

Thanks @marek-mihok.

Wouldn't listening on both theme and themes within the same listener suffice?

themeWatchRef.current = on(themeB, themesB, () => {

@marek-mihok
Copy link
Contributor Author

themeWatchRef.current = on(themeB, themesB, () => {

This is what I was looking for! Thanks, @mturoci . I must have overlooked somehow that the on handler supports subscription to multiple boxes.

/** Subscribe to changes in 2 Boxes. */
export function on<A, B>(a: Box<A>, b: Box<B>, f: Eff2<A, B>): Disposable;

Done.

@marek-mihok marek-mihok requested a review from mturoci May 11, 2023 10:00
@mturoci mturoci merged commit ca11f01 into master May 11, 2023
@mturoci mturoci deleted the feat/issue-1971 branch May 11, 2023 10:01
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.

Plot color is not updating in theme_generator.py
2 participants