Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BeamLocation becomes BeamStack, has finer control over "route structure" and can understand "infinite pushes" #608

Open
slovnicki opened this issue Apr 10, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request proposal An idea
Milestone

Comments

@slovnicki
Copy link
Owner

This is a work in progress proposal and will be updated with implementation details

For more details about where this is coming from, visit v2 Roadmap Discussion or v2 Roadmap Wiki.
This issue will be separated into multiple issues when implementation details become clearer;

  • Rename BeamLocation to BeamStack
  • Implement finer "route structure"
  • Enable "inifnite pushes"

Motivation

Renaming BeamLocation is something I've been thinking about for years. Most of the people think about word "location" representing a single route. This opinion is also strengthened when we see that RouteInformation has a property called location. In Beamer, BeamLocation was never meant to mean route, but something like "Beam World", i.e. a region in your application that is identifiable by a combination of routes and page stacks. Building a page stack was always the most important part of its functionality, so renaming it to BeamStack should be better. Now the opportunity of v2 makes this breaking change possible so we are going for it. Additionally, we'll add a finer control over route stack so BeamStack makes even more sense.

An interesting problem in declarative routing is being able to handle infinite pushes. If we imagine a shop application that has a product details page. From that page, we can see related products and go to their details page, and so on, inifinitely deep. A natural thing to expect is to have the URI always be /product/:id, but the stack of pages arbitrarily long. This is very challenging to do when we need to declare routes before runtime. There is a workaround that I found and successfully applied in some projects so I want to bring that feature into Beamer internally.

@slovnicki slovnicki added this to the v2 milestone Apr 10, 2023
@slovnicki slovnicki self-assigned this Apr 10, 2023
@slovnicki slovnicki added enhancement New feature or request proposal An idea labels Apr 10, 2023
@SAGARSURI
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal An idea
Projects
None yet
Development

No branches or pull requests

2 participants