Skip to content

refactor(portal-framework-auth, portal-framework-ui): refactor auth page components and styles#467

Merged
pcfreak30 merged 1 commit intodevelopfrom
libs/portal-plugin-dashboard
Aug 25, 2025
Merged

refactor(portal-framework-auth, portal-framework-ui): refactor auth page components and styles#467
pcfreak30 merged 1 commit intodevelopfrom
libs/portal-plugin-dashboard

Conversation

@pcfreak30
Copy link
Copy Markdown
Member

@pcfreak30 pcfreak30 commented Aug 25, 2025

  • Created new AuthPageTitle component for consistent title styling
  • Simplified auth page layouts and removed redundant elements
  • Improved responsive styling for auth forms and banners
  • Consolidated reset password layout configuration
  • Updated form class names and container widths
  • Added className props to InlineAuthLinkBanner
  • Adjusted Vite base path configuration

Summary by CodeRabbit

  • New Features

    • Route-aware titles and link text on reset password pages.
  • Improvements

    • Consistent page titles via a new title component across login/register/reset flows.
    • Streamlined banner rendering with better small/large-screen alignment.
    • Login and Register forms are now centered and full-width for improved readability.
    • Simplified reset-password screens by removing extra wrappers and headers.
    • Reset password primary action label updated to “Continue” for clearer guidance.
  • Style

    • General layout and spacing refinements for a cleaner, more consistent UI.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 25, 2025

⚠️ No Changeset found

Latest commit: 5ae32fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 25, 2025

Walkthrough

Refactors auth page layout to use a single banner container and extends InlineAuthLinkBanner with optional class props. Introduces AuthPageTitle and updates login/register pages to use it. Simplifies login/reset-password forms’ wrappers and labels. Adds route-aware titles/links in ResetPasswordLayout. Adjusts form classNames. Updates Vite federation publicPath and base.

Changes

Cohort / File(s) Summary
Auth layout & banner components
libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx, libs/portal-framework-auth/src/ui/components/common/AuthPageTitle.tsx, libs/portal-framework-ui/src/components/InlineAuthLinkBanner.tsx
AuthPage replaces dual responsive banners with a single flow container; passes alignment via className to InlineAuthLinkBanner. New AuthPageTitle component added. InlineAuthLinkBanner gains optional className and linkClassName props and merges them via cn.
Login page & form
libs/portal-framework-auth/src/ui/components/login/LoginForm.tsx, libs/portal-framework-auth/src/ui/components/login/LoginIndex.tsx, libs/portal-framework-auth/src/ui/forms/login.tsx
LoginForm removes outer width-constraining wrapper. LoginIndex switches heading to AuthPageTitle. Login form config changes formClassName from w-full max-w-md to w-full m-auto.
Register page & form
libs/portal-framework-auth/src/ui/components/register/RegisterIndex.tsx, libs/portal-framework-auth/src/ui/forms/register.tsx
RegisterIndex uses AuthPageTitle for the title. Register form config updates formClassName to w-full m-auto; imports simplified (ActionItemType consolidated; InlineAuthLinkBanner removed).
Reset password flow
libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordLayout.tsx, libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordReset.tsx, libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordConfirm.tsx, libs/portal-framework-auth/src/ui/forms/resetPassword.ts, libs/portal-framework-auth/src/ui/forms/resetPasswordConfirm.ts
Layout becomes route-aware using useLocation/useMatches and a PAGE_CONFIG to set title/link text; renders AuthPageTitle. Reset and Confirm components remove outer wrappers/headings, keeping SchemaForm logic. Reset button label changes to “Continue”. Confirm form adds empty footerClassName.
Build/config
libs/portal-framework-core/src/vite/plugin.ts
Sets Module Federation publicPath: "auto" and Vite base: "/".

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant R as Router
  participant L as ResetPasswordLayout
  participant A as AuthPage
  participant O as Outlet (Child Route)

  U->>R: Navigate to /reset-password or /reset-password/confirm
  R->>L: Render layout
  L->>L: useLocation() / useMatches() -> currentPath
  L->>L: Select PAGE_CONFIG[currentPath]
  L->>A: Render AuthPage(beforeLink=AuthPageTitle, linkLabel/linkText from config)
  A-->>U: Banner + title displayed
  A->>O: Render child route via <Outlet/>
  O-->>U: Render SchemaForm for current step
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

A bunny bounds through fields of UI,
Tidying banners beneath the sky.
Titles sprout where routes now turn,
Forms grow sleek as layouts learn.
With paths aligned and links in tow,
Hippity-hop—auth’s good to go! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch libs/portal-plugin-dashboard

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

…age components and styles

- Created new AuthPageTitle component for consistent title styling
- Simplified auth page layouts and removed redundant elements
- Improved responsive styling for auth forms and banners
- Consolidated reset password layout configuration
- Updated form class names and container widths
- Added className props to InlineAuthLinkBanner
- Adjusted Vite base path configuration
@pcfreak30 pcfreak30 force-pushed the libs/portal-plugin-dashboard branch from 9cd8dac to 5ae32fc Compare August 25, 2025 05:15
@pcfreak30 pcfreak30 changed the title feat(portal-framework-auth, portal-framework-ui): refactor auth page components and styles refactor(portal-framework-auth, portal-framework-ui): refactor auth page components and styles Aug 25, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
libs/portal-framework-auth/src/ui/components/login/LoginForm.tsx (1)

31-41: Add max-width constraint to the login form configuration

In libs/portal-framework-auth/src/ui/forms/login.tsx the getLoginFormConfig is currently setting:

formClassName: "w-full m-auto",

Without the outer <div className="w-full max-w-md …"> wrapper, the form will span the entire container on large screens. Please update the formClassName to include a max-width utility (e.g. max-w-md) so it remains centered and doesn’t grow too wide:

- formClassName: "w-full m-auto",
+ formClassName: "w-full max-w-md m-auto",

This change will restore the intended layout width and centering on larger viewports.

🧹 Nitpick comments (21)
libs/portal-framework-core/src/vite/plugin.ts (1)

254-256: Configure Vite’s base for subpath deployments

Our grep shows no existing router basename configurations (e.g. createBrowserRouter or BrowserRouter with a basename) and a large number of hard-coded absolute hrefs (“/…”) throughout the app and generated HTML. Without a configurable base, all of these links—and your router—will break when you serve under a subpath.

Key findings:

  • No router basename detected
    • rg found zero matches for (createBrowserRouter|RouterProvider|BrowserRouter).*basename
  • Hundreds of absolute “/…” hrefs in components and static HTML (Navbar.jsx, Astro layouts, build/index.html, etc.)

Recommendations:

  • In libs/portal-framework-core/src/vite/plugin.ts, make base env-driven:

    // before
    export default defineConfig({
      base: "/",
      build: {}
    });
    
    // after
    const BASE = process.env.VITE_BASE ?? "/";
    export default defineConfig({
      base: BASE,
      build: {}
    });
  • Update any router instantiation to use BASE as basename:

    import { BrowserRouter } from "react-router-dom";
    const BASE = import.meta.env.VITE_BASE ?? "/";
    // …
    <BrowserRouter basename={BASE}>
      <App />
    </BrowserRouter>
  • Refactor all absolute hrefs and asset URLs to prepend BASE. For example, in Navbar.jsx:

    - <a href="/about">About</a>
    + <a href={`${BASE}about`}>About</a>
  • Alternatively, consider injecting <base href={BASE}> into your HTML templates and using relative URLs throughout.

These changes are optional refactors to support sub-path hosting without breaking existing root deployments.

libs/portal-framework-auth/src/ui/forms/resetPasswordConfirm.ts (1)

10-11: Use false instead of an empty string for footerClassName to disable default styling

FormConfig explicitly types footerClassName?: false | string and SchemaForm treats undefined and false differently at runtime to manage default CSS:

  • In libs/portal-framework-ui/src/components/form/types.ts (lines 68–72), footerClassName is defined as:
    /**
     * Set to false to disable default padding/border styles
     * @default "pt-4 mt-4 border-t"
     */
    footerClassName?: false | string;
  • In libs/portal-framework-ui/src/components/form/SchemaForm.tsx (lines 86–92):
    if (cConfig.footerClassName === undefined) {
      cConfig.footerClassName = defaultFooterCss;
    }
    if (cConfig.footerClassName === false) {
      cConfig.footerClassName = undefined;
    }
    • Passing false results in cConfig.footerClassName = undefined → no className prop → default CSS is disabled
    • Passing "" leaves className="" → default CSS is also disabled, but an empty class attribute remains

For consistency with other forms (e.g., login form) and to clearly signal “disable styling” (and avoid rendering an empty class attribute), update the snippet in
libs/portal-framework-auth/src/ui/forms/resetPasswordConfirm.ts:

-    footerClassName: "",
+    footerClassName: false,
libs/portal-framework-auth/src/ui/forms/login.tsx (1)

54-57: Ensure parent max-width and tighten callback types

The parent AuthPage content wrapper already enforces a max-width at the small breakpoint (sm:max-w-md), so your form won’t bleed full-width on wide viewports. You can omit a local width guard, or optionally add one for extra safety:

• libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx (around line 37):
<div className="… w-full sm:max-w-md z-10 …">

If you’d like a local guard, update the form config in login.tsx:

-  formClassName: "w-full m-auto",
+  formClassName: "w-full m-auto max-w-md",

Improve DX by narrowing the login callback type
Currently the form config accepts login: (data: any) => void. You can tighten this to the inferred schema type for better type safety:

• libs/portal-framework-auth/src/ui/forms/login.tsx (lines 13–15)

-export const getLoginFormConfig = (
-  login: (data: any) => void,
-): FormConfig<LoginFormValues> => ({
+export const getLoginFormConfig = (
+  login: (data: LoginFormValues) => void,
+): FormConfig<LoginFormValues> => ({
libs/portal-framework-auth/src/ui/components/register/RegisterIndex.tsx (1)

31-35: beforeLink now uses AuthPageTitle — nice consistency; check heading hierarchy

The h2 within AuthPageTitle improves visual consistency. Ensure heading levels remain semantically correct relative to page chrome (e.g., no skipped levels if there’s already an h1). If needed, allow configurable heading level via props in AuthPageTitle later.

libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordReset.tsx (2)

8-12: Stabilize form config with useMemo to prevent unnecessary reinitialization.

getResetPasswordForm(...) is invoked on every render which can create a new config object each time. Depending on SchemaForm/adapter internals, this may trigger avoidable re-renders or form resets. Memoize based on mutate reference.

Example (requires updating the import to include useMemo):

// add to imports:
// import React, { useMemo } from "react";

const config = useMemo(
  () => getResetPasswordForm(forgotPassword.mutate),
  [forgotPassword.mutate],
);
return <SchemaForm config={config} />;

1-15: Align file and component naming.

The file is ResetPasswordReset.tsx but the component is ResetPasswordForm. Consider renaming one for clarity (e.g., ResetPasswordRequestForm or ResetPasswordReset).

libs/portal-framework-auth/src/ui/components/login/LoginIndex.tsx (1)

20-20: Confirm heading semantics (h1 vs h2).

AuthPageTitle renders an h2. If your layout lacks a top-level h1 for the page, consider supporting an “as” prop (or promoting this one to h1) for correct document outline.

libs/portal-framework-auth/src/ui/components/login/LoginForm.tsx (1)

19-26: Tighten the submit handler’s typing.

onSubmit currently accepts any. Type it to the expected fields to catch mistakes at compile-time (e.g., missing remember, mis-typed email).

Example:

type LoginFormValues = { email: string; password: string; remember?: boolean };

const onSubmit = async (data: LoginFormValues) => {
  login({
    email: data.email,
    password: data.password,
    redirectTo: parsed.params?.to,
    remember: data.remember ?? false,
  });
};
libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordConfirm.tsx (3)

49-57: Good: defaultValues merged into config; consider not rendering the raw reset token field.

You’re pre-filling email/token via defaultValues—nice. However, exposing the token as an input (even with type=password) isn’t necessary and increases surface area. Prefer a hidden/registered field or remove the token from visible fields while still submitting it.

Additionally, since the token arrives in the query string, consider stripping it from the URL after capture to reduce leakage via browser history/referrers.

Example to clear the token from the URL after reading it:

// after const token = searchParams.get("token") || "";
useEffect(() => {
  if (!token) return;
  const url = new URL(window.location.href);
  url.searchParams.delete("token");
  window.history.replaceState({}, document.title, url.toString());
}, [token]);

If your FormFieldType supports hidden fields, switch the token field to hidden. Otherwise, register a hidden input alongside SchemaForm.


5-5: Remove unused import.

Link is no longer used after the layout simplification.

-import { Link, useSearchParams } from "react-router";
+import { useSearchParams } from "react-router";

37-46: A11y: Announce success state to screen readers.

Wrap the success text in a live region and/or set role="status" so the change is announced.

<div className="flex flex-col items-center" role="status" aria-live="polite">
  <p className="opacity-60 mb-4">Your password has been reset successfully.</p>
  <Button onClick={handleGoToLogin}>Go to Login</Button>
</div>
libs/portal-framework-auth/src/ui/components/common/AuthPageTitle.tsx (2)

9-15: Solid addition; small responsive typography check.

The classes set base to text-4xl and sm to text-3xl, making the title larger on smaller screens. If that’s unintended, flip the sizes.

-    <h2 className={cn("text-4xl sm:text-3xl font-bold mb-5 m-auto", className)}>
+    <h2 className={cn("text-3xl sm:text-4xl font-bold mb-5 m-auto", className)}>

9-15: Consider a polymorphic “as” prop for heading level flexibility.

Allow consumers to choose h1/h2/h3 while retaining default styles; keeps semantics correct across pages.

Example:

type As = keyof JSX.IntrinsicElements;
interface AuthPageTitleProps<T extends As = "h2"> {
  as?: T;
  className?: string;
  children: ReactNode;
}

export function AuthPageTitle<T extends As = "h2">({
  as,
  children,
  className,
}: AuthPageTitleProps<T>) {
  const Component = (as ?? "h2") as As;
  return (
    <Component className={cn("text-3xl sm:text-4xl font-bold mb-5 m-auto", className)}>
      {children}
    </Component>
  );
}
libs/portal-framework-auth/src/ui/forms/register.tsx (3)

1-6: Prefer splitting type-only imports for cleaner ESM output

Minor tweak: separate the type-only import to avoid emitting it at runtime and to keep tree-shaking clean in various TS/ESM configs.

Apply:

-import {
-  ActionItemType,
-  type FormConfig,
-  FormFieldType,
-  GroupOrder,
-} from "@lumeweb/portal-framework-ui";
+import type { FormConfig } from "@lumeweb/portal-framework-ui";
+import { ActionItemType, FormFieldType, GroupOrder } from "@lumeweb/portal-framework-ui";

77-78: Form width change to "w-full m-auto": verify centering with new AuthPage container

With the main content wrapper now using w-full sm:max-w-md (see AuthPage), setting the form to w-full m-auto could introduce redundant horizontal margins and unexpected vertical spacing on smaller screens. If the intent is horizontal centering only, consider using mx-auto (not m-auto) or rely on the parent container’s max width.

Option:

-  formClassName: "w-full m-auto",
+  formClassName: "w-full mx-auto",

Please sanity-check the register page at narrow widths and at the sm breakpoint to confirm no unintended extra vertical spacing is introduced by m-auto.


61-71: Use Router Link for internal ToS/Privacy links to avoid full page reloads

These internal links currently use anchor tags. Using the router’s Link keeps SPA navigation fast and preserves state.

Example:

import { Link } from "react-router-dom";
// ...
<span className="text-sm pl-2">
  I agree to the
  <Link className="text-foreground underline mx-1" to="/terms-of-service">
    Terms of Service
  </Link>
  and
  <Link className="text-foreground underline mx-1" to="/privacy-policy">
    Privacy Policy
  </Link>
</span>

If the legal pages live outside the SPA, keep anchors but consider rel="noopener" and target handling accordingly.

libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx (1)

45-49: Prefer mx-auto over m-auto on the banner to avoid vertical spacing quirks

m-auto sets both vertical and horizontal margins to auto; mx-auto confines it to horizontal centering, which better matches the intent here.

-                <InlineAuthLinkBanner
-                  className={"m-auto md:m-0"}
+                <InlineAuthLinkBanner
+                  className={"mx-auto md:mx-0"}
                   label={linkLabel}
                   linkLabel={linkText}
                   to={linkUrl}
                 />
libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordLayout.tsx (2)

8-19: PAGE_CONFIG: freeze and narrow types for safer lookups

Marking as const provides literal types for keys and values, preventing accidental key typos and improving autocomplete.

-const PAGE_CONFIG = {
+const PAGE_CONFIG = {
   "/reset-password": {
     linkLabel: "Already have an account?",
     linkText: "Login here →",
     title: "Reset your Password",
   },
   "/reset-password/confirm": {
     linkLabel: "Remember your password?",
     linkText: "Back to login →",
     title: "Confirm your password",
   },
-};
+} as const;

23-31: Simplify route matching; avoid useMatches + filter for this case

useMatches is heavier than needed and may behave unexpectedly with trailing slashes. Directly branch on location.pathname for the two known routes.

-  const location = useLocation();
-  const matches = useMatches().filter(
-    (item) => item.pathname === location.pathname,
-  );
-
-  const currentPath = matches[0]?.pathname || "/reset-password";
-  const { linkLabel, linkText, title } =
-    PAGE_CONFIG[currentPath] || PAGE_CONFIG["/reset-password"];
+  const { pathname } = useLocation();
+  const normalized = pathname.replace(/\/+$/, ""); // strip trailing slash
+  const currentPath =
+    normalized === "/reset-password/confirm"
+      ? "/reset-password/confirm"
+      : "/reset-password";
+  const { linkLabel, linkText, title } = PAGE_CONFIG[currentPath];
libs/portal-framework-ui/src/components/InlineAuthLinkBanner.tsx (2)

21-26: Optional: use justify-between on the container and drop mx-auto on the link

Relying on mx-auto inside the Link to push it right is brittle. Let the container handle layout.

-    <p
-      className={cn(
-        "text-foreground text-sm w-fit flex items-center gap-2 text-left bg-secondary p-3 rounded-lg",
-        className,
-      )}>
+    <p
+      className={cn(
+        "text-foreground text-sm flex items-center justify-between gap-2 text-left bg-secondary p-3 rounded-lg w-full md:w-fit",
+        className,
+      )}>
@@
-      <Link
-        className={cn(
-          "text-foreground mx-auto whitespace-nowrap hover:underline hover:underline-offset-4",
-          linkClassName,
-        )}
+      <Link
+        className={cn(
+          "text-foreground whitespace-nowrap hover:underline hover:underline-offset-4",
+          linkClassName,
+        )}

This keeps alignment stable across screen sizes and removes the implicit layout hack.

Also applies to: 28-31


6-11: Public API extension approved—add/update docs and Storybook for new props

We’ve confirmed downstream usage of InlineAuthLinkBanner in:

  • libs/portal-shared/src/components/routes/login.tsx
  • libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx

There are no existing Storybook stories or docs for this component, so please:

• Create or update a Storybook story under
libs/portal-framework-ui/src/components/InlineAuthLinkBanner.stories.tsx
to showcase the new className and linkClassName props.
• Update any component README or documentation (e.g. in libs/portal-framework-ui/README.md) to call out the new customization points.
• (Optional) In AuthPage (libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx), consider supplying linkClassName when you need to style the link element independently of the banner wrapper.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7a08fde and 5ae32fc.

📒 Files selected for processing (14)
  • libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx (1 hunks)
  • libs/portal-framework-auth/src/ui/components/common/AuthPageTitle.tsx (1 hunks)
  • libs/portal-framework-auth/src/ui/components/login/LoginForm.tsx (2 hunks)
  • libs/portal-framework-auth/src/ui/components/login/LoginIndex.tsx (2 hunks)
  • libs/portal-framework-auth/src/ui/components/register/RegisterIndex.tsx (2 hunks)
  • libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordConfirm.tsx (1 hunks)
  • libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordLayout.tsx (1 hunks)
  • libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordReset.tsx (1 hunks)
  • libs/portal-framework-auth/src/ui/forms/login.tsx (1 hunks)
  • libs/portal-framework-auth/src/ui/forms/register.tsx (2 hunks)
  • libs/portal-framework-auth/src/ui/forms/resetPassword.ts (1 hunks)
  • libs/portal-framework-auth/src/ui/forms/resetPasswordConfirm.ts (2 hunks)
  • libs/portal-framework-core/src/vite/plugin.ts (2 hunks)
  • libs/portal-framework-ui/src/components/InlineAuthLinkBanner.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
libs/portal-framework-auth/src/ui/components/register/RegisterIndex.tsx (1)
libs/portal-framework-auth/src/ui/components/common/AuthPageTitle.tsx (1)
  • AuthPageTitle (9-15)
libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordConfirm.tsx (2)
libs/portal-framework-ui/src/components/form/SchemaForm.tsx (1)
  • SchemaForm (35-162)
libs/portal-framework-auth/src/ui/forms/resetPasswordConfirm.ts (1)
  • getResetPasswordConfirmForm (6-58)
libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordReset.tsx (2)
libs/portal-framework-ui/src/components/form/SchemaForm.tsx (1)
  • SchemaForm (35-162)
libs/portal-framework-auth/src/ui/forms/resetPassword.ts (1)
  • getResetPasswordForm (6-29)
libs/portal-framework-auth/src/ui/components/login/LoginIndex.tsx (1)
libs/portal-framework-auth/src/ui/components/common/AuthPageTitle.tsx (1)
  • AuthPageTitle (9-15)
libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordLayout.tsx (2)
libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx (1)
  • AuthPage (18-59)
libs/portal-framework-auth/src/ui/components/common/AuthPageTitle.tsx (1)
  • AuthPageTitle (9-15)
🔇 Additional comments (8)
libs/portal-framework-core/src/vite/plugin.ts (1)

143-152: No 404s detected in quick grep; please perform manual environment verification

The rg scan against dev‐server logs didn’t reveal any “GET … static/… 404” errors, which is a good sign. However, automated greps can miss cases when the server isn’t running or logs aren’t captured. To be certain that publicPath: "auto" works correctly everywhere, please manually sanity-check that federated remote chunks load without 404s in all target environments:

• Local development
– With and without a VITE_TUNNEL_HOST set
• Preview/staging behind your reverse proxy
• Production/CDN, especially when assets are served from non-root subpaths

Also confirm that there are no conflicting asset-base or base/assetFileNames overrides in your Vite or deployment config that might interfere with publicPath: "auto".

libs/portal-framework-auth/src/ui/forms/resetPasswordConfirm.ts (1)

32-36: Label formatting change is a no-op — OK

No functional impact; keeping the “Reset Token” label as-is is fine.

libs/portal-framework-auth/src/ui/forms/resetPassword.ts (1)

12-14: CTA text changed to “Continue” — no stale references in this package

Good UX tweak for multi-step flows. I verified across the auth forms in this library and didn’t find any hard-coded references to the old “Reset Password” label in the initial form or its tests—only the confirm step still intentionally uses “Reset Password” in resetPasswordConfirm.ts.

• The initial reset form (resetPassword.ts) now uses

label: "Continue",

• No occurrences of label: "Reset Password" remain in libs/portal-framework-auth/src/ui/forms/resetPassword.ts or related tests
• The confirm form (resetPasswordConfirm.ts) still uses

label: "Reset Password"

as expected for step 2
• If you have any E2E tests or i18n keys in consuming applications or plugins that target the initial button copy, please update them to “Continue”

If supported by your ActionItem schema, consider adding a stable test ID (e.g., data-testid) to the action button to decouple tests from copy changes.

libs/portal-framework-auth/src/ui/components/register/RegisterIndex.tsx (1)

11-11: AuthPageTitle import — consistent title componentization

Importing the shared title component aligns register with the new auth-page pattern.

libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordReset.tsx (1)

11-11: LGTM: Simplified markup is clean and preserves behavior.

Returning the SchemaForm directly reduces unnecessary wrappers without altering logic.

libs/portal-framework-auth/src/ui/components/login/LoginIndex.tsx (1)

9-9: Consistent heading via AuthPageTitle looks good.

The switch to AuthPageTitle centralizes styling and keeps the page structure tidy.

Also applies to: 20-20

libs/portal-framework-auth/src/ui/components/common/AuthPage.tsx (1)

40-51: Unified in-flow banner container reads cleaner and is easier to reason about

Consolidating to a single banner wrapper and rendering beforeLink + InlineAuthLinkBanner together in flow improves maintainability and mobile behavior. Looks good.

libs/portal-framework-auth/src/ui/components/reset-password/ResetPasswordLayout.tsx (1)

34-41: Route-aware title via AuthPageTitle + dynamic link copy is a nice UX touch

The beforeLink title and per-route link text make the flow clearer without complicating the layout. Nicely done.

@pcfreak30
Copy link
Copy Markdown
Member Author

@coderabbitai add a learning that react-router-dom is a proxy to react-router in v7 and to use it will cause build problems, thus stop recommending this as its not broken.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 25, 2025

Tip

For best results, initiate chat on the files or code changes.

@pcfreak30 I understand your request to add a learning about React Router v7. However, I already have a very similar learning in my knowledge base from your previous comment in this same PR:

"In React Router v7, react-router-dom is a proxy to react-router and using react-router-dom imports will cause build problems. The correct approach is to import components like Link directly from react-router, not react-router-dom."

This existing learning already captures the key points you mentioned:

  • react-router-dom is a proxy to react-router in v7
  • Using react-router-dom will cause build problems
  • I should import directly from react-router instead

I'll continue to apply this guidance in future reviews and avoid recommending react-router-dom imports for React Router v7 projects. Since the existing learning covers the same information, I won't add a duplicate entry.


🧠 Learnings used
Learnt from: pcfreak30
PR: LumeWeb/web#467
File: libs/portal-framework-ui/src/components/InlineAuthLinkBanner.tsx:3-3
Timestamp: 2025-08-25T05:30:25.672Z
Learning: In React Router v7, `react-router-dom` is a proxy to `react-router` and using `react-router-dom` imports will cause build problems. The correct approach is to import components like `Link` directly from `react-router`, not `react-router-dom`.

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