Skip to content

Every page in one Way.Shell panel - #20

Merged
jacalapa merged 1 commit into
mainfrom
feat/shell-panel
Oct 17, 2026
Merged

jacalapa merged 1 commit into
mainfrom
feat/shell-panel

Conversation

@jacalapa

Copy link
Copy Markdown
Contributor

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.

  • Pages as Ways: overview (Admin), translations (the CultureWay editor), history (Editor), users (Admin), API keys (Admin), and the account page, linked from the user's name instead of a menu item. The panel lists only the pages the user may open and starts with the first one, so editors land in the editor as before.
  • One React module in 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 existing UserService, ApiKeyService and TranslationHistory. History filters are in the address, so a filtered view survives a reload.
  • Server-rendered pages left: sign-in, sign-out and access denied, with site.css cut 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.
  • Addresses: the pages moved from /admin/users, /admin/api-keys, /history and /account to 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).
  • Build: needs Way.Shell 2.1.0 (notice, hidden Ways, the panel at the root). CI and the Dockerfile build the module with Node 22, and dotnet build fails with instructions when the module is missing.

Tests

  • 119 tests. The tests of the removed pages now cover the pages' APIs: keys, users, the demo's read-only rules, history and undo, password change, and which pages each role sees.
  • New browser scenarios in e2e/check.mjs, run against the published app in demo mode under /polyglot/demo on a fresh database: 33/33 in Chrome, Edge, Firefox and WebKit. They also pass against the Docker image.

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.
@jacalapa
jacalapa merged commit 5301478 into main Oct 17, 2026
2 checks passed
@jacalapa
jacalapa deleted the feat/shell-panel branch October 17, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant