-
Notifications
You must be signed in to change notification settings - Fork 36
Feature/Positron Editor Action Bar integration for Source / Visual toggle and [X] Render on Save checkbox #698
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
Feature/Positron Editor Action Bar integration for Source / Visual toggle and [X] Render on Save checkbox #698
Conversation
…render.renderOnSaveShiny
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- apps/vscode/package.json: Language not supported
- package.json: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! 🙌 Thank you so much for taking a look at how this plays out over in extension land.
With the change I made in 53a50e0, this PR now closes #692. ✅
I want to highlight that there is some existing behavior that was already bad that now feels a bit worse, with the toggle between source and visual mode so prominently displayed now. If you have a document that specifies editor: visual
in the YAML front matter and you are currently editing in visual mode, using any of our affordances to switch back to source editing does not work; you stay in visual mode. RStudio behaves in what I would consider the correct way; in this situation, if you switch the toggle, the editor switches to source mode. Do you think any of this new work could be used to fix that in this PR? Or should we open a followup issue to make that better?
One other question for you @softwarenerd: If I open a Quarto file for the first time, the "Preview" button with its label shows up immediately, but the other two new controls take ~5 sec to show up. Is there anything we can do about that? action-bar.mov |
I will continue to look into this. From everything I know at this point, this delay may be inherent in the startup of the extension. We draw these new components on the Editor Action Bar the moment they show up in React-land with a context key expression we can evaluate so we can determine how to draw them. |
I will look into this. I wasn't aware of the If the |
…ub.com:quarto-dev/quarto into feature/positron-editor-action-bar-integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to go! I'll double check we open followup issues on:
- switching from visual mode when you are in visual mode
- the new UI arriving later than the "Preview" button
I opened posit-dev/positron#7304 to explore further improvements in how these new UI affordances show up. |
I opened posit-dev/positron#7305 for us to resolve the problem around switching to source mode if you are in visual mode. |
This PR updates the Quarto extension so that it places two new controls on the Positron Editor Action Bar. Those controls are:
Here's a video that shows these controls in action:
Screen.Recording.2025-04-16.at.3.19.55.PM.mov
The Source / Visual toggle control is quite straightforward.
The Render on Save checkbox control appears when a Quarto or Quarto Shiny document is open and it allows the user to independently override the configuration settings for Quarto > Render: Render on Save and Quarto > Render: Render on Save Shiny, depending on the document type, in the current editing session.