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 for before & after decorations #7181

Merged
merged 12 commits into from
Jun 10, 2016
Merged

Conversation

aeschli
Copy link
Contributor

@aeschli aeschli commented Jun 3, 2016

No description provided.

@aeschli
Copy link
Contributor Author

aeschli commented Jun 3, 2016

You can use branch aeschli/css-decorators-test to see the API in use by css test extension

@aeschli
Copy link
Contributor Author

aeschli commented Jun 6, 2016

@alexandrudima I made the changes we discussed:

  • only one call to deltaDecorations
  • beforeContentClassName & afterContentClassName on IModelDecorationOptions, creating extra decorations in viewModelDecorations.ts
  • add 'border', 'outline', 'contentText', 'contextIconPath' to API

Still not sure if to enable SVG content. At the moment it is text and file path to an icon. We should maybe also allow URL to remote servers.

@alexdima alexdima merged commit b2d6a1c into master Jun 10, 2016
@alexdima alexdima deleted the aeschli/decoration-attachments branch June 10, 2016 15:39
@siegebell
Copy link

vscode 1.3.0-insider; commit a6aa320

I'm using your feature with an injection attack (for display: none or font-size: 0pt; see #6201) to visually replace one string with another (#2402).

Here are a couple issues I'm seeing:

  1. The before decoration does not work if its range is empty and it falls at the end of a line. The after decoration does not work if its range is empty and falls at the beginning of a line.
  2. contentText does not preserve syntax coloring.

@egamma
Copy link
Member

egamma commented Jun 22, 2016

@siegebell thanks for the feedback, please file separate issues for the issues you have encountered.

@vasily-kirichenko
Copy link

@aeschli Is there documentation or usage examples available anywhere for this feature? I cannot find any.

@aeschli
Copy link
Contributor Author

aeschli commented Nov 8, 2016

Sorry, no documentation besides the regular API doc.

A general sample code on decorators can be found here, and a use case of before decorators here.

@vasily-kirichenko
Copy link

@aeschli thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants