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(blocks): ime bugs of slash menu and at menu #8444

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

L-Sun
Copy link
Contributor

@L-Sun L-Sun commented Sep 24, 2024

Close: BS-1444, BS-1443, BS-1442

This PR fixes IME issues of the @ menu and slash menu, including:

  • Incorrect positioning of the slash menu popover.
  • Can not open the @ menu using 【【.
  • Can not search within the @ menu using IME.

The cause of these issues is that, in Windows Microsoft Pinyin, the inline range is updated when the compositionend event is triggered. Consequently, the slot this.inlineEditor.slots.renderComplete.once and inlineEditor.slots.inlineRangeSync.once are delayed until the next keyboard input. Related PR: #7914

Before

2024-09-24-17-24-35.mp4

After

2024-09-24-17-27-38.mp4

Copy link

vercel bot commented Sep 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 9:54am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2024 9:54am

Copy link

changeset-bot bot commented Sep 24, 2024

⚠️ No Changeset found

Latest commit: 2ec2744

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

graphite-app bot commented Sep 24, 2024

Your org has enabled the Graphite merge queue for merging into master

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

L-Sun commented Sep 24, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @L-Sun and the rest of your teammates on Graphite Graphite

Copy link

nx-cloud bot commented Sep 24, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 2ec2744. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link
Contributor

github-actions bot commented Sep 24, 2024

size-limit report 📦

Path Size
@blocksuite/affine 13 B (0%)
@blocksuite/affine/effects 2.03 MB (-0.01% 🔽)
@blocksuite/affine/block-std 153.1 KB (0%)
@blocksuite/affine/block-std/gfx 75.86 KB (0%)
@blocksuite/affine/global 13 B (0%)
@blocksuite/affine/global/utils 13.82 KB (0%)
@blocksuite/affine/global/env 231 B (0%)
@blocksuite/affine/global/exceptions 552 B (0%)
@blocksuite/affine/global/di 1.65 KB (0%)
@blocksuite/affine/global/types 13 B (0%)
@blocksuite/affine/store 77.06 KB (0%)
@blocksuite/affine/inline 30.45 KB (0%)
@blocksuite/affine/inline/consts 51 B (0%)
@blocksuite/affine/inline/types 13 B (0%)
@blocksuite/affine/presets 1.84 MB (+0.34% 🔺)
@blocksuite/affine/blocks 1.92 MB (+0.03% 🔺)
@blocksuite/affine/blocks/schemas 85.39 KB (0%)

@L-Sun L-Sun requested a review from Flrande September 24, 2024 08:42
@L-Sun L-Sun marked this pull request as ready for review September 24, 2024 08:43
@L-Sun L-Sun requested a review from a team as a code owner September 24, 2024 08:43
@L-Sun L-Sun force-pushed the l-sun/fix/ime-bug-of-slash-menu-at-menu branch from 73a3077 to 1d8586b Compare September 24, 2024 09:07
Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

Also tested on macOS and LGTM

Copy link

graphite-app bot commented Sep 24, 2024

Merge activity

  • Sep 24, 5:52 AM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 24, 5:52 AM EDT: doodlewind added this pull request to the Graphite merge queue.
  • Sep 24, 5:57 AM EDT: doodlewind merged this pull request with the Graphite merge queue.

Close: [BS-1444](https://linear.app/affine-design/issue/BS-1444/在linked-doc面板,输入法输入后,面板消失), [BS-1443](https://linear.app/affine-design/issue/BS-1443/中文输入法下,段落开头输入-【【-无法唤起-linked-doc面板), [BS-1442](
https://linear.app/affine-design/issue/BS-1442/中文输入法下,输入-面板显示位置错误)

This PR fixes IME issues of the @ menu and slash menu, including:
- Incorrect positioning of the slash menu popover.
- Can not open the @ menu using `【【`.
- Can not search within the @ menu using IME.

The cause of these issues is that, in Windows Microsoft Pinyin, the inline range is updated when the `compositionend` event is triggered. Consequently, the slot `this.inlineEditor.slots.renderComplete.once` and `inlineEditor.slots.inlineRangeSync.once` are delayed until the next keyboard input. Related PR: #7914

### Before

https://github.com/user-attachments/assets/bf9aed3e-e673-437a-8375-7ce219d1d07c

### After

https://github.com/user-attachments/assets/4d3eebfd-0869-4051-87e6-c210216b4751
@doodlewind doodlewind force-pushed the l-sun/fix/ime-bug-of-slash-menu-at-menu branch from 8384188 to 2ec2744 Compare September 24, 2024 09:53
@graphite-app graphite-app bot merged commit 2ec2744 into master Sep 24, 2024
36 checks passed
@graphite-app graphite-app bot deleted the l-sun/fix/ime-bug-of-slash-menu-at-menu branch September 24, 2024 09:57
L-Sun added a commit that referenced this pull request Sep 25, 2024
Fix bugs and improve experience:
- fix slash menu and @ menu issues with IME [#8444](#8444)
- improve trigger way of latex editor [#8445](#8445)
- support in-app link jump [#8499](#8449)
- some ui improvements [#8446](#8446), [#8450](#8450)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants