Skip to content
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

Allow individual status bar messages to clip instead of hide #84258

Closed
sandy081 opened this issue Nov 8, 2019 · 18 comments · Fixed by #84465
Closed

Allow individual status bar messages to clip instead of hide #84258

sandy081 opened this issue Nov 8, 2019 · 18 comments · Fixed by #84465
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities *out-of-scope Posted issue is not in scope of VS Code workbench-status Status bar

Comments

@sandy081
Copy link
Member

sandy081 commented Nov 8, 2019

  • Create a status bar item with a message
  • If the message does not fit then the entry is hidden. Instead the message should be clipped.

Background: Supporting a feature to show current error in the status - #20183

@sandy081 sandy081 added the workbench-status Status bar label Nov 8, 2019
@bpasero bpasero added the feature-request Request for new features or functionality label Nov 8, 2019
@bpasero bpasero added this to the Backlog Candidates milestone Nov 8, 2019
@bpasero bpasero removed their assignment Nov 8, 2019
@bpasero
Copy link
Member

bpasero commented Nov 8, 2019

I thought about that but I wasn't sure how the impact is for extensions. E.g. if a message is always clipped something like "Delete File Without Confirmation" might become "Delete File..." which hint at a confirmation. Is that clever?

@sandy081
Copy link
Member Author

sandy081 commented Nov 8, 2019

Yeah.. does not makes sense for actions, but allowing statuses to be clipped is a valid scenario. Also, I do not think we hide buttons instead clip labels at other places right?

@bpasero bpasero changed the title Status bar messages should be clipped instead of hiding Allow individual status bar messages to clip instead of hide Nov 8, 2019
@bpasero bpasero self-assigned this Nov 8, 2019
@bpasero
Copy link
Member

bpasero commented Nov 8, 2019

Maybe behind an option for the status bar entry.

@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Nov 8, 2019
@sandy081
Copy link
Member Author

sandy081 commented Nov 8, 2019

@bpasero I am looking into this and looks like nothing can be done unless the status bar items do not wrap. Currently status bar item wrap and overflow items are wrapped underneath. Is wrapping necessary ?

@bpasero
Copy link
Member

bpasero commented Nov 9, 2019

I think the wrapping is just there out of historic reasons because we used to have a float CSS rule in the status bar until I adopted flex layout. The rationale I had was that the most left and most right status entries are always accessible and everything in between wraps out. E.g. this ensures the notification icon is always accessible and never pushed out of view.

@sandy081
Copy link
Member Author

I do not think wrapping is helping in this case. If a status bar entry is too long it is hiding the notification icon

image

@sandy081
Copy link
Member Author

sandy081 commented Dec 4, 2019

Verify that left items in the status bar are not wrapped where as items on the right gets wrapped while resizing the window.

@jrieken
Copy link
Member

jrieken commented Dec 5, 2019

Screenshot 2019-12-05 at 11 40 07

Screen cheese 🧀. Also I think this isn't an ideal solution... I see how it fulfils the needs of showing diagnostic messages but now as my cursor moves I see a very nervously flashing status bar ⬇️

Dec-05-2019 11-42-24

I have also concerns about extensions because their status bar entries are affected by this behavioural change, e.g by us giving a clear priority to left-aligned items. I think we can do better here, eg using some flex rules to shrink items, like very long messages, or by hiding items with lower priority.

@jrieken jrieken reopened this Dec 5, 2019
@jrieken jrieken added the verification-found Issue verification failed label Dec 5, 2019
@sandy081
Copy link
Member Author

sandy081 commented Dec 5, 2019

Can you please let me know how I can reproduce the screen cheese?
Not sure how we can avoid flashing because the message will disappear when cursor is moved.

Yes the current fix changes to hide right items first, before, we were hiding left items first. Not sure if there is a fixed priority here.

@bpasero Let me know what do you think is the best way you suggest to go forward here.

@jrieken
Copy link
Member

jrieken commented Dec 6, 2019

Can you please let me know how I can reproduce the screen cheese?

With a long error message and some window resizing.

@bpasero
Copy link
Member

bpasero commented Dec 6, 2019

I think the screen cheese needs to be fixed, e.g. no status entry should appear partially in the status bar. I find the behaviour otherwise OK when I play around with it. After all the error message is pushing out the elements to the right, I do not see how we can change that unless we maybe introduce some max-width for it?

@jrieken
Copy link
Member

jrieken commented Dec 6, 2019

I do not see how we can change that unless we maybe introduce some max-width for it?

Yeah, something like that. A single super long message (we know that they can be long) shouldn't push out all other items but it should be truncated at one point. Ideally so that other entries are still visible

@sandy081
Copy link
Member Author

sandy081 commented Dec 6, 2019

I don't think keeping max-width on an item will make it look better because it can cause weird spacing issues like ⬇️ (This happens because right side items are wrapped).

image

Another way is to clip the item content (in code and not in css).

@bpasero
Copy link
Member

bpasero commented Dec 6, 2019

Should we move this to December? The setting is disabled by default anyway.

@sandy081
Copy link
Member Author

sandy081 commented Dec 6, 2019

Yeah we can and it will also give us time to get feedback.

@sandy081 sandy081 removed verification-found Issue verification failed verification-needed Verification of issue is requested labels Dec 6, 2019
@sandy081 sandy081 modified the milestones: November 2019, December 2019 Dec 6, 2019
@jrieken
Copy link
Member

jrieken commented Dec 6, 2019

Another way is to clip the item content (in code and not in css).

I believe this can be done nicely in CSS. Let's use this as a flex-box learning opportunity.

@mlfecho
Copy link

mlfecho commented May 23, 2022

Hi, in case this ticket needs a bump, I just wanted to offer an example where this hide instead of clip behavior is problematic.

The vim extension prints warnings like file permissions in the status bar, and without the visible warning it can look like you're successfully saving a file when you actually aren't.
vscode_vanishingErrorMsg

@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities *out-of-scope Posted issue is not in scope of VS Code workbench-status Status bar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants