Repository navigation
Every page in one Way.Shell panel - #20
Merged
Merged
Conversation
Moving between Polyglot's pages (Razor, with their own stylesheet) and the editor (CultureWay in Way.Shell) looked like switching between two apps. Now every page after sign-in is a Way of one panel at the root of the app, with one menu, theme and language: overview (Admin), translations (the editor), history (Editor), users (Admin), API keys (Admin) and the account page, which the user's name links to instead of a menu item. The panel lists the pages the user may open and starts with the first, so editors land in the editor as before. The pages are one React module (src/Polyglot.Web/UI, English and Polish, the editor's monospace look) embedded in the app, with a JSON API per page in Ways/PolyglotWays.cs over the existing services. Only sign-in and access denied stay server-rendered. The demo notice is the shell's. Pages moved from /admin/users, /admin/api-keys, /history and /account to the panel (/#/users/ and so on). Without sign-in the root is the panel with the editor only. Needs Way.Shell 2.1.0 (notice, hidden Ways, the panel at the root). CI and the Dockerfile build the module with Node 22.
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.
Moving between Polyglot's pages (Razor, with their own stylesheet) and the editor (CultureWay in Way.Shell) looked like switching between two apps. Now every page after sign-in is a Way of one Way.Shell panel at the root of the app: one menu, theme and language.
src/Polyglot.Web/UI, embedded in the app, in English and Polish, with the editor's monospace look. Each page has a JSON API (Ways/PolyglotWays.cs) over the existingUserService,ApiKeyServiceandTranslationHistory. History filters are in the address, so a filtered view survives a reload.site.csscut down to them. The demo notice comes from the shell (ShellOptions.Notice). The demo stays read-only for users and passwords: the API answers 403, and the pages hide the controls./admin/users,/admin/api-keys,/historyand/accountto the panel (/#/users/, and so on). Addresses the app does not map still answer 404. Without sign-in,/is the panel with only the editor (it used to redirect to the editor).dotnet buildfails with instructions when the module is missing.Tests
e2e/check.mjs, run against the published app in demo mode under/polyglot/demoon a fresh database: 33/33 in Chrome, Edge, Firefox and WebKit. They also pass against the Docker image.