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

Core: Support null and undefined in URL args #14049

Merged
merged 8 commits into from
Feb 26, 2021
Merged

Core: Support null and undefined in URL args #14049

merged 8 commits into from
Feb 26, 2021

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Feb 25, 2021

Issue: -

What I did

This adds support for null and undefined arg values, so that removing an object property or array value in a JSON value will get properly synced to/from the URL.

Additionally, this fixes encoding of the space character as + rather than %20.

How to test

  • Is this testable with Jest or Chromatic screenshots? no
  • Does this need a new example in the kitchen sink apps? no
  • Does this need an update to the documentation? no

If your answer is yes to any of these, please make sure to include it in your PR.

@ghengeveld ghengeveld changed the title Support null and undefined in URL args [core] Support null and undefined in URL args Feb 25, 2021
@ghengeveld ghengeveld added core maintenance User-facing maintenance tasks bug and removed maintenance User-facing maintenance tasks labels Feb 25, 2021
Copy link

@coderkevin coderkevin left a comment

Choose a reason for hiding this comment

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

Just a few optional comments on this. In general, it looks good to me! 👍

lib/client-api/src/args.ts Outdated Show resolved Hide resolved
lib/client-api/src/args.ts Outdated Show resolved Hide resolved
lib/client-api/src/args.ts Outdated Show resolved Hide resolved
lib/core-client/src/preview/parseArgsParam.ts Outdated Show resolved Hide resolved
lib/core-client/src/preview/parseArgsParam.ts Show resolved Hide resolved
lib/router/src/utils.ts Outdated Show resolved Hide resolved
lib/router/src/utils.ts Outdated Show resolved Hide resolved
lib/client-api/src/args.ts Outdated Show resolved Hide resolved
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants