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

Code block cursor update #9692

Merged
merged 5 commits into from
Jan 2, 2025
Merged

Code block cursor update #9692

merged 5 commits into from
Jan 2, 2025

Conversation

pinotalexandre
Copy link
Collaborator

Description

Changed the cursor behavior :

  • If a block only contain text -> cursor in selection mode
  • If the block contain schema, mermaid... -> cursor in default mode
Enregistrement.de.l.ecran.2025-01-02.a.11.54.40.mov

Risk

Deploy Plan

Merge PR

Copy link
Contributor

@overmode overmode left a comment

Choose a reason for hiding this comment

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

Looks good to me, please make sure that the style changes I commented about don't break anything

@@ -101,7 +101,7 @@ export function ContentBlockWrapper({
<div className="s-sticky s-top-0 s-z-50 s-w-full">
<div
id="BlockActions"
className="s-flex s-w-full s-justify-end s-gap-1 s-p-2"
className="s-absolute s-right-2 s-top-2 s-z-50 s-flex s-gap-2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this (what problem does it solve) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Viewed per IRL : cannot select first line if we don't use absolute

@@ -124,7 +124,7 @@ export function ContentBlockWrapper({
)}
</div>
</div>
<div className={cn("-s-mt-11 s-w-full", innerClassName)}>{children}</div>
<div className={cn("s-w-full", innerClassName)}>{children}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't we need this top margin ?

@overmode overmode self-requested a review January 2, 2025 15:59
@pinotalexandre pinotalexandre merged commit 15e0d22 into main Jan 2, 2025
8 checks passed
@pinotalexandre pinotalexandre deleted the code-block-cursor-update branch January 2, 2025 16:00
Copy link
Contributor

@overmode overmode left a comment

Choose a reason for hiding this comment

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

Please bump your sparkle version twice, then it's good to me :)

pinotalexandre added a commit that referenced this pull request Jan 2, 2025
pinotalexandre added a commit that referenced this pull request Jan 2, 2025
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