Skip to content

Add Viewer history navigation - #15090

Closed
linem7 wants to merge 1 commit into
posit-dev:mainfrom
linem7:viewer-history-navigation
Closed

linem7 wants to merge 1 commit into
posit-dev:mainfrom
linem7:viewer-history-navigation

Conversation

@linem7

@linem7 linem7 commented Jul 23, 2026

Copy link
Copy Markdown

Fixes #8647.

Viewer output now remains available for the lifetime of the current window instead of each generated HTML page replacing the previous one. The HTML and notebook-renderer toolbars include previous/next buttons for moving through the in-memory output list. URL previews keep their existing browser navigation behavior.

Release Notes

New Features

  • Added previous and next navigation for Viewer output generated in the current project window.

Bug Fixes

  • N/A

Validation Steps

  1. Generate two HTML Viewer outputs, such as two reactable tables.
  2. Confirm the newest output is shown.
  3. Use the left and right buttons to move between both outputs.
  4. Confirm Clear removes the output history.

Validated locally with:

  • npm run compile-check-ts-native
  • npx vitest run src/vs/workbench/contrib/positronPreview/test/electron-browser/positronPreviewService.vitest.ts

@github-actions

github-actions Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@linem7

linem7 commented Jul 23, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@linem7

linem7 commented Jul 23, 2026

Copy link
Copy Markdown
Author

recheck

@linem7
linem7 marked this pull request as ready for review July 27, 2026 04:58
@juliasilge
juliasilge requested a review from jmcphers July 30, 2026 18:08

@jmcphers jmcphers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This change overloads the arrows in a somewhat confusing way. Try this:

  1. Create 3 HTML widgets
  2. Press Back so that you're in the middle of the history. In this context, Back works to return the Viewer to a previous output.
  3. Start a Shiny app (e.g. shiny::runExample("01_hello"))
  4. Press Back again. Nothing happens.

This is because the arrows have changed meaning; with a URL open the Viewer now uses the arrows to navigate the content in the viewer, rather than between things you have loaded into the Viewer pane itself.

If you stop the Shiny app and make another widget, the arrows "work" again, but I think it's too confusing to overload them in this way.

@juliasilge

Copy link
Copy Markdown
Member

Let us know if you are interested in taking another stab at this!

@juliasilge juliasilge closed this Oct 9, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide history for HTML widgets like gt()

3 participants