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

POC: Saving title into undo stack after five characters typed #52375

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

paulopmt1
Copy link
Contributor

What?

This is a POC to understand the next steps of solving this issue: #37171

How?

We're currently using the cache concept implemented here and trying the idea of saving the title after a specific condition is met.

Question

While editing the post, we rely on useMarkPersistent which calls __unstableMarkLastChangeAsPersistent action and that will persist the past command into the undo stack after one-second window without typing.

Should we try something similar to useMarkPersistent for the title?

This is the current behavior:

20230705092953338.mp4

@youknowriad
Copy link
Contributor

Great exploration here. Indeed, it seems we should think of providing a nice hook to absorb this complexity and share this hook between all places that need it. Editing footnotes is also a place that could use this hook. cc @ellatrix

@ellatrix
Copy link
Member

ellatrix commented Jul 6, 2023

Agree with @youknowriad. We should extract the hook from block-editor's rich text.

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.

None yet

3 participants