Mastersam07 / Mastersam07/kaisel
chore: alias set() onto KaiselNavigator for symmetry with KaiselRouter
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 69
- Forks
- 2
- Avg merge
- 18m
- Merged PRs (30d)
- 9
Description
KaiselRouter.set(...) and KaiselNavigator.restoreStack(...) do the same thing under different names.
From context.shell().current you only get a KaiselNavigator, so code that deliberately assigns a branchs stack reads as state restoration:
// "pop this tab back to its root" when the active tab is tapped again
shell.current.restoreStack([DashboardTabRoute(item)]);
versus the equivalent at the root:
router.set([SomeRoute()]);
restoreStack is the right name for its other caller (state restoration), but at a deliberate-assignment call site it misleads — a reviewer reasonably asks what is being restored.
Suggestion
Add set to KaiselNavigator as an alias for restoreStack, or rename for symmetry and keep the old name deprecated for a release. Small, but it is on the path anyone building a branched shell with "tap active tab to reset" behaviour will walk.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading KaiselNavigator.restoreStack and comparing it with KaiselRouter.set, then trace how shell.current exposes the navigator. Confirm the preferred compatibility approach from the issue's alias-or-deprecation options. Done means deliberate stack assignment through KaiselNavigator has a symmetric set entry point while existing restoreStack behavior remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100