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: use array for single item valueRefs in conditional if test exists #9361

Merged
merged 4 commits into from
May 31, 2024

Conversation

richardliu-db
Copy link
Contributor

PR Description

In this change to conditional.ts, we use object instead of array if there is a single value. But I found that test must be in an array form otherwise Vega doesn't recognize it.

This PR is to fix this issue -- always use array form if test exists, even if there is only a single item.

Array
image

Object
image

Checklist

  • This PR is atomic (i.e., it fixes one issue at a time).
  • The title is a concise semantic commit message (e.g. "fix: correctly handle undefined properties").
  • yarn test runs successfully
  • For new features:
    • Has unit tests.
    • Has documentation under site/docs/ + examples.

Tips:

@richardliu-db richardliu-db requested a review from a team as a code owner May 30, 2024 22:51
@richardliu-db richardliu-db requested a review from kanitw May 30, 2024 22:51
@richardliu-db richardliu-db force-pushed the richardliu-db/fix-conditional-test branch 3 times, most recently from a987edd to 31171f0 Compare May 31, 2024 18:35
Copy link

cloudflare-workers-and-pages bot commented May 31, 2024

Deploying vega-lite with  Cloudflare Pages  Cloudflare Pages

Latest commit: fbdb55b
Status:🚫  Build failed.

View logs

@richardliu-db richardliu-db force-pushed the richardliu-db/fix-conditional-test branch from 0e37890 to 891da8e Compare May 31, 2024 20:10
@richardliu-db richardliu-db force-pushed the richardliu-db/fix-conditional-test branch from b829053 to dc4c580 Compare May 31, 2024 20:19
@kanitw kanitw merged commit 64201d6 into main May 31, 2024
9 checks passed
@kanitw kanitw deleted the richardliu-db/fix-conditional-test branch May 31, 2024 22:29
@domoritz
Copy link
Member

domoritz commented Jun 1, 2024

Isn't this a workaround an issue in Vega?

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