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

Customize get dirty paths #5069

Merged
merged 2 commits into from
Aug 18, 2022

Conversation

krenzke
Copy link
Contributor

@krenzke krenzke commented Jul 31, 2022

Description
#4012 Previously added the ability to customize the getDirtyPaths as one would any other editor method. In my case, this will be useful for the case where deleting a node results in two lists being adjacent to one another, in which case the I'd like the lists to be merged. Currently, the default implementation of getDirtyPaths only sets the ancestors of the removed node as dirty, while I'd need to set the immediate siblings as dirty as well. Presumably there are other helpful use cases out there.

From what I can tell, #4012 was approved and merged, but somewhere along the way the changes were lost. Viewing the merge commit results in a "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository." message. And the code changes are nowhere in any of the branches I can see in Github.

All credit should go to @tomdng as they were the original contributor and implementor. I'm just trying to get the changes re-merged hoping it'll stick this time :).

Context
See #4012 for a full description of the changes and logic behind them.

Checks

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn fix.)
  • The relevant examples still work. (Run examples with yarn start.)
  • You've added a changeset if changing functionality. (Add one with yarn changeset add.)

@changeset-bot
Copy link

changeset-bot bot commented Jul 31, 2022

🦋 Changeset detected

Latest commit: e8af473

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
slate Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dylans dylans merged commit 46d113f into ianstormtaylor:main Aug 18, 2022
This was referenced Aug 18, 2022
z2devil pushed a commit to z2devil/slate that referenced this pull request Dec 6, 2024
* Move getDirtyPaths to the Editor object to allow for customization

* Add changeset for getDirtyPaths customization

Co-authored-by: Tom Krenzke <tom@daybreakhealth.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants