prettier / prettier-vscode

Visual Studio Code extension for Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
MIT License
5.04k stars 446 forks source link

[Edited] Option to hide status bar item #438

Closed yzhang-gh closed 4 years ago

yzhang-gh commented 6 years ago

I notice that there is a "Prettier" status bar item at the right bottom corner when editing Markdown file. Clicking on it will open an empty output panel. But when editing JS/CSS files, the status bar item disappears. I am confused with what it is. Can I hide it?

CiGit commented 6 years ago

Hum, our toolbar lead may answer that question :smiley: @RobinMalfait

CiGit commented 6 years ago

you can't hide it but it shouldn't disappear

yzhang-gh commented 6 years ago

I guess it is used to indicate whether the current document type is supported by Prettier. But it seems not to work as expected. (Sometimes it is just Prettier, sometimes I see Prettier: ✔ and sometimes it disappears)

If it is, then I'd like to request an option to hide it.

RobinMalfait commented 6 years ago

Currently when you see Prettier it means that a status bar item is injected. Once you see the Prettier: ✔ or Prettier: ˣ it means that you have saved at least 1 time.

The plain Prettier is injected into tabs that have a supported language. E.g.: when using JavaScript files you see the Prettier status bar. In YAML files you won't see it. (At least not at the time of this writing).

The reason that you see it in Markdown files is that markdown is supported by prettier.

Did you disable prettier for JavaScript and / or CSS files?

yzhang-gh commented 6 years ago

I just tested it again, it seems to work as designed.

RobinMalfait commented 6 years ago

@neilsustc can this issue be closed or do you need / want something else, like improvements?

yzhang-gh commented 6 years ago

Can we have an option to hide that status bar item?

RobinMalfait commented 6 years ago

@CiGit should we add an option to show/hide it?

CiGit commented 6 years ago

I don't think an option brings something useful to the table here. It would be interesting to know why you want to hide it? We may think about a rework.

yzhang-gh commented 6 years ago

Because the status bar is crowded enough. I'd like to have as less items as possible since I don't need it.

image

And sometimes, I add custom commands to the status bar using Commands. E.g. add a print icon when editing Markdown files, making it more crowded.

yzhang-gh commented 6 years ago

And from the angle of UX, IMHO, a status bar item is something that provides actions/operations. Of course it can be used as an indicator, but in my experience I have never seen other editors/IDEs having a formatter status bar indicator. Just popping up an error message when formatter fails is sweet enough I think.

RobinMalfait commented 6 years ago

We do have a popup in a PR #434, maybe we can drop the statusbar all together? But then again, every issue we have we had to ask for the prettier versions and what not, and the statusbar is used for that.

Or we could create a command to report a problem which provides all the necessary information?

CiGit commented 6 years ago

That status bar item provides:

I don't find it that useful as a user (I barely look at it) It is sometimes useful in issues.

Or we could create a command to report a problem which provides all the necessary information?

This would be really useful I think. I would not call it report, it feels like it would open an issue directly. Maybe more something like check / info / debug. It could also be a loglevel option. I've no opinion right now...

I think we could do better with that new notification area. It's a little less invasive than the previous one.

Lexicality commented 5 years ago

To add to this - I've got way too many status bar indicators at the moment and they interfere with the Vim extensions command input. I'd appreciate being able to get rid of at least one.

bn-l commented 5 years ago

May to December and still not even an option to toggle this. Lots of nice discussion though.

hediet commented 5 years ago

I also use many custom commands in my statusbar and would love if prettier's status indicator could be hidden.

richard-ling commented 4 years ago

I'd like it to do something more useful when clicked -- show an option to toggle auto-formatting on/off. Every other status bar indicator I have does something useful when clicked:

I can probably work around this for now using the Formatting Toggle extension...

lllopo commented 4 years ago

Maybe would be nice to reduce it to an (informative) icon, so it doesn't clutter the statusbar so much.

ntotten commented 4 years ago

Status bar has been removed in version 3.0

Nxt3 commented 4 years ago

but what if you liked the status bar icon? You could already hide status bar icons in VS Code so if you didn't want Prettier there, you'd just hide it.

ntotten commented 4 years ago

@Nxt3 what did you like about it? I think the main thing that it did was help to ensure that prettier was being used as a formatter on that file, but since vscode introduced the ability to pick a formatter that doesn't seem necessary.

I'm willing to add it back, but I'd like to understand why it is useful.

Nxt3 commented 4 years ago

For me, it was a quick way to make sure that formatting was working on the current document. I have it setup to format on save, and sometimes I'd save but the document wouldn't format; I could tell this because of the status bar icon. It's also just a quick way to tell if prettier is capable of formatting your current document without having to dig into settings.

sleepwalky commented 4 years ago

I have the same use case as @Nxt3 described. Now I have to open prettier output tab in vscode to verify if formatting was applied correctly

thelovesmith commented 4 years ago

I agree with @Nxt3 and @sleepwalky Having the status bar icon def provided us an easy and quick way to know if its being used successfully especially when you're editing multiple projects at once. Especially if you don't want to dig into each project's settings. It was pretty comforting seeing the icon down there. Just my honest opinion.

ntotten commented 4 years ago

The status bar is back again in version 3.6.0, please update. :)

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.