imba / imba/imba.io

Routing Callback

Open
#161 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
83
Forks
36
PR merge metrics
No merged PRs in 30d

Description

In order to make the documentation menu animate correctly, I think I need to know when a new route is being navigated to. Is there a way to trigger an event in this case that can be responded to by the other nav items?

Here's what happens:

- when a section is expanded, the height of the child section is calculated so that it can be animated to (CSS won't animate to 'auto' height).
- when the animation is finished, I will set it back to 'auto' in order to accommodate changes inside it which change its height.
- when _another_ menu item is navigated to, that may cause the current section to collapse, which means the height needs to be set back to a number, instead of `auto` but I don't know how to hook up an event in that scenario.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the documentation menu's route-navigation and section animation logic in the website code; the issue does not name a file or test. Determine whether an existing navigation callback or event can notify other menu items, and consider the work done when navigating to another item lets the current section reset its height and collapse correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.