Skip to content

Conversation

grv-saini-20
Copy link
Collaborator

@grv-saini-20 grv-saini-20 commented Sep 10, 2025

Description of change

Fixed metastate platforms requested changes

Issue Number

closes #347

Type of change

  • Update (a change which updates existing functionality)
  • Fix (a change which fixes an issue)

How the change has been tested

CI and Manual

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • Style
    • Refined login UI across apps: informational banners and blocks use smaller, centered, lighter-text styling while keeping original content and backgrounds.
    • Centered header/subheader alignment on larger screens for improved visual balance.
    • Reduced mobile text sizes (eID hint, login button, bottom info) for better spacing.
    • Removed a decorative logo element and softened text weight/color for consistency.
    • Purely visual updates—no behavioral, auth flow, or public API changes.

Copy link
Contributor

coderabbitai bot commented Sep 10, 2025

Walkthrough

Adjusted styling on three login screens to center and de-emphasize informational text (smaller font size, lighter color, centered alignment) and removed a decorative logo; no functional, data-flow, or exported API changes.

Changes

Cohort / File(s) Summary
Group Charter Manager — banner
platforms/group-charter-manager/src/components/auth/login-screen.tsx
Informational banner classes updated to p-4 rounded-xl text-xs text-center bg-gray-100 text-gray-500 mt-4 (was p-4 rounded-xl bg-gray-100 text-gray-700 mt-4); content and logic unchanged.
Pictique — mobile login text
platforms/pictique/src/routes/(auth)/auth/+page.svelte
Presentation tweaks: added text-sm to underlined “eID App”, changed login button label from text-lg to text-base, and adjusted bottom paragraph to text-center text-xs text-black/40; no behavior changes.
Blabsy — login layout & visuals
platforms/blabsy/src/components/login/login-main.tsx
Centered headers/subheaders (text-center), changed container alignment to lg:items-center, lightened/centered various text blocks, and commented out/removed the decorative rotated W3DS logo; presentation-only edits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • coodos
  • sosweetham

