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 update 212 952 1189 #1200

Merged
merged 34 commits into from
May 11, 2020

Conversation

SchweizS
Copy link
Contributor

@SchweizS SchweizS commented Apr 23, 2020

This change addresses item

This adds:

Changes:

  • CTest button is not colored by default.
  • LaunchTarget is now in brackets [target] similar to build target
  • Tooltip of debug, launch and build buttons now shows the target

This does not address:

Notes:

  • as far as i can tell hideDebugButton is never called. maybe the entries related to that can be completely removed.
  • there seems to be a bug which causes the workspace selection not to show up when a workspace is created by adding a second directory.
  • visibility of buttons can be one of
    • default: current behaviour. Label is completely visible
    • compact: buttons only show minimal information or get truncated
    • icon: only icons are visible. buttons without icons are hidden
    • hidden: button is hidden

Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

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

This is pretty cool and I'm glad that there is interest out there to address this. We've been debating here what we should do about the status bar because it does take up a lot of space. We've actually been thinking about moving this out of the status bar completely and into its own view (i.e. perhaps sharing space with the "outline view" panel as a separate section). We could then just leave a single icon on the status bar that could act as a shortcut to the panel. We haven't fleshed out the details, but that seemed like an option we wanted to explore.

That said, I think this PR gives people a lot of control over how the status bar looks and is a good interim solution in the event we want to do the aforementioned work. However, my overall feedback for this PR is that this might give a little too much control and result in some settings bloat. It was somewhat cumbersome to change the settings for each button. I would expect that most people would be happy with a simple setting to control all of the buttons. "text"/"icon"/"hidden". "short" is mostly a problem for Kits with long names and I think it's not essential to try to solve that. Icon + Tooltip would be sufficient, I think. If we consolidate the settings, then in the event that we do move the controls out of the status bar, that's fewer settings for us to deprecate.

I'd like to know what your thoughts are in this regard. I'm not saying we won't accept this PR. I just wanted to share our thoughts before we proceed and see how that affects the path we take to clean up the status bar.

Thanks for tackling this!

src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
@SchweizS
Copy link
Contributor Author

This is pretty cool and I'm glad that there is interest out there to address this. We've been debating here what we should do about the status bar because it does take up a lot of space. We've actually been thinking about moving this out of the status bar completely and into its own view (i.e. perhaps sharing space with the "outline view" panel as a separate section). We could then just leave a single icon on the status bar that could act as a shortcut to the panel. We haven't fleshed out the details, but that seemed like an option we wanted to explore.

I like that idea, but i think the statusbar should still remain an option.
The statusbar allows to see some settings at first glance, without having to change to a different view.
This is in my opinion a big win in comparison to other options.

If you add the new view, you could just set the default for the statusbar to hidden and add the new button.

That said, I think this PR gives people a lot of control over how the status bar looks and is a good interim solution in the event we want to do the aforementioned work. However, my overall feedback for this PR is that this might give a little too much control and result in some settings bloat. It was somewhat cumbersome to change the settings for each button. I would expect that most people would be happy with a simple setting to control all of the buttons. "text"/"icon"/"hidden". "short" is mostly a problem for Kits with long names and I think it's not essential to try to solve that. Icon + Tooltip would be sufficient, I think. If we consolidate the settings, then in the event that we do move the controls out of the status bar, that's fewer settings for us to deprecate.

I had the same issue, but i think i have a solution for that.
settings
json
With that you have both: An easy way to change all buttons and (kind of) hidden settings for each individual button. It might be a good idea to add some descriptions if this gets approved.

Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

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

Sorry, I'm not quite done yet, but I do want to provide some incremental updates/status on this PR so we can work in parallel.

src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/extension.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/status.ts Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

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

This is looking really awesome! I'm still testing, but I have a few remaining comments.

src/status.ts Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/status.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@SchweizS
Copy link
Contributor Author

SchweizS commented May 4, 2020

with the current changes i think we could also remove the label of the Build-button.
@bobbrow

i also updated the first post to reflect the changes

- fixed access
- reordered function to reflect access
- renamed member to reflect access
@SchweizS
Copy link
Contributor Author

SchweizS commented May 5, 2020

statusbar

the last commits contain minor improvements to compact mode and an overall cleanup.

@macdems
Copy link

macdems commented May 5, 2020

This is a great improvement to a serious cmake-tools drawback. The ability to turn-off selected buttons is something that was strongly missing. For example, I need to be able to select a variant, however I don't want to touch the kits (and accidentally clicking the 'select kit' statusbar button can result in half-an-hour recompilation of the whole project, so being able to hide it is important to me). Please accept this PR for the next release.

@bobbrow
Copy link
Member

bobbrow commented May 5, 2020

We're almost done iterating on this. It will be in the 1.4 release. It's in the "fit and finish" phase right now. I am going through all of the tooltips and settings combinations (there are a lot!) looking for consistency issues. I have a few comments pending right now and plan to submit my feedback within the next day or so.

@bobbrow bobbrow added this to the 1.4.0 milestone May 5, 2020
Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

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

I'm not done checking the tooltips yet as I had a full day of meetings today. But I did want to post this feedback now in case you had other changes pending. I wrote most of this last night and removed the comments related to stuff you pushed this morning.

src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
package.nls.json Outdated Show resolved Hide resolved
package.nls.json Outdated Show resolved Hide resolved
src/status.ts Show resolved Hide resolved
src/status.ts Show resolved Hide resolved
Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

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

I think I got most of the UI stuff tested and added comments to the review. I'll do one last check after your next push and then I think we'll be good to go!

Thanks again for all of your hard work on this! I'm super excited to get this in!

src/status.ts Outdated Show resolved Hide resolved
protected getTextShort(): string { return this.getTextNormal(); }
protected getTextIcon(): string { return ''; }

protected getTooltipNormal(): string|null { return this._tooltip; }
Copy link
Member

Choose a reason for hiding this comment

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

Tooltip issues:

default mode

Button comment
Status Remove the status from the tooltip. It should just say "Click to select the current build variant"

compact mode

Button comment
Workspace I don't think we need to show the folder name in the tooltip because we don't truncate the text.
Status I think the status should come before the command text. Can you switch the order?
Kit I think the active kit should come before the command text. Can you switch the order?
Build The text should start with "CMake:"
Build label I don't think we need to show the selected build in the tooltip because we don't truncate the text.
Launch label The text should start with "CMake:"
CTest I don't think we need to show the button text in the tooltip. (make it a one-liner)

icon mode

Button comment
Workspace I'm thinking this should look like: "CMake: Active Folder [${folder name}]\nClick to change"
Status I'm thinking this should look like: "CMake: ${status text}\nClick to select the current build variant" (In the future, maybe status and variant will be split out so we can put the variant in square brackets, but I think that's out of scope for this PR)
Kit I'm thinking this should look like: "CMake: Active Kit [${active kit}]\nClick to change the active kit"
CTest I don't think we need to show the button text in the tooltip. (make it a one-liner)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ctest in icon mode should have the annotation of how many test did pass.
=> second line is only visible if there are test results

i changed the labels (and tooltips) such that selected values (kit, folder, variant, targets) are in brackets and text is without bracket.

i didn't add Active XYZ to icon mode.
I don't think that it adds information because the second line of the tooltip already states what is meant.

I changed the tooltip of the workspace button to:
Click to select the active workspace and Click to select the active workspace (auto) to match the other tooltips.
i'm not sure if auto is enough or if we should use autoselect.
auto is visible if Cmake: Auto Select Active Folder is selected.

Copy link
Member

Choose a reason for hiding this comment

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

I think putting (auto) in the tooltip is confusing. I would rather that be removed.

src/status.ts Show resolved Hide resolved
src/status.ts Outdated Show resolved Hide resolved
@SchweizS
Copy link
Contributor Author

SchweizS commented May 7, 2020

current state

current state

src/status.ts Outdated Show resolved Hide resolved
Copy link
Member

@bobbrow bobbrow left a comment

Choose a reason for hiding this comment

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

If you can just remove the (auto) text from the workspace folder tooltip, this will be ready to merge. Thanks again for working on this!

@SchweizS
Copy link
Contributor Author

i didn't want to touch everything which is related to that feature, so i just commented out he
parts related to autoSelect in status.ts

@bobbrow bobbrow merged commit e21a430 into microsoft:develop May 11, 2020
@bobbrow
Copy link
Member

bobbrow commented May 11, 2020

That's fine. We will clean it up in a separate PR.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
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.

5 participants