Skip to content

feat(Groups): CollapsibleGroup#259

Open
draedful wants to merge 18 commits intomainfrom
collapse_group
Open

feat(Groups): CollapsibleGroup#259
draedful wants to merge 18 commits intomainfrom
collapse_group

Conversation

@draedful
Copy link
Copy Markdown
Collaborator

@draedful draedful commented Mar 2, 2026

No description provided.

@draedful draedful requested a review from Antamansid as a code owner March 2, 2026 17:06
@gravity-ui-bot
Copy link
Copy Markdown
Contributor

Preview is ready.

@draedful draedful force-pushed the collapse_group branch 3 times, most recently from 7063130 to 0244f06 Compare March 13, 2026 14:34
@draedful draedful changed the title WIP: CollapsibleGroup feat(Groups): CollapsibleGroup Apr 3, 2026
};
```

- **`key`** (required) — unique identifier for the area within the component. If an area with the same key already exists, it is replaced instead of duplicated. Also used to persist the area's local state across render cycles.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Less details please

blockPort.isDelegated; // false
```

#### How CollapsibleGroup uses delegation
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

remove it parts

if (canvasVisible !== undefined) {
viewState?.setHiddenBlock(Boolean(canvasVisible));
// Manual control: delegate canvas rendering when canvasVisible=false
viewState?.setRenderDelegated(!canvasVisible);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

check is this real needs, because Block will remove self hitbox

width: rect.width + GROUP_PAD * 2,
height: rect.height + GROUP_PAD * 2,
},
collapsed: !!(Math.floor(Math.random() * 10) % 2),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's unnecessary here. Now, if you work with a story there are groups that open/close at random because of this line, even if you don't touch them

const sourcePort = this.$sourcePortState.value;
const targetPort = this.$targetPortState.value;
if (!sourcePort.lookup && !targetPort.lookup) {
return [sourcePort.$point.value, targetPort.$point.value];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As I understand this is breaking change, but hardly anyone signed up for this at all.

* (React overlay mode, hitbox kept). Both flags make isVisible() return false,
* but only blockHidden removes the hitbox.
*/
private blockHidden = false;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we put it in the state? I see that this has already been done in the connections, but here we have to store data both in the staff and here, and even synchronize them.

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.

3 participants