Pre-merge checks (3 passed, 1 warning, 1 inconclusive)

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Linked Issues Check ❓ Inconclusive [#347] The code changes address the primary UI objectives: disclaimers and eID lines are center-aligned and de-emphasized across Group Charter Manager and Pictique, and in Blabsy text blocks are centered and the second W3DS logo has been removed, matching the linked issue's main requirements. However, the PR does not clearly demonstrate an increase in prominence for Blabsy's eID and "60 seconds" texts; the observed changes appear to center and slightly lighten some text rather than explicitly emphasize those elements. Therefore the PR partially satisfies the linked issue but leaves the specific "increase prominence" requirement for eID/"60 seconds" unresolved. Please confirm or update Blabsy (platforms/blabsy/src/components/login/login-main.tsx) to explicitly increase prominence of the eID and "60 seconds" texts (for example via bolder weight, larger size, or higher contrast) and update the PR description to call out those specific class changes so reviewers can verify compliance.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "fix: metastate-requested-changes" is concise and related to the PR purpose of applying Metastate-requested UI fixes across platforms, so it reasonably reflects the main change; however it is somewhat generic and does not explicitly mention the login UI scope. It uses an appropriate conventional prefix and ties to the request context but could be clearer for future history scanning. Consider a slightly more descriptive title referencing the login UI to improve clarity for reviewers and git history.
Out of Scope Changes Check ✅ Passed All summarized modifications are UI/style changes limited to login components within the three platform directories and align with issue #347's scope; there are no unrelated feature additions, backend changes, or configuration edits in the provided summaries. The commented-out decorative logo removal in Blabsy falls within the requested UI adjustments rather than being out of scope. I did not detect any out-of-scope code changes based on the provided diff summaries.
Description Check ✅ Passed The PR description follows the repository template and includes the required sections: a brief description, the issue reference (closes #347), type of change, testing summary, and a completed checklist, so it meets the template requirements. The description is concise and could be improved with a short file-level summary or screenshots for visual changes, but it contains the essential information reviewers expect. Given the template is followed and testing is noted, this is sufficient for a pass.

Poem

A hush upon the login tree,
I nibble fonts and center thee.
Soft gray whispers, small and neat,
A rabbit's hop makes edges sweet.
Tiny paws, a quiet feat. 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 05097c0 and b676ac4.

📒 Files selected for processing (1)
  • platforms/blabsy/src/components/login/login-main.tsx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • platforms/blabsy/src/components/login/login-main.tsx
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/metastate-requested-changes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@grv-saini-20 grv-saini-20 self-assigned this Sep 10, 2025
Copy link
Contributor

@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: 0

Caution

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

⚠️ Outside diff range comments (1)
platforms/group-charter-manager/src/components/auth/login-screen.tsx (1)

171-179: Verify Group Charter–specific login screen tasks

  • ✅ Single W3DS logo present and centered
  • ✅ “60 seconds” validity text uses bold, block styling
  • ✅ Disclaimer block is centered with text-xs and gray styling
  • ⚠️ eID instruction <p> is only text-gray-600—add text-sm and text-center for higher prominence
🧹 Nitpick comments (3)
platforms/group-charter-manager/src/components/auth/login-screen.tsx (3)

122-125: Reduce eID instruction font on small screens to avoid line breaks.

Make the copy responsive so it shrinks on narrow viewports, per the issue requirements.

-          <p className="text-gray-600">
+          <p className="text-sm md:text-base text-gray-600">
             Scan the QR code using your <a href={getAppStoreLink()}><b><u>eID App</u></b></a> to login
           </p>

157-158: Fix split closing tag.

Minor JSX formatting nit to keep tags well-formed on one line.

-			<span className="block font-light text-gray-600">Please refresh the page if it expires</span
-			>
+			<span className="block font-light text-gray-600">Please refresh the page if it expires</span>

167-167: US English spelling (optional): “centralized” vs “centralised”.

If the product copy targets US English, prefer “centralized”.

-          is stored in your own sovereign eVault, not on centralised
+          is stored in your own sovereign eVault, not on centralized
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f33bba3 and 80fe82b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • platforms/group-charter-manager/src/components/auth/login-screen.tsx (1 hunks)
🔇 Additional comments (1)
platforms/group-charter-manager/src/components/auth/login-screen.tsx (1)

162-169: Disclaimer styling aligns with Issue #347 (centered, smaller, lower-contrast).

The update to text-center, text-xs, and text-gray-500 de-emphasizes the disclaimer appropriately while keeping it readable.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (3)
platforms/pictique/src/routes/(auth)/auth/+page.svelte (3)

84-84: Copy nit: use “log in” (verb) instead of “login” (noun).

Also optional: prefer semantic <strong>/CSS underline over <b>/<u> for consistency with Tailwind utilities.

-				Scan the QR code using your <b><u class="text-sm">eID App</u></b> to login
+				Scan the QR code using your <b><u class="text-sm">eID App</u></b> to log in

137-142: Lower-contrast disclaimer may miss WCAG AA at small sizes; consider slight bump.

Keeps de-emphasis but improves readability on variable backgrounds.

-		<p class="w-full rounded-md bg-white/60 p-4 text-center text-xs leading-4 text-black/40">
+		<p class="w-full rounded-md bg-white/80 p-4 text-center text-xs leading-4 text-black/60">

144-146: Add rel="noopener noreferrer" to external link opened in a new tab.

Prevents window.opener access.

-	<a href="https://metastate.foundation" target="_blank">
+	<a href="https://metastate.foundation" target="_blank" rel="noopener noreferrer">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 80fe82b and 65bb666.

📒 Files selected for processing (1)
  • platforms/pictique/src/routes/(auth)/auth/+page.svelte (2 hunks)
🔇 Additional comments (1)
platforms/pictique/src/routes/(auth)/auth/+page.svelte (1)

90-95: Verify mobile tap target after font-size reduction.

text-base lowers label size; with py-4 the height should still be ~48px. Please confirm the button meets the 44×44px minimum on iOS/Android.

Copy link
Contributor

@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: 0

Caution

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

⚠️ Outside diff range comments (1)
platforms/blabsy/src/components/login/login-main.tsx (1)

20-30: Close SSE and add cleanup to prevent leaks/duplicate sign-ins

EventSource stays open indefinitely; close it after successful sign-in and on error.

Apply within this block:

-        eventSource.onmessage = async (e): Promise<void> => {
-            const data = JSON.parse(e.data as string) as { token: string };
-            const { token } = data;
-            console.log(token);
-            await signInWithCustomToken(token);
-        };
+        eventSource.onmessage = async (e): Promise<void> => {
+            try {
+                const data = JSON.parse(e.data as string) as { token: string };
+                const { token } = data;
+                await signInWithCustomToken(token);
+            } finally {
+                eventSource.close();
+            }
+        };
+        eventSource.onerror = (): void => {
+            eventSource.close();
+        };

Outside this range, keep it robust across unmounts:

// add to imports
import { useEffect, useState, useRef } from 'react';

// inside component
const esRef = useRef<EventSource | null>(null);

// in watchEventStream, after creating the EventSource
esRef.current = eventSource;

// in useEffect, add cleanup
useEffect(() => {
  getOfferData().catch(console.error);
  return () => esRef.current?.close();
}, []);
🧹 Nitpick comments (7)
platforms/blabsy/src/components/login/login-main.tsx (7)

14-17: Prefer relative SSE URL to avoid brittle env deps

Avoid hard reliance on NEXT_PUBLIC_BASE_URL on the client; relative paths work across dev/prod.

-        const sseUrl = new URL(
-            `/api/auth/sessions/${id}`,
-            process.env.NEXT_PUBLIC_BASE_URL
-        ).toString();
+        const sseUrl = `/api/auth/sessions/${id}`;

31-37: Same here: fetch offer via relative path

Simplifies config and prevents runtime errors if the env var is unset.

-        const { data } = await axios.get<{ uri: string }>(
-            new URL(
-                '/api/auth/offer',
-                process.env.NEXT_PUBLIC_BASE_URL
-            ).toString()
-        );
+        const { data } = await axios.get<{ uri: string }>('/api/auth/offer');

93-99: Disable the deep-link CTA until qr is ready

Prevents navigating to # and improves a11y.

-                                <a
-                                    href={qr ? getDeepLinkUrl(qr) : '#'}
-                                    className='px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-center'
-                                >
+                                <a
+                                  href={qr ? getDeepLinkUrl(qr) : undefined}
+                                  aria-disabled={!qr}
+                                  tabIndex={qr ? 0 : -1}
+                                  onClick={(e) => { if (!qr) e.preventDefault(); }}
+                                  className={`px-6 py-3 bg-blue-600 text-white rounded-lg transition-colors text-center ${qr ? 'hover:bg-blue-700' : 'opacity-50 pointer-events-none'}`}
+                                >

100-105: Fix split closing tag

Minor JSX formatting glitch; keep the closing </span> on one line.

-                                    <span className="block font-light text-gray-600">Please refresh the page if it expires</span
-                                    >
+                                    <span className="block font-light text-gray-600">Please refresh the page if it expires</span>

Also applies to: 116-121


79-83: Arbitrary content: string quoting nit

To avoid parser/minifier quirks with smart quotes, prefer single-quoted Tailwind arbitrary values.

-                    <h1 className='text-center text-3xl before:content-["See_what’s_happening_in_the_world_right_now."] lg:text-6xl lg:before:content-["Happening_now"]'>
+                    <h1 className='text-center text-3xl before:content-[\'See_what’s_happening_in_the_world_right_now.\'] lg:text-6xl lg:before:content-[\'Happening_now\']'>

Optional: render the visible copy as real text instead of ::before for better i18n/theming.


125-132: Delete commented-out W3DS logo block

Since the second logo is intentionally removed, drop dead code instead of commenting it out.

-                    {/* <div className='absolute right-0 rotate-90 top-1/2'>
-                        <Image
-                            src='/assets/w3dslogo.svg'
-                            alt='W3DS logo'
-                            width={100}
-                            height={20}
-                        />
-                    </div> */}

135-141: Disclaimer still looks emphasized; tone it down per Issue #347

Remove bold and reduce size/contrast to truly de-emphasize.

-                    <div className='grid gap-3 text-center font-bold text-white/70'>
+                    <div className='grid gap-3 text-center font-normal text-white/60 text-xs md:text-sm'>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 65bb666 and 05097c0.

📒 Files selected for processing (1)
  • platforms/blabsy/src/components/login/login-main.tsx (2 hunks)
🔇 Additional comments (4)
platforms/blabsy/src/components/login/login-main.tsx (4)

101-104: Confirm the “60 seconds” validity matches backend TTL

Make sure the offer/session actually expires in 60s across platforms to avoid misleading copy.

Also applies to: 117-120


77-77: Alignment update LGTM

Centering the right pane on large screens matches the issue’s alignment requirement.


84-86: Centered subheader LGTM

This aligns with the “center-align” requirement.


44-53: Guard browser-only APIs for SSR safety

navigator/window can be undefined during SSR — guard and return a safe default in non-browser environments. If this component is used in the Next.js App Router, add "use client" at the top of the file.

-    const getAppStoreLink = () => {
-			const userAgent = navigator.userAgent || navigator.vendor || window.opera;
+    const getAppStoreLink = (): string => {
+      if (typeof window === 'undefined' || typeof navigator === 'undefined') {
+        return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet";
+      }
+			const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera;

Verification note: root package.json showed no "next" (jq returned null) and a search found no "use client" in this file — confirm whether this package uses Next.js/App Router before adding the directive.

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.

[Bug] Login UI Inconsistencies
1 participant