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

Support inlay hint double click gesture #141576

Closed
jrieken opened this issue Jan 26, 2022 · 6 comments
Closed

Support inlay hint double click gesture #141576

jrieken opened this issue Jan 26, 2022 · 6 comments
Assignees
Labels
api-finalization feature-request Request for new features or functionality inlay-hints on-release-notes Issue/pull request mentioned in release notes verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Jan 26, 2022

We should support the double click gesture on inlay hints and connect it with some "primary command". That would allow for nice interactions like making the corresponding code change when clicking etc

@jrieken jrieken self-assigned this Jan 26, 2022
@jrieken jrieken added feature-request Request for new features or functionality inlay-hints labels Jan 26, 2022
@jrieken jrieken modified the milestones: Backlog, February 2022 Jan 26, 2022
@jrieken
Copy link
Member Author

jrieken commented Feb 9, 2022

This happened. With vsocde.InlayHint.command the default (dbl-click) gesture can be set

@jrieken jrieken closed this as completed Feb 9, 2022
@jrieken
Copy link
Member Author

jrieken commented Feb 21, 2022

To verify

  • use the sample https://github.com/jrieken/test-inlayhints/
  • run npm i
  • press F5 to debug
  • open a markdown file, type "foo" and "bar", both words will be decorated with an inlay hints
  • ensure you can dbl-click the hints and see a notification

@jrieken jrieken added the verification-needed Verification of issue is requested label Feb 21, 2022
@isidorn isidorn added the verified Verification succeeded label Feb 23, 2022
@isidorn
Copy link
Contributor

isidorn commented Feb 23, 2022

Works nicely -> verified. Filled follow up issue #143740

@jrieken jrieken reopened this Feb 24, 2022
@jrieken
Copy link
Member Author

jrieken commented Feb 24, 2022

Re-opening after further discussion (#143740 and related). The current API allows to give a command for the hint as well as for hint label parts. Tho, the former command is meant to be a "accept" command and we should model the API accordingly. That would allow us to show specific UI, like "double click to accpet"

@jrieken jrieken modified the milestones: February 2022, March 2022 Feb 24, 2022
@jrieken jrieken added api-finalization and removed verification-needed Verification of issue is requested labels Feb 24, 2022
@jrieken
Copy link
Member Author

jrieken commented Feb 24, 2022

API idea

export class InlayHint {

  // optional edit that is performed when the default gesture is triggered
  textEdits?: TextEdit[];
}

@jrieken jrieken removed the verified Verification succeeded label Feb 28, 2022
jrieken added a commit that referenced this issue Mar 1, 2022
jrieken added a commit that referenced this issue Mar 8, 2022
@jrieken jrieken closed this as completed Mar 8, 2022
@jrieken jrieken added the verification-needed Verification of issue is requested label Mar 21, 2022
@jrieken
Copy link
Member Author

jrieken commented Mar 21, 2022

To verify


  • use the sample jrieken/test-inlayhints
  • run npm i and npm run compile
  • press F5 to debug
  • open a markdown file, type "foo" and "bar", both words will be decorated with an inlay hints
  • ensure you can dbl-click the hints and that you see line 1 being changed
  • ensure you get a hover about dbl-click when hovering over the hints

@hediet hediet added the verified Verification succeeded label Mar 23, 2022
@jrieken jrieken added the on-release-notes Issue/pull request mentioned in release notes label Mar 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-finalization feature-request Request for new features or functionality inlay-hints on-release-notes Issue/pull request mentioned in release notes verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants