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

Contributed activity's busy icon fails to display after resetting containing TreeView's badge state #165181

Closed
kirksl opened this issue Nov 1, 2022 · 3 comments · Fixed by #165255
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@kirksl
Copy link

kirksl commented Nov 1, 2022

Does this issue occur when all extensions are disabled?: Yes/No
Yes

  • VS Code Version: 1.72.2
  • OS Version: Windows 10 (19044.2130)

Steps to Reproduce:

  1. Create a VSCode extension
  2. Contribute a View within an Activity https://github.com/kirksl/karate-runner/blob/master/package.json#L71-L90
  3. Create a TreeView within Activity View https://github.com/kirksl/karate-runner/blob/master/src/providerKarateTests.ts#L31
  4. Show progress indicator on View https://github.com/kirksl/karate-runner/blob/master/src/commands.ts#L478-L482
  5. Notice that busy icon shows for Activity's badge
  6. Repeat Steps 1-3 only and return here
  7. Set TreeView badge to a value > 0
    this.treeView.badge = { tooltip: 'Failures', value: 1 };
  8. Notice Activity badge is set to value of 1
  9. Show progress indicator on View again https://github.com/kirksl/karate-runner/blob/master/src/commands.ts#L478-L482
  10. Notice that busy icon does not show now for Activity's badge
  11. Clear badge per API documentation https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.d.ts#L10502-L10505
    this.treeView.badge = undefined
  12. Notice that an error is thrown
    Cannot read properties of undefined (reading 'value')
  13. Clear badge per undocumented method
    this.treeView.badge = { tooltip: '', value: 0 };
  14. Notice that numbered badge on Activity is removed
  15. Show progress indicator on View again https://github.com/kirksl/karate-runner/blob/master/src/commands.ts#L478-L482
  16. Notice busy icon does not show now for Activity's badge

Expectations

  1. Clearing Activity badge per documentation in Step 11 works
  2. Clearing Activity badge enables busy icon to work as it did in Step 5
@lramos15 lramos15 assigned alexr00 and unassigned lramos15 Nov 1, 2022
@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Nov 1, 2022
@alexr00 alexr00 added this to the November 2022 milestone Nov 1, 2022
@alexr00
Copy link
Member

alexr00 commented Nov 2, 2022

  1. Clearing Activity badge per documentation in Step 11 works

Duplicate of #162900

  1. Clearing Activity badge enables busy icon to work as it did in Step 5

Progress should take precedence over the number badge. Looks like we got the priority wrong. Fix coming soon.

@kirksl
Copy link
Author

kirksl commented Nov 2, 2022

Thank you @alexr00 appreciate the fast turnaround.

alexr00 added a commit that referenced this issue Nov 3, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Nov 3, 2022
@aeschli
Copy link
Contributor

aeschli commented Dec 1, 2022

Verified that progress takes precedence over the number badge

@aeschli aeschli added the verified Verification succeeded label Dec 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
5 participants