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

feat #3241

Merged
merged 9 commits into from
Jun 6, 2024
Merged

feat #3241

merged 9 commits into from
Jun 6, 2024

Conversation

felixfeng33
Copy link
Collaborator

Description

See changesets.

Copy link

changeset-bot bot commented Jun 6, 2024

🦋 Changeset detected

Latest commit: 23c5a27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 57 packages
Name Type
@udecode/plate-caption Major
@udecode/plate-floating Major
@udecode/plate-font Major
@udecode/plate-layout Major
@udecode/plate-selection Major
@udecode/plate-heading Major
@udecode/plate-math Major
@udecode/slate-utils Major
@udecode/plate-dnd Major
@udecode/plate-callout Major
@udecode/plate-indent-list Major
@udecode/plate-utils Major
@udecode/plate-link Major
@udecode/plate-core Major
@udecode/plate-media Major
@udecode/plate-code-block Major
@udecode/plate Major
@udecode/plate-basic-elements Major
@udecode/plate-serializer-docx Major
@udecode/plate-common Major
@udecode/plate-alignment Major
@udecode/plate-autoformat Major
@udecode/plate-basic-marks Major
@udecode/plate-block-quote Major
@udecode/plate-break Major
@udecode/plate-cloud Major
@udecode/plate-combobox Major
@udecode/plate-comments Major
@udecode/plate-cursor Major
@udecode/plate-diff Major
@udecode/plate-emoji Major
@udecode/plate-excalidraw Major
@udecode/plate-find-replace Major
@udecode/plate-highlight Major
@udecode/plate-horizontal-rule Major
@udecode/plate-indent Major
@udecode/plate-juice Major
@udecode/plate-kbd Major
@udecode/plate-line-height Major
@udecode/plate-list Major
@udecode/plate-mention Major
@udecode/plate-node-id Major
@udecode/plate-normalizers Major
@udecode/plate-paragraph Major
@udecode/plate-reset-node Major
@udecode/plate-resizable Major
@udecode/plate-select Major
@udecode/plate-serializer-csv Major
@udecode/plate-serializer-html Major
@udecode/plate-serializer-md Major
@udecode/plate-slash-command Major
@udecode/plate-suggestion Major
@udecode/plate-tabbable Major
@udecode/plate-table Major
@udecode/plate-toggle Major
@udecode/plate-trailing-block Major
@udecode/plate-yjs Major

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Jun 6, 2024

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

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2024 2:00pm

@zbeyens zbeyens merged commit f03cae1 into main Jun 6, 2024
6 checks passed
@zbeyens zbeyens deleted the feat/migrant branch June 6, 2024 14:14
ignoreReadOnly,
selectionExpanded,
setWaitForCollapsedSelection,
]);

React.useEffect(() => {

Choose a reason for hiding this comment

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

@felixfeng33
This change prevents automatic testing tools from selecting text and displaying the floating toolbar.
We use playwright with text locators, for example:
await this.page.getByText('Random text').selectText(), these locators had the effect of making the floating toolbar appear but now this is no longer the case.

I tried to trigger the mouseup event manually from playwright but without success.

Why do we have to listen to the mouseup event in this hook?
Do you have a workaround for my use case ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

listen to the mouseup event because we just need open the toolbar when the selection is end.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry I'm not very familiar with Playwright.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@felixfeng33 It looks like this change also breaks the toolbar for keyboard users. Can we change it to only suppress the toolbar if the pointer is currently down and the toolbar was hidden before pointerdown?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean that the toolbar doesn't appear when you use shift to select? This is a known issue, and I am planning to fix it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's right. It seems like making the dependency on specific input events optional (by waiting for pointerdown before suppressing the toolbar) would fix both the keyboard accessibility problem and @seb-mynotary's Playwright problem.

@albertoramosmoinsendi
Copy link

I have seen that in the Readme you have this link: https://platejs.org/docs/math to your doc but it does not lead anywhere. Where can I access the docs?

@felixfeng33
Copy link
Collaborator Author

I have seen that in the Readme you have this link: https://platejs.org/docs/math to your doc but it does not lead anywhere. Where can I access the docs?

sorry for causing you confusion the docs is not available yet.

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.

5 participants