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(edgeless): connector supports text label #6665

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

fundon
Copy link
Contributor

@fundon fundon commented Apr 1, 2024

The connector supports text label.
There are three modes in connector: Straight Orthogonal Curve, need to be handled separately.

Connector Label

  • Add
    • By button, default position is at the center of the path
    • By double-clicked position, along the path
  • Edit
    • By button
    • By double-clicking connector
    • By double-clicking label
  • Select
    • Show component toolbar
    • Adjust styles: font, color
    • Adjust index: front back
    • Support for moving along the path
    • Auto adjust position when adjusting connector's source or target
  • Remove
    • Select Label, and press Delete
    • Select Connector and Label, and press Delete or CMD+A + Delete
    • Select Connector, and press Delete, Label will also be deleted
  • Selection
    • Select both connector and label should only show the connector's toolbar
  • fix selection(shift+ click)
  • fix snap
  • fix tests
  • add tests

Updates

This will be split into smaller PRs.

  • Feat: add connector label #7106

Copy link

vercel bot commented Apr 1, 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 Apr 22, 2024 2:51am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Apr 22, 2024 2:51am

Copy link

graphite-app bot commented Apr 1, 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 in order to use the merge queue. Sign up using this link.

Copy link
Contributor Author

fundon commented Apr 1, 2024

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

Join @fundon and the rest of your teammates on Graphite Graphite

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.

The data structure updates should be listed in PR description.

@fundon
Copy link
Contributor Author

fundon commented Apr 3, 2024

I think Connector Label should be a standalone element to support selection, adjusting styles, dragging and dropping to move the position, adjusting the index.

@doouding
Copy link
Member

doouding commented Apr 3, 2024

Is there any special with connector text comparing to shape text?

@fundon
Copy link
Contributor Author

fundon commented Apr 3, 2024

Is there any special with connector text comparing to shape text?

  1. text can be selected
  2. supported by 1, move on the path(curve)
  3. supported by 1, adjust style and index

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

4 participants