-
Notifications
You must be signed in to change notification settings - Fork 431
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
feat(portable-text-editor): range decorations #5871
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Full Report@sanity/portable-text-editor
@sanity/migrate
sanity
@sanity/diff
@sanity/block-tools
@sanity/types
sanity/desk
@sanity/mutator
@sanity/cli
sanity/structure
@sanity/util/concurrency-limiter
@sanity/util/legacyDateFormat
@sanity/schema/_internal
@sanity/util/paths
sanity/router
@sanity/schema
sanity/cli
@sanity/vision
@sanity/util/fs
sanity/_internal
@sanity/util/client
@sanity/util/createSafeJsonParser
sanity/_internalBrowser
@sanity/util/content
|
Component Testing Report Updated Mar 1, 2024 3:49 PM (UTC)
|
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
from
February 28, 2024 20:28
3783288
to
5b608f0
Compare
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
from
February 28, 2024 20:44
5b608f0
to
ec7cbdf
Compare
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
2 times, most recently
from
February 28, 2024 21:43
e21906f
to
a496ad8
Compare
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
from
February 29, 2024 12:50
a496ad8
to
af4a95e
Compare
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
from
February 29, 2024 13:13
af4a95e
to
efce01f
Compare
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
from
March 1, 2024 13:38
efce01f
to
56e113b
Compare
This will add support for decorating selections inside the Portable Text Editor with custom components. This can be used for search highlighting, validation, and similar. We will temporarily move the decorations according to use edits, but it's the consumers responsiblitly to permanently moved them. This can be done by using the 'onMoved' callback on the decorator, which will contain the new selection. Why don't they move on their own? This is because they come from props and are state managed by the consumer.
skogsmaskin
force-pushed
the
feat/pte-range-decorations
branch
from
March 1, 2024 15:40
56e113b
to
4f19f51
Compare
hermanwikner
approved these changes
Mar 1, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This will add support for decorating selections inside the Portable Text Editor with custom components. This can be used for search highlighting, validation, and similar.
What to review
That the feature works as intended.
Testing
You can test the feature by running the Playwright tests with
pnpm --filter sanity test:ct --project chromium --debug
and commenting out this this test.. This will give you a PT-input to play around with. Se also the Story.There are a couple of tests both for the PT-Input and Portable Text Editor.
Notes for release
N/A - internal feature for now.