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

fix: recording timestamps #16866

Merged
merged 6 commits into from
Aug 2, 2023
Merged

fix: recording timestamps #16866

merged 6 commits into from
Aug 2, 2023

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Aug 1, 2023

Problem

There are a number of small bugs with notebooks, specifically around the recording timestamps

Changes

  • As per flushSync gets called on render when the Editor gets updated with content that uses an extension with addNodeView ueberdosis/tiptap#3764 (comment) I'm wrapping our commands in queueMicrotask to make sure they don't get called during a re-render. This does not fix all of the flushSync issues
  • Upgraded to the latest RC for TipTap which included this fix but it seems to still cause the app to crash when closing the sidebar.
  • Stop always autofocusing the end of the editor. Moved to a model where the focus can be passed in as a prop to the Notebook component and only when the editor is set on the logic does it issue a command to set the focus.
  • Set the default tippy placement to right to fix them showing to the left of the cursor when the notebook is being viewed in compact mode
  • Fix the lookup of the previous node returning two nodes back

How did you test this code?

By 👁️

@daibhin daibhin marked this pull request as ready for review August 1, 2023 13:23
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Some details in there I didn't look to closely at but it all seems to work as described 👍

@daibhin daibhin merged commit 85b906c into master Aug 2, 2023
63 checks passed
@daibhin daibhin deleted the fix/recording-timestamps branch August 2, 2023 08:50
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.

2 participants