refactor(QuickChat): split decoration to hint and gutter icon
Description
This MR is preparation for feat: create quick chat hint when highlighting ... (!2550 - merged)
It refactors the Quick Chat decoration logic in two separate commits:
- The first commit splits the decoration class into two. This commit is not changing any behaviour, only moves relevant code and tests between files
- gutter icon - this one will stay untouched
- hint - this will be further refactored
- The second commit changes the interface of the Hint component
- We dispose the component whenever we don't want to show the hint (instead of passing in "shouldShow" boolean flag)
- We pass in the full selection change event to the component, which is further used in feat: create quick chat hint when highlighting ... (!2550 - merged)
The new, isolated, Hint
component is then rewritten in the next MR.
Related Issues
Part of [VS Code] QuickChat keybinding hint strange beh... (#1729 - closed)
How has this been tested?
- Start the extension
- Make sure your Duo Chat is working (e.g. the side panel shows)
- Put the cursor on an empty line: see the hint
- Put the cursor on a non-empty line: the hint goes away
- Start a quick chat
- See the gutter icon
- Switch between editors and go back to the one with quick chat
- See the gutter icon
This is a screencast with the testing:
What CHANGELOG entry will this MR create?
-
fix:
Bug fix fixes - a user-facing issue in production - included in changelog -
feature:
New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:
(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes