Skip to content

Commit e7b6f9a

Browse files
committed
fix(toolbar): stop the block drag preview hardcoding a weight its label does not use
Third instance of the same mirror drift, found by sweeping rather than waiting for it to be reported. The toolbar item label renders at the inherited 400 (its container is `chipVariants`, which is weight-free), but the drag preview hardcoded `font-weight: 500` — so the preview never matched the item it previews, before or after this PR. Drops the weight only. The 16px is left alone: a drag preview reading larger than its source is a deliberate affordance, not a mismatch. Not fixed here, deliberately: the `font-weight: 500` in code-editor.tsx's highlight layer. That HTML is rendered in registration with a transparent textarea, so weight affects glyph advance widths and the caret alignment — it needs live in-editor verification, unlike a detached drag ghost. Its two placeholder branches already disagree on weight, so it wants its own change.
1 parent 910aabb commit e7b6f9a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/drag-preview.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export function createDragPreview(info: DragItemInfo): HTMLElement {
5858
text.style.cssText = `
5959
color: var(--text-primary);
6060
font-size: 16px;
61-
font-weight: 500;
6261
white-space: nowrap;
6362
overflow: hidden;
6463
text-overflow: ellipsis;

0 commit comments

Comments
 (0)