Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Add ability to hide and reveal contracts #27

Merged
merged 5 commits into from
Feb 9, 2024
Merged

Conversation

sdlyy
Copy link
Member

@sdlyy sdlyy commented Feb 1, 2024

Resolves L2B-2933

Notes

  • using ref instead of inline event listener to catch the event while in the capture phase and prevent it from firing store-attached ones and opening menu when hiding given node

@sdlyy sdlyy self-assigned this Feb 1, 2024
Copy link

linear bot commented Feb 1, 2024

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
protocolbeat-frontend ✅ Ready (Inspect) Visit Preview Feb 9, 2024 9:45am

Copy link
Contributor

@mateuszradomski mateuszradomski left a comment

Choose a reason for hiding this comment

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

This is really nice, but I don't like that hidden: boolean field. We can just create an array called hiddenNodes and move nodes from the main array into that array. If a node is present in hiddenNodes it's hidden and we don't need to draw it. This simplifies many things. i.e. reveling all nodes is just

nodes = nodes.concat(...hiddenNodes)
hiddenNodes = []

@sdlyy sdlyy merged commit 9be443a into master Feb 9, 2024
5 checks passed
@sdlyy sdlyy deleted the feat/hide-contracts branch February 9, 2024 09:47
sz-piotr pushed a commit to l2beat/l2beat that referenced this pull request Jul 15, 2024
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.

2 participants