Skip to content

[Preview] Fix missing view labels in overlay#8260

Open
heathdutton wants to merge 2 commits intonasa:masterfrom
heathdutton:7712
Open

[Preview] Fix missing view labels in overlay#8260
heathdutton wants to merge 2 commits intonasa:masterfrom
heathdutton:7712

Conversation

@heathdutton
Copy link

Closes #7712

Describe your changes:

PR #7632 changed the preview header to pass the view instance instead of the view provider to ViewSwitcher and NotebookMenuSwitcher. The view instance (returned by provider.view()) doesn't carry name, cssClass, or key -- those live on the provider. This caused blank labels in the view switcher dropdown when previewing historical data.

This fix passes the view provider separately for display purposes, while keeping the view instance for the action collection watcher which needs it.

Also fixes :v-if (prop binding, always renders) to v-if (directive, conditionally renders) on the ViewSwitcher.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

The preview header was passing the view instance to
ViewSwitcher and NotebookMenuSwitcher, but both
components need the view provider which carries the
name, cssClass, and key properties. Pass the view
provider separately for display purposes.

Also fixes incorrect :v-if prop binding that should
be a v-if directive on the ViewSwitcher.

Closes nasa#7712
Copilot AI review requested due to automatic review settings February 12, 2026 22:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes missing view labels in the preview overlay that were introduced by PR #7632. The previous change passed view instances instead of view providers to UI components, but view instances don't carry display metadata like name, cssClass, or key.

Changes:

  • Adds a separate currentViewProvider prop to preserve view provider data for display purposes
  • Fixes incorrect :v-if prop binding to proper v-if directive in ViewSwitcher
  • Maintains the view instance for ActionCollection functionality while passing the provider for display

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/ui/preview/PreviewHeader.vue Adds currentViewProvider prop and passes it to ViewSwitcher and NotebookMenuSwitcher; fixes :v-if to v-if
src/ui/preview/PreviewContainer.vue Passes the view provider to PreviewHeader via new current-view-provider prop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

No view labels in historical data action view

2 participants