Repository navigation
Conversation
…ceptance tests - Upgrade the Aurora harness to 1.0.0-alpha.16: imports from @plone/quanta and @plone/icons, which build before @plone/components. - Render Aurora's /login with identity-core's LoginForm, keeping Aurora's frame: providers, magic link and, when enabled, the password form. The loginActions slot sits inside Aurora's password <Form>, so the add-on swaps the file @plone/cmsui registers for /login instead. - Move the --identity-* tokens and base classes from volto-identity into identity-core, and map them onto Quanta in Aurora, with Quanta's icons. - Move asBoolean, asksToChoose and CHOOSE_LOGIN_PATH into identity-core, add endpoints.login and IdentityUI.paths. - Add .github/workflows/aurora.yml: lint, typecheck, i18n, unit tests and build, plus Playwright acceptance tests signing in through Dex. - Document the frontend split in docs/docs/concepts/frontends.md. Refs #132
…e by side Volto's development server takes ports 3000 and 3001, so Aurora runs beside it on 3002. Provider sign-in works only on port 3000, where the providers' registered redirect URI points. Refs #132
Stylelint skips node_modules only under its working directory, and the harness lints ../packages/aurora-identity, so CI linted the CSS of every package the add-on links to: 3086 errors, among them jsdom's default stylesheet. A negated glob limits it to the add-on's own stylesheets. Refs #132
3 tasks
This branch has not been deployed
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.
Fourth phase of #132, stacked on #135. Draft: please don't merge. Each phase gets its own PR, built on the previous one, and none is merged until the whole series has been reviewed.
The polish pass on the Aurora add-on: Aurora 1.0.0-alpha.16, a login page offering the same choices as Volto's, Aurora's theme and icons, CI, and an end-to-end test of a real sign-in.
Aurora 1.0.0-alpha.16
Upgraded following Aurora's upgrade guides (
docs/upgrade-guide/plone-aurora.mdandplone-components.mdin its checkout). The changelogs list breaking changes for@plone/componentsonly, and the guides cover all of them.@plone/quantaLinkimported from there@plone/icons@plone/icons/svg/*.svg?react;types.d.tsimports@plone/icons/svg@plone/componentsneeds@plone/iconsbuilt firstbuild-depsandbuild:depsbuild icons and quanta firstalpha.16 also fixes the server not loading translations. The dev server used to render raw keys (
cmsui.auth.signInTo), and React replaced the page on hydration. Phase 3 had noted this as Aurora's dev-only hydration mismatch. The login page now arrives translated.Aurora's
/login, rendered by the add-onAurora's login page draws a password form and offers the
loginActionsslot inside that<Form>. The add-on's ways in are forms of their own, and a form inside a form is not HTML. Aurora's registry can add a route but not replace one. Solib/routes.tsswaps the file@plone/cmsuiregisters for/login, keeping the route's path and its place under Aurora's layout.routes/login.tsxloginLogoandloginHeroslots, heading) around core'sLoginForm, the one Volto shows?choose@login) and sending a magic link (@magic-link), called from the server through the virtual-host URL, like the callback routelib/settings.tsIDENTITY_SHOW_PLONE_LOGINandIDENTITY_REDIRECT_TO_SOLE_PROVIDER, overconfig.settings.identity, with Volto's defaults. Read in the loader, so at run timeIf a later Aurora moves its login file, the add-on leaves Aurora's page alone and warns while the site builds.
AGENTS.mdnotes the check to make on each Aurora upgrade.This replaces phase 3's
loginActionsslot and itsrootLoaderDatautility. The callback page's retry link now goes to/login?choose=1, as in Volto.Theme and icons
Aurora's provider buttons were half-styled: core's components read
--identity-*custom properties that only Volto's stylesheet defined.identity-button,identity-surface,identity-spinner, …) moved toidentity-core/src/styles.css, imported by core's entry point. Volto'sstyles.csskeeps only its own (stats boxes, search boxes, tabs). Both bundles were checked to carry them.AuroraIdentityUI.cssmaps the tokens onto Quanta's palette, and the buttons fill the login column.AuroraIdentityUIprovides Quanta'sarrow-rightandcloseicons. A newIdentityUI.pathssends the password-reset link to Aurora's/reset-password; Volto keeps/passwordreset.Also moved to core:
asBoolean,asksToChooseandCHOOSE_LOGIN_PATH, with their tests. Volto re-exports them, so its imports are unchanged.CI
.github/workflows/aurora.yml, called frommain.ymlon frontend changes:make install,lint(ESLint, typecheck, Prettier, Stylelint),ci-i18n,ci-test,buildbackend/tests/_resources/dex/config.yaml, a production build of Aurora, then PlaywrightThey pass actionlint, but they have not run on GitHub yet. This push is their first run.
Acceptance tests
frontend/aurora/acceptance, withmake acceptance-*targets to start each service locally. They are documented incontributing.md./login?choose=1shows the Dex button. Dex's own form signs the user in, and the browser lands on/with Aurora's session cookie/logingoes straight to Dex/login-identity?error=access_deniedexplains, and leads back to/login?choose=1All four pass locally against the real stack.
Verified by hand
Against a local site with Dex:
auth_sevenand redirects tocame_from.Docs
docs/docs/concepts/frontends.mdexplains why there are three packages, what core may import,IdentityUI, the shared translations and tokens, how Aurora reaches the backend, why/loginis replaced, and the settings side by side.AGENTS.mdandcontributing.mdgain the new gates and the acceptance run.contributing.md. Run them one at a time on port 3000, or side by side with Aurora on 3002, since Volto's development server takes 3000 and 3001. Provider sign-in works only on 3000, where the providers' redirect URI points.Dex,Quantaandgettextwere added to Vale's vocabulary.Checks
IdentityUI, +1@login, and 18 moved from Volto). Volto 664, the 18 gone to core. Aurora add-on 26make -C frontend lint,make aurora-lint, both typechecksci-i18n, both harnessespnpm build;make aurora-buildmake docs-build; ValeNot in this PR