blocksuite icon indicating copy to clipboard operation
blocksuite copied to clipboard

feat(edgeless): connector supports text label

Open fundon opened this issue 1 year ago • 7 comments

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

Connector Label

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

fundon avatar Apr 01 '24 06:04 fundon

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

vercel[bot] avatar Apr 01 '24 06:04 vercel[bot]

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.

graphite-app[bot] avatar Apr 01 '24 06:04 graphite-app[bot]

  • #6695 Graphite
  • #6665 Graphite 👈
  • master

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

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

fundon avatar Apr 01 '24 06:04 fundon

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

fundon avatar Apr 03 '24 05:04 fundon

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

doouding avatar Apr 03 '24 07:04 doouding

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

fundon avatar Apr 03 '24 08:04 fundon

https://github.com/toeverything/blocksuite/issues/6583

golok727 avatar Apr 07 '24 13:04 golok727