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

Statusbar polishing #52149

Merged
merged 1 commit into from
Jun 18, 2018
Merged

Conversation

LeonardoBraga
Copy link
Contributor

@LeonardoBraga LeonardoBraga commented Jun 18, 2018

Fixes #51515

  • Ensures the statusbar parts have the default cursor set

@@ -5,6 +5,7 @@

.monaco-workbench > .part.statusbar {
box-sizing: border-box;
cursor: default;
Copy link
Member

@bpasero bpasero Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeonardoBraga can we just fix it for this particular issue as outlined in #51515 and apply a cursor:default style for the progress message here?

Copy link
Contributor Author

@LeonardoBraga LeonardoBraga Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely. My reasoning behind setting the default cursor style instead of specializing it for each status bar part is that - unless required otherwise - all items in the status bar should not have a "selectable" cursor or a "clickable" one. If you don't agree with this reasoning just let me know and I'll apply the rule directly to the progress items.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeonardoBraga I think the only one that is not working OK right now is the progress one, all the others should get the cursor: default if they are using spans.

Copy link
Contributor Author

@LeonardoBraga LeonardoBraga Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpasero unless I'm missing something, in statusbarpart.css, the only selector that sets the cursor to default is .monaco-workbench > .part.statusbar > .statusbar-entry > span, which would not match .statusbar-item and even for .statusbar-entry, it would only match the first level spans.

Besides, having the cursor: default in the selector I suggested would even allow us to remove it from .statusbar-entry > span. Do you still prefer to proceed with the specific selector of the progress item?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeonardoBraga yeah fair enough.

@@ -134,7 +134,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
let callOnDispose: IDisposable[] = [];

const element = document.createElement('div');
const label = document.createElement('a');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeonardoBraga this one needs to be an anchor because it is clickable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies - I missed the click handler in the code right below.

@@ -290,7 +290,7 @@ class TaskStatusBarItem extends Themable implements IStatusbarItem {
public render(container: HTMLElement): IDisposable {

let callOnDispose: IDisposable[] = [];
const element = document.createElement('a');
const element = document.createElement('span');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeonardoBraga this one needs to be an anchor because it is clickable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies - I missed the click handler in the code right below.

@bpasero bpasero added this to the June 2018 milestone Jun 18, 2018
@bpasero bpasero merged commit 1032e6d into microsoft:master Jun 18, 2018
@LeonardoBraga LeonardoBraga deleted the statusbar-polishing branch June 26, 2018 13:07
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Status bar text without a click action should not have text cursor on hover
2 participants