quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
282 stars 20 forks source link

Persist "Edit in Visual Mode" mode for Quarto documents regardless of save state #477

Open coatless opened 5 days ago

coatless commented 5 days ago

Steps to reproduce the issue:

  1. Install the Quarto Extension
  2. Install the Quarto CLI standalone v1.4.557
  3. New File -> Quarto Document
    • Do not save the file.
  4. Click on the ... inside the editor with the Quarto document
  5. Notice a missing "Edit in Visual Mode"
  6. Save the file
  7. Re-click on the ... inside the editor with the Quarto document
  8. Notice "Edit in Visual Mode" is now present

What did you expect to happen?

I expected the listed options to be the same under the ... regardless of whether the file was saved or not.

VS Code

Untitled /Not saved

Quarto document file in VS Code that is not saved to disk and it's missing 'Edit in Visual Mode' option from `...`

Saved

Quarto document file in VS Code saved to disk and the 'Edit in Visual Mode' option is now present in the `...` menu

Positron

Untitled /Not saved

Quarto document file in Positron IDE that is not saved to disk and it's missing 'Edit in Visual Mode' option from `...`

Saved

Quarto document file in Positron IDE saved to disk and the 'Edit in Visual Mode' option is now present in the `...` menu
cscheid commented 5 days ago

Thanks - we hear you, and it's a real bug. I think we have this bug tracked somewhere on posit-dev/positron.

jjallaire commented 4 days ago

It's not a bug (it's by design). We need a filesystem context for several of the visual editor features so we include this limitation (there may be actually more to it than that, I don't recall, but I do know that this is very much on purpose, see https://github.com/quarto-dev/quarto/blob/main/apps/vscode/package.json#L472)

cscheid commented 4 days ago

@jjallaire thanks for the correction. Do you think there's something in our UI that we could do better to clarify this?

I expected the preview button (a "rendering feature") to require a saved file, but not an editing feature.

jjallaire commented 4 days ago

We could allow the command and then show an explanatory error?

I agree that even given the constraint the current UX is pretty bad. I don’t recall if this was satisficing or something more fundamental.

On Mon, Jul 1, 2024 at 6:09 PM Carlos Scheidegger @.***> wrote:

@jjallaire https://github.com/jjallaire thanks for the correction. Do you think there's something in our UI that we could do better to clarify this?

I expected the preview button (a "rendering feature") to require a saved file, but not an editing feature.

— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto/issues/477#issuecomment-2201163016, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZPR4ZGJRF7ZAJXO7SSVLZKHHSZAVCNFSM6AAAAABKGE4F3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBRGE3DGMBRGY . You are receiving this because you were mentioned.Message ID: @.***>