Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Feat multiple node selection #171

Merged
merged 10 commits into from Jul 6, 2022
Merged

Feat multiple node selection #171

merged 10 commits into from Jul 6, 2022

Conversation

Darmody
Copy link
Contributor

@Darmody Darmody commented Jun 30, 2022

selects multiple nodes by the mousemove event.

  • can select multiple nodes and highlight them.
  • handle copy & paste event of selection correctly.
  • distinguish text selection class name and node selection class name.
  • fix the problem that mouse move won't scroll the view.
  • highlight the rectangle area user dragged.
  • allow trigger selection from outside of the document area.

@Darmody Darmody marked this pull request as draft June 30, 2022 06:57
@Darmody Darmody force-pushed the feat-multiple-node-selection branch from 0721c7e to 8422225 Compare June 30, 2022 07:00
@Darmody Darmody temporarily deployed to pr_preview June 30, 2022 07:13 Inactive
@github-actions
Copy link
Contributor

This pull request has been built and is available for preview at pr171.mashcard.dev.
Default username/password is test1@example.com & test1234.

Devtools

@Darmody Darmody temporarily deployed to pr_preview June 30, 2022 07:49 Inactive
@Darmody Darmody temporarily deployed to pr_preview June 30, 2022 08:23 Inactive
@Darmody Darmody force-pushed the feat-multiple-node-selection branch from 95ce537 to ae555d2 Compare June 30, 2022 08:26
@Darmody Darmody temporarily deployed to pr_preview June 30, 2022 08:39 Inactive
@Darmody Darmody force-pushed the feat-multiple-node-selection branch 2 times, most recently from 71ff962 to 8e616d6 Compare June 30, 2022 11:03
@Darmody Darmody temporarily deployed to pr_preview June 30, 2022 11:19 Inactive
@Darmody Darmody force-pushed the feat-multiple-node-selection branch from fdbddc0 to 2052c8d Compare July 6, 2022 04:55
@Darmody Darmody temporarily deployed to pr_preview July 6, 2022 05:11 Inactive
@Darmody Darmody force-pushed the feat-multiple-node-selection branch from ca3862c to bb04a9b Compare July 6, 2022 07:00
@Darmody Darmody marked this pull request as ready for review July 6, 2022 07:02
@Darmody Darmody force-pushed the feat-multiple-node-selection branch from bb04a9b to 4038eb3 Compare July 6, 2022 07:05
@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #171 (ad00c16) into main (cc4d9fa) will increase coverage by 0.01%.
The diff coverage is 65.92%.

@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
+ Coverage   61.62%   61.63%   +0.01%     
==========================================
  Files         758      761       +3     
  Lines       13726    13894     +168     
  Branches     2661     2703      +42     
==========================================
+ Hits         8459     8564     +105     
- Misses       4696     4751      +55     
- Partials      571      579       +8     
Flag Coverage Δ
frontend-unit 61.63% <65.92%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
apps/client-web/src/docs/pages/DocumentPage.tsx 0.00% <0.00%> (ø)
...editor/src/extensions/extensions/selection/meta.ts 100.00% <ø> (ø)
...ensions/extensions/selection/normalizeSelection.ts 21.42% <21.42%> (ø)
...ions/extensions/bubbleMenu/bubbleMenuViewPlugin.ts 48.10% <50.00%> (-0.62%) ⬇️
...r/src/extensions/extensions/selection/domEvents.ts 57.44% <57.44%> (ø)
...r/src/extensions/extensions/selection/selection.ts 64.44% <60.97%> (-10.56%) ⬇️
...src/extensions/extensions/selection/decorations.ts 88.46% <88.46%> (ø)
...ions/extensions/selection/MultipleNodeSelection.ts 91.11% <90.90%> (-1.58%) ⬇️
...omponents/extensionViews/BubbleMenu/BubbleMenu.tsx 98.11% <100.00%> (+1.68%) ⬆️
...src/editors/documentEditor/documentEditor.style.ts 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc4d9fa...ad00c16. Read the comment docs.

@stackia
Copy link
Contributor

stackia commented Jul 6, 2022

Screen.Recording.2022-07-06.at.3.12.58.PM.mov

Sometimes click at the last line doesn't dismiss the selection state.

toadfansboy
toadfansboy previously approved these changes Jul 6, 2022
@stackia
Copy link
Contributor

stackia commented Jul 6, 2022

It looks like we can do nothing after block selection, neither copy nor move/delete.

@Darmody Darmody temporarily deployed to pr_preview July 6, 2022 07:21 Inactive
@Darmody
Copy link
Contributor Author

Darmody commented Jul 6, 2022

Screen.Recording.2022-07-06.at.3.12.58.PM.mov
Sometimes click at the last line doesn't dismiss the selection state.

It looks like we can do nothing after block selection, neither copy nor move/delete.

fixes these problems by making the document focus when mouse up.

@stackia

@Darmody Darmody temporarily deployed to pr_preview July 6, 2022 07:38 Inactive
@Darmody Darmody merged commit f9cd50d into main Jul 6, 2022
@Darmody Darmody deleted the feat-multiple-node-selection branch July 6, 2022 08:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants