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

[channel-slider] Don't throw on unknown channels when working with defaultValue #46

Closed
wants to merge 1 commit into from

Conversation

DmitrySharabin
Copy link
Collaborator

We face this issue when we try to set space programmatically (e.g., in <color-picker>).

Copy link

netlify bot commented May 20, 2024

Deploy Preview for color-elements ready!

Name Link
🔨 Latest commit 180178b
🔍 Latest deploy log https://app.netlify.com/sites/color-elements/deploys/664b342ffb33b00008b20d84
😎 Deploy Preview https://deploy-preview-46--color-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@DmitrySharabin DmitrySharabin changed the title [channel-slider] Don't throw on unknown channels when working with defaultValue [channel-slider] Don't throw on unknown channels when working with defaultValue May 20, 2024
@DmitrySharabin DmitrySharabin mentioned this pull request May 20, 2024
@DmitrySharabin
Copy link
Collaborator Author

<color-picker> works correctly (after merging #47) even if this PR is not merged. The only thing that might be a bit annoying is that we have errors in the console when setting space on <color-picker> programmatically.

image

Copy link
Member

@LeaVerou LeaVerou left a comment

Choose a reason for hiding this comment

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

Approving since this is an improvement over the current state but do note that this could become a problem if down the line other props depend on defaultValue.
Also, does this produce better results than simply returning 0? (besides being right about 1/3rd of the time) If we just need a value that doesn't have dependencies, 0 seems to fit the bill.

@DmitrySharabin
Copy link
Collaborator Author

Nah. Let's not merge it if it's not good enough. We'll find a better solution. :)

@DmitrySharabin DmitrySharabin deleted the channel-slider-default-value branch June 5, 2024 16:21
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.

None yet

2 participants