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/fade in new thought #2589

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zukilover
Copy link
Collaborator

Fixes #1790

This PR is branched off of #2581 because it depends on the new CSSTransition for tree-node element.
Added new property value for the TreeThought to distinguish new thoughts.

End result:
screencast-localhost_3000-2024_11_15-14_58_10.mp4

Copy link
Collaborator

@trevinhofmann trevinhofmann left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@zukilover / @yangchristina / @raineorshine, please let me know whether you would rather proceed with this PR or with #2601 which resolved the merge conflicts but may have made other changes in doing so.

It would generally be nicer to wait until A (#2581) is merged before submitting B (#2589) for review when B depends on changes in A, but I will review this one because B might have a separate issue that will take time to resolve (#2581 (comment)).


1. Disappearing thoughts

Thoughts are unexpectedly disappearing from the end of the list when inserting new thoughts before them

Steps to reproduce

- foo
- bar
- baz
  1. Set the cursor on foo
  2. newThought several times

Current Behavior

The bar and baz thoughts disappear:

Screen.Recording.2024-11-18.at.11.08.05.PM.mov

Expected Behavior

The thoughts should not disappear. Demo from the main branch:

Screen.Recording.2024-11-18.at.11.06.24.PM.mov


// Speed up the tree-node's transition by 50% on New (Sub)Thought only.
const isNewThought = value === ''
const layoutDuration = isNewThought ? `layoutNodeAnimationFastDuration` : `layoutNodeAnimationDuration`
Copy link
Collaborator

Choose a reason for hiding this comment

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

This duration does not appear to have the intended effect (or any effect?). Since the duration is so short, I updated layoutNodeAnimationDuration to 5000 ms in the durations config to test it locally. Doing so doesn't seem to have lengthened the duration of any animations for a new subthought:

Screen.Recording.2024-11-18.at.10.53.22.PM.mov

I also increased the value of layoutNodeAnimationDuration with the same unchanged results.

@raineorshine raineorshine marked this pull request as draft November 19, 2024 17:10
@raineorshine
Copy link
Contributor

Marking as draft until #2581 is merged. Stay tuned.

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.

Animation: Fade in new thought
4 participants