-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Feat: Implement text markers #5835
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
Conversation
59d501e
to
b8dd235
Compare
b8dd235
to
c320c30
Compare
Hey, great job on the initial draft! 🚀 Is there a nice way to trigger it today in the kitchen-sink or somewhere, or would one have to invoke the Did you give any thought on how this will be introduced? Would something like a general editor option "disableSelectionHighlight" make sense, or is too specific, and we would maybe apply these text markers by default when there is a selection and let consumers handle it through CSS? |
@marinsokol5 Hey! I have small kitchen sink demo (CTRL-F would trigger colorization), that should show how it works with different tokens. This PR simply provides the low-level hooks for all kinds of highlighting scenarios—custom searches, high-contrast themes, ad-hoc token styling, etc.—and lets us iterate on the UX/API in follow-up discussions. screen-capture.96.webm |
Demo looks great, UI better than expected, especially with this partial token styling! Let's continue working on it and merge! |
…le to remove outdated text markers
4d18755
to
a16f94b
Compare
# Conflicts: # types/ace-modules.d.ts
@marinsokol5 hey! I've finished the PR and embedded the demo into the kitchen sink. Quick question - do we need a separate option in the kitchen sink panel to enable/disable it, or is it okay to have it permanently turned on? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5835 +/- ##
==========================================
+ Coverage 87.79% 87.84% +0.04%
==========================================
Files 620 622 +2
Lines 46139 46383 +244
Branches 7564 7598 +34
==========================================
+ Hits 40509 40745 +236
- Misses 5630 5638 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
My two cents, it might be confusing for users to see this styling in the kitchen sink as they might think it's out-of-the-box ace styling (in contrast to something they need to add themselves if they want it) |
I agree, but not sure, what would be the good way to bring it in demo |
Yeah I'm also not sure, could it make sense to not have it in the kitchen sink for now so that we can merge the PR and then add a demo for it later? |
3bf9b30
to
d158131
Compare
Removed it for now; btw: I almost finished working on PR based on that one, which would provide extension to show whitespaces in selection. screen-capture.99.webm |
Issue #, if available:
Description of changes:
This PR introduces a robust text markers implementation, enabling customized text highlighting. The feature includes a clean API, efficient rendering, and support for multiline selections.
Key Features
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Pull Request Checklist:
ace.d.ts
) and its references: