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

LayoutTree: no hideCaret animation for 1st thought #2771

Conversation

ethan-james
Copy link
Collaborator

Fixes #2708

Any hideCaret animation value will trigger the animation when it is first applied. If there's only one thought, use 'none' as the animation value, which will not play an animation. There will not be any indentation changes while only one thought exists, so there will be no need to hide the caret.

@trevinhofmann trevinhofmann self-requested a review January 15, 2025 02:37
@trevinhofmann trevinhofmann self-assigned this Jan 15, 2025
@trevinhofmann
Copy link
Collaborator

trevinhofmann commented Jan 15, 2025

@ethan-james or @raineorshine -- Can you please clarify how to reproduce the original bug described in #2708? When testing main on Desktop (Chrome) and iOS (Safari), I am not seeing the carrot be hidden for 750ms when creating a new thought (or subthought). The caret seems to appear immediately/correctly for me.

@trevinhofmann trevinhofmann removed their request for review January 15, 2025 06:36
@raineorshine
Copy link
Contributor

When creating a new though in an empty thoughtspace on mobile Safari, the caret is initially hidden.

I can test this one, no problem. I can't think of what the difference might be!

trim.2928C247-C19E-4D6E-A7F0-D2F04CC0D6BA.MOV

Copy link
Contributor

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

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

Thanks! I confirm it works for the first thought.

It looks like there is a regression where the caret is now hidden when creating a sibling thought or subthought. I confirmed it does not occur in main. Could you like into this?

Steps to Reproduce

  1. Create a new thought a.
  2. Close the keyboard.
  3. Activate New Thought or New Subthought.

Current Behavior

Caret is hidden.

Expected Behavior

Caret should not be hidden. Caret should only be hidden when animating indent.

@ethan-james
Copy link
Collaborator Author

I think I came up with a better CSS-based solution that doesn't rely on changing the animation name when new thoughts are added.

Copy link
Contributor

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

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

Interesting. Seems to work!

Thanks for the explanatory comment.

@raineorshine raineorshine merged commit 7d0db5e into cybersemics:main Jan 16, 2025
3 checks passed
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.

Caret hidden on New Thought in root
3 participants