Add new "pressed" property for action item
Created by: lguychard
Fixes #2055 (closed)
This PR adds a new "pressed" property for contributed action items:
An expression that, if given, should evaluate to a boolean value specifying whether the action item should be rendered as a pressed button.
The original use case for this is for language extensions to contribute "toggle code intelligence" buttons to the code view toolbar:
For integrations, the aim is to match the styling of pressed buttons on the code host. This is done for Github, but:
-
TODO Gitlab -
TODO BitBucket Server -
TODO Phabricator
@francisschmaltz @sqs How should this be rendered in the Sourcegraph web app? Up until now action items contributed to the repo header were just rendered as links, not buttons. I simply added a different background color as a wip, but we might want to do something different. (and yes, icon alignment is off in the below screenshots)