Repository navigation
Way.Shell 2.1: notice, hidden Ways and the panel at the root - #1
Merged
Merged
Conversation
For an app made entirely of Ways (Polyglot), so its pages look like one app:
- ShellOptions.Notice: a note above every Way, e.g. that the app is a public
demo.
- WayModule.IsHidden: a Way the panel does not list in its menu, still opened
at #/{id}/, e.g. an account page the user's name links to. The panel opens
the first visible Way.
- UseWayShell("/"): the panel as the app's home page. It answers only at "/"
itself; Reiho's catch-all there would answer every address the host does
not map, with the panel's 404 or its sign-in instead of the host's.
The module contract stays at 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For an app made entirely of Ways, so its pages look like one app. Polyglot is the first: its own pages become Ways next to the CultureWay editor, in one panel at
/.Changes
ShellOptions.Notice: a note above every Way, in the panel and on a Way's own page (e.g. "this is a public demo").WayModule.IsHidden: the panel does not list the Way in its menu, but it still opens at#/{id}/, e.g. an account page linked from the user's name (AccountUrl = "~/#/account/"). The panel opens the first visible Way.UseWayShell("/"): the panel as the app's home page. A convention narrows Reiho's catch-all route to/itself. Without it, every address the host does not map would get the panel's 404, or a redirect to sign-in when the panel requires authorization (an API client with a key would get 302 instead of 404).MapWayat the root is still refused.The module contract stays at 2: existing modules and the
@kododo-dev/way-shell2.0 preset work unchanged.Tests
hiddenin the settings, a hidden Way, the panel at the root with and without a path base, unknown addresses still 404).