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

Patch for datawrapperswitching #130

Merged
merged 3 commits into from
Jan 10, 2025
Merged

Conversation

aleszu
Copy link
Contributor

@aleszu aleszu commented Jan 8, 2025

What's in this pull request

  • Bug fix
  • New component/feature
  • Component update
  • Documentation update
  • Patch

Description

Patch: DatawrapperSwitching story to wrap the bottom block in if instead of key.

Before submitting, please check that you've

  • Formatted your code correctly (i.e., prettier cleaned it up)
  • Documented any new components or features
  • Added any changes in this PR to the CHANGELOG.md Next section
  • If this pull request includes a new component or feature, has it been exported from one of the library's entry points?
  • Does the component dispatch relevant interaction events? (ie: on:click, on:change, etc.)
  • Does the component directory include description and usage information in .stories.svelte?

@benkates
Copy link
Contributor

benkates commented Jan 9, 2025

I think I remember this being required to make sure the DW iframes render correctly based on dropdown, are you getting a bad user experience using 'key'? How does that differ from 'if'?

Discussion on Slack: throwing error with key

Both the simple and the more complex exmamples on this page now work as
expected.

Updated the example code to more closely match the stories themselves as
well.
@mitchthorson
Copy link
Contributor

Posting this for posterity: @benkates {#if} seems to work just as well for the simple examples, but not as well for the one wrapped in the loader. there we might need both. I'm pushing the results of my experimentation here after chatting with @aleszu.

I also noticed a few places where the code example strings differed slightly from the actual code in the story and synced everything up a bit more.

@mitchthorson mitchthorson merged commit 7259b8b into main Jan 10, 2025
1 check passed
@mitchthorson mitchthorson deleted the patch_datawrapperswitching branch January 10, 2025 21:59
@mitchthorson mitchthorson restored the patch_datawrapperswitching branch January 10, 2025 21:59
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.

3 participants