Skip to content

ENV-361 expand collapse#667

Open
henrikekelof wants to merge 2 commits into
masterfrom
ENV-361-expand-collapse-on-hash
Open

ENV-361 expand collapse#667
henrikekelof wants to merge 2 commits into
masterfrom
ENV-361-expand-collapse-on-hash

Conversation

@henrikekelof
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Collapse component to support more robust expand/collapse behavior, including cancelable slide animations and automatically expanding collapses when navigating to same-page hash targets inside collapsed content.

Changes:

  • Refactors slideUp/slideDown to centralize style cleanup and return a timer id, and adds cancelSlideToggle to cancel pending toggles.
  • Reworks Collapse initialization/interaction to bind per-toggler handlers, support immediate (non-animated) expansion, and auto-expand parent collapses for same-page #hash navigation (on click and initial load).
  • Updates Collapse documentation with clearer required markup, initialization behavior, and the new “link-to-content-inside-collapse” capability.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/envision/src/js/util/slideToggle.js Adds shared style helper utilities, returns timeout handles from slide toggles, and introduces cancellation support.
packages/envision/src/js/collapse.js Implements improved toggler handling, immediate open behavior, and hash-target auto-expansion/scrolling.
packages/envision-docs/src/pages/components/collapse.md Refreshes Collapse docs, examples, required markup, and documents hash-link expansion behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

4 participants