Skip to content

feat: add route and menu support for axis domain-*#11858

Merged
kgryte merged 14 commits intostdlib-js:refactor/plotfrom
gururaj1512:view-axis-domain-_
May 5, 2026
Merged

feat: add route and menu support for axis domain-*#11858
kgryte merged 14 commits intostdlib-js:refactor/plotfrom
gururaj1512:view-axis-domain-_

Conversation

@gururaj1512
Copy link
Copy Markdown
Member

Resolves None

Description

What is the purpose of this pull request?

This pull request:

  • feat: add route and menu support for axis domain-*
Screen.Recording.2026-04-30.at.2.18.46.PM.mov

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 30, 2026
@gururaj1512
Copy link
Copy Markdown
Member Author

@kgryte, You may see here that domain when set to false is not reflecting the changes. Seems like a bug — I tried to identify the cause but couldn't find it. Needs to be resolved.

@gururaj1512
Copy link
Copy Markdown
Member Author

gururaj1512 commented May 1, 2026

Since the domain property in Vega axes is defined as a static boolean, it behaves as an initialization-time configuration rather than a reactive one.

To address this limitation, a practical workaround is to dynamically set domainOpacity to 0 whenever domain is set to false. This approach ensures the UI behaves smoothly and aligns with expected visual outcomes.

Demo:

Screen.Recording.2026-05-01.at.9.03.36.PM.mov

@kgryte
Copy link
Copy Markdown
Member

kgryte commented May 4, 2026

@gururaj1512 I believe you can go ahead and update this PR now that the domain bug has been addressed.

@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label May 4, 2026
Comment thread lib/node_modules/@stdlib/plot/base/view/lib/browser/app/editor/config/axis.js Outdated
@kgryte
Copy link
Copy Markdown
Member

kgryte commented May 4, 2026

You'll likely need to merge in the latest from the refactor/plot branch and regenerate the bundle.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels May 4, 2026
@gururaj1512
Copy link
Copy Markdown
Member Author

domainDash needs to be yet updated to use comma separated values instead of [].

@gururaj1512 gururaj1512 requested a review from kgryte May 4, 2026 11:32
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 4, 2026
Changed the default domainOpacity value from 0 to 1.

Signed-off-by: Gururaj Gurram <143020143+gururaj1512@users.noreply.github.com>
@kgryte kgryte removed Needs Changes Pull request which needs changes before being merged. Needs Review A pull request which needs code review. labels May 4, 2026
Comment thread lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/config/transforms.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment on lines +61 to +66
'default': [],
'type': 'array',
'items': {
'type': 'number'
},
'minItems': 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this a valid lil gui configuration?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe stated differently, is this the first instance of us adding a configuration like this?

Copy link
Copy Markdown
Member

@kgryte kgryte May 4, 2026

Choose a reason for hiding this comment

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

Did a look through the code; I believe this is a first. I am guessing you are basing this off of JSON schema?

I am curious what is the larger context and how are you envisioning this will be used, as the "type", "items", and "minItems" fields are not immediately applicable to, e.g., lilgui.

Copy link
Copy Markdown
Member

@kgryte kgryte May 4, 2026

Choose a reason for hiding this comment

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

Notice how, for the other configurations, such as domainOpacity, the default value, along with min and max are directly applicable to a "slider" UI element.

In this case, I am not sure how the items and minItems fields have direct application to UI elements, but maybe you have a larger vision.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeh, they were placed from POV of JSON schema. They can be removed.

Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/config/transforms.js Outdated
Comment thread lib/node_modules/@stdlib/plot/base/view/lib/browser/routes/config/transforms.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte kgryte added the Needs Discussion Needs further discussion. label May 4, 2026
Signed-off-by: Gururaj Gurram <143020143+gururaj1512@users.noreply.github.com>
@gururaj1512 gururaj1512 requested a review from kgryte May 5, 2026 21:14
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 5, 2026
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/plot/vega/editor-config/axis/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Copy link
Copy Markdown
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

LGTM

@kgryte
Copy link
Copy Markdown
Member

kgryte commented May 5, 2026

As the CI failure is expected, I'll go ahead and merge.

@kgryte kgryte merged commit c9056c3 into stdlib-js:refactor/plot May 5, 2026
9 of 11 checks passed
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue or pull request for adding a new feature. Needs Discussion Needs further discussion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants