Skip to content

Conversation

sosweetham
Copy link
Member

@sosweetham sosweetham commented Oct 14, 2025

Description of change

Issue Number

Type of change

  • Breaking (any change that would cause existing functionality to not work as expected)
  • New (a change which implements a new feature)
  • Update (a change which updates existing functionality)
  • Fix (a change which fixes an issue)
  • Docs (changes to the documentation)
  • Chore (refactoring, build scripts or anything else that isn't user-facing)

How the change has been tested

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

  • New Features

    • Maintenance banner is now dismissible across apps. Once dismissed, it remains hidden for that specific message in the same browser and reappears if a new maintenance message is issued.
    • Adds a clear close button and improved banner layout.
  • Chores

    • Updated linting configuration with no user-facing impact.

@sosweetham sosweetham requested a review from coodos as a code owner October 14, 2025 00:02
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds client-side dismissal to MaintenanceBanner components across multiple platforms, persisting dismissed messages in localStorage and updating render logic. Adjusts one ESLint config: marks as root, sets parserOptions.project to true, and removes a TypeScript ESLint ruleset.

Changes

Cohort / File(s) Summary
Dismissible MaintenanceBanner (React)
platforms/blabsy/src/components/common/maintenance-banner.tsx, platforms/eVoting/src/components/MaintenanceBanner.tsx, platforms/group-charter-manager/src/components/MaintenanceBanner.tsx
Add DISMISSED_KEY, isDismissed state, localStorage read/write on mount and dismiss, conditional early return when not maintenance or dismissed, and a dismiss button with SVG; wrap banner in relative container.
Dismissible MaintenanceBanner (Svelte)
platforms/pictique/src/lib/fragments/MaintenanceBanner/MaintenanceBanner.svelte
Add persistent dismissal with DISMISSED_KEY, helper functions, on-mount check against localStorage, conditional render, and dismiss button with SVG.
ESLint configuration
platforms/blabsy/.eslintrc.json
Set "root": true, change parserOptions.project to true, remove "plugin:@typescript-eslint/recommended-requiring-type-checking" from extends.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant App
  participant Banner as MaintenanceBanner
  participant API as MOTD API
  participant Storage as localStorage

  App->>Banner: Mount
  Banner->>API: fetch MOTD
  API-->>Banner: { status, message }
  alt status == "maintenance"
    Banner->>Storage: read DISMISSED_KEY
    Storage-->>Banner: dismissedMessage?
    alt dismissedMessage == message
      Banner-->>App: return null (dismissed)
    else not dismissed
      Banner-->>User: Render banner + Dismiss button
      User->>Banner: Click dismiss
      Banner->>Storage: write DISMISSED_KEY = message
      Banner-->>App: Hide banner (update state)
    end
  else not maintenance
    Banner-->>App: return null
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • feat: motd #361 — Earlier introduction of MOTD-based MaintenanceBanner components that this PR extends with client-side dismissal and persistence.

Suggested reviewers

  • coodos

Poem

I nibble on code like clover so green,
A banner once loud is now softly unseen.
Click—a hush! localStorage keeps,
Maintenance murmurs drift to sleeps.
Ears up, tail twirl—ships run clean! 🐇✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dismissible-banner

📜 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 d4b458e and 88759f6.

📒 Files selected for processing (5)
  • platforms/blabsy/.eslintrc.json (1 hunks)
  • platforms/blabsy/src/components/common/maintenance-banner.tsx (2 hunks)
  • platforms/eVoting/src/components/MaintenanceBanner.tsx (2 hunks)
  • platforms/group-charter-manager/src/components/MaintenanceBanner.tsx (2 hunks)
  • platforms/pictique/src/lib/fragments/MaintenanceBanner/MaintenanceBanner.svelte (1 hunks)

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.

@coodos coodos merged commit c3e3b19 into main Oct 14, 2025
1 of 4 checks passed
@coodos coodos deleted the feat/dismissible-banner branch October 14, 2025 00:03
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.

2 participants