Skip to content

Contribute to the language status聽#18040

Closed

Description

Hi 馃憢

Currently the Python extension contributes individual items to the status bar. On my macOS I see the Python version being used on the left side (picture). There might be other items?
I suggest to use the language status bar, Typescript is already using this (picture attached).

This way all the Python status bar items will come under a common item making the whole status bar experience cleaner for our users.

The status bar items which are actually progress our current advise is to use the withProgress-API. With that you announce a long running thing to VS Code. Our current thinking is to add a new progress location which is the extension鈥檚 language status. With that we can render something on the composite item as well as on the item itself. This is being discussed here, please chime in.

fyi Brett Cannon (@brettcannon) Johannes Rieken (@jrieken)

Screenshot 2021-11-16 at 17 58 50

Screenshot 2021-11-16 at 11 36 10

Activity

  1. brettcannon commented on Nov 16, 2021

    @brettcannon
    Member

    I contributed to the discussion at microsoft/vscode#129037 (comment) where I mentioned what we need in order to adopt the API wholesale (we already use it on web and plan on using it for virtual and untrusted workspaces as-is). Karthik Nadig (@karthiknadig) plans to bring up our use-case at the next API sync.

  2. added
    needs spikeLabel for issues that need investigation before they can be worked on.
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Nov 16, 2021
  3. isidorn commented on Nov 18, 2021

    @isidorn
    Author

    Brett Cannon (@brettcannon) thanks. I missed your comment in that issue, sorry about that.

    I agree that it might be a shock to the user that in one milestone we move to the right and move it inside the language status. Due to that I propose the following:

    1. This release simply move your status bar contribution to the right. I see you have explained the reasoning why it is left here but I think we should just change this
    2. Listen to user feedback
    3. After we hopefully see that the users did not really get alarmed by this change, move the item inside the language status in the following release

    Typescript only got the first complaint about this change 2 months after the release. So it was smooth sailing, let's try to do the same for Python :)

  4. brettcannon commented on Nov 18, 2021

    @brettcannon
    Member

    I'm afraid the level of detail that users need to have about their environment for Python is bit more nuanced and extensive than TypeScript (e.g. if we stopped showing the Python version by default I would be very upset as a user, same goes for the type of environment as users very often have multiple Python versions installed and care whether it's a virtual environment or global install that got automatically selected for them), so I don't think we can equate their experience to what ours would be unfortunately.

    We can talk about moving to the right sooner rather than later, but it will require updating a ton of screenshots so it isn't a quick fix. I would rather not try to squeeze it into this iteration unless open capacity shows up unexpectedly.

  5. brettcannon commented on Nov 18, 2021

    @brettcannon
    Member

    Moving to this is also already in the deferred items list in our iteration plan, so we do hope to tackle this in the upcoming iteration.

  6. isidorn commented on Nov 18, 2021

    @isidorn
    Author

    Next iteration would of course work, I missed that this might require to update a lot of screenshots.
    Once we do that we can discuss the language status and what capabilities we might need to add for Python to adopt to it.
    Thanks a lot!

  7. karrtikr commented on Dec 9, 2021

    @karrtikr
    • Move status bar item to the right
    • Look into all the screenshots we need to update
    • Discuss with VSCode about the capabilities we may need, like pinning.
    • ...TBD
  8. karrtikr commented on Dec 9, 2021

    @karrtikr

    I attempted to do a basic move
    image

    Isidor Nikolic (@isidorn) Right now it appears weird as it "Python" appears twice. I see that each status bar item has a priority number attached to it, can I set such a number which ensures it always appears next to the language status item? In that case we can simply remove "Python".

  9. isidorn commented on Dec 13, 2021

    @isidorn
    Author

    Kartik Raj (@karrtikr) thanks for giving it a try!
    Yeah, I think you can and that is exactly what Typescript is doing (once the user pins the typescript version there is no duplication).
    As for what is the exact right priority number for this Johannes Rieken (@jrieken) might help.

    Screenshot 2021-12-13 at 12 59 51

  10. jrieken commented on Dec 13, 2021

    @jrieken

    There is no exact priority number because it's an open system for all extensions. Tho, we want to ensure that pinned language status items are always directly after the language name. So, how about using the new language status API and then we discuss if pinned by default should be a thing or not?

  11. karrtikr commented on Dec 13, 2021

    @karrtikr

    Sure. In that case we have decided to follow the approach described by Isidor Nikolic (@isidorn) in #18040 (comment), but have the 3rd step behind an experiment, as we suspect Users would likely want pinning by default. We can discuss after that.

  12. jrieken commented on Dec 13, 2021

    @jrieken

    I see. For the priority you can try something like 100.09999 but pinned language status items are meant to win. So, that might lead to <Python> <Some_Python_Language_Status> <Your Status Bar Item>

  13. karrtikr commented on Dec 13, 2021

    @karrtikr

    Nice, thanks! I'll try it out.

  14. karrtikr commented on Dec 13, 2021

    @karrtikr

    Works great:
    image

    We plan to remove bitness "64 bit" to make this even shorter. We discussed as a team again and right now the plan is to A/B experiment with this hack, when using language status API, and when in the control group (where this is on the left as it is), so there're 3 experiments to compare. We can decide based on that whether pinning is needed.

  15. karrtikr commented on Jan 12, 2022

    @karrtikr

    Isidor Nikolic (@isidorn) I am working on adopting the language status API and here's how it looks:

    After pinning and hovering:

    When interpreter selected is invalid:

    After pinned:

    It looks good. However I discovered a bug where the language status item does not appear when a language mode is changed: microsoft/vscode#140589. We have a getting started experience where we ask the user to create an untitled file and then select an interpreter using the status bar (now language item), so we would need that bug to be addressed before we can adopt the language status API.

  16. karrtikr commented on Jan 13, 2022

    @karrtikr
  17. isidorn commented on Jan 13, 2022

    @isidorn
    Author

    Kartik Raj (@karrtikr) thanks for looking into this and thanks for filling that issue with nice steps. We plan to look into it this milestone.

    I do agree that it looks good, much cleaner!

  18. isidorn commented on Jan 14, 2022

    @isidorn
    Author

    Joh just pushed a fix for the issue you filled. It should be in Insiders on Monday so try it out and let us know if there is anything else we can do to help you adopt the language status. Thanks

  19. karrtikr commented on Jan 14, 2022

    @karrtikr

    Sure, thanks a lot for the quick fix!

  20. locked as resolved and limited conversation to collaborators on Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-editor-*User-facing catch-allfeature-requestRequest for new features or functionalityneeds spikeLabel for issues that need investigation before they can be worked on.partner askverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions