positron icon indicating copy to clipboard operation
positron copied to clipboard

Two preview buttons appear for `.rmd` files

Open softwarenerd opened this issue 7 months ago • 2 comments

Description

When you open a .rmd file in Positron, you will notice that the Editor Action Bar will show two preview buttons.

Image

  When you open a .qmd file, this is not the case:

Image

System details:

Positron and OS details:

Dev latest. macOS latest.

Interpreter details:

  • N/A

Describe the issue:

When you open a .rmd file in Positron, you will notice that the Editor Action Bar will show two preview buttons.

Image

Steps to reproduce the issue:

  1. Open a .qmd file.
  2. Review the buttons on the Editor Action Bar. Notice that Preview appears twice.

Expected or desired behavior:

There should be on Preview button on the Editor Action Bar.

Were there any error messages in the UI, Output panel, or Developer Tools console?

No.

QA Notes

See https://github.com/posit-dev/positron/pull/7853 for an e2e test work around. Once this is fixed, we should probably revert this and get rid of the .nth(0)

softwarenerd avatar May 27 '25 17:05 softwarenerd

We need to update this to go on the left side now:

https://github.com/posit-dev/positron/blob/276cdf2c4f4b7c3584cfb7e3375a3d9494057254/extensions/positron-r/package.json#L636

The same PR should probably also bump the version of the Quarto extension so we for sure have the version with the preview button on the left.

juliasilge avatar May 27 '25 18:05 juliasilge

It is also the case with .md file

ntluong95 avatar May 27 '25 18:05 ntluong95

I do not observe this in a regular .md file. Can you say more about that, @ntluong95?

juliasilge avatar May 29 '25 16:05 juliasilge

It is the button next to the left of the button "Split Editor Right". It is the button coming from "Markdown" extension bundled by Vscode

ntluong95 avatar May 29 '25 17:05 ntluong95

Can you share a screenshot of what you observe for a regular .md file, @ntluong95? Here is what I see:

Image

juliasilge avatar May 29 '25 17:05 juliasilge

This is what I see from my computer

Image

ntluong95 avatar May 29 '25 17:05 ntluong95

Looks like the icon set you are using happens to have the same icon for "Open Preview to the Side" and "Preview". In the default icon set, they are different.

juliasilge avatar May 29 '25 17:05 juliasilge

You are right. I used the Atom Material Icons. So I think it should be my problem only then

ntluong95 avatar May 29 '25 17:05 ntluong95

Verified Fixed

Positron Version(s) : 2025.07.0-99
OS Version          : OSX

Test scenario(s)

No longer seeing two preview buttons

Link(s) to TestRail test cases run or created:

testlabauto avatar Jun 13 '25 17:06 testlabauto