Skip to content

Conversation

@Lihlu
Copy link
Collaborator

@Lihlu Lihlu commented Jan 19, 2026

Introduce ACTIVE_* constants to provide a single source of truth for customizing application layout, header, login page, and footer components. This allows users to change layout configuration by modifying only the Active Layout Configuration section in constant.ts.

Summary by CodeRabbit

  • Chore
    • Centralized layout and active form selection into configurable constants.
    • Components now use the centralized settings for layout, header, login form, and footer, making it easier to switch which header/login/footer is shown across the app.

✏️ Tip: You can customize this high-level summary in your review settings.

Introduce ACTIVE_* constants to provide a single source of truth for customizing
application layout, header, login page, and footer components. This allows users
to change layout configuration by modifying only the Active Layout Configuration
section in constant.ts.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

Replaces literal layout and direct configuration identifiers with centralized constants exported from shesha-reactjs/src/components/mainLayout/constant.ts; updates six files to consume these new constants instead of previous literals or direct configuration imports.

Changes

Cohort / File(s) Summary
Central configuration
shesha-reactjs/src/components/mainLayout/constant.ts
Adds exports: LAYOUT_MODE: LayoutMode = 'defaultLayout', ACTIVE_HEADER = HEADER_CONFIGURATION, ACTIVE_LOGIN = LOGIN_CONFIGURATION, ACTIVE_FOOTER = FOOTER_CONFIGURATION; reorganizes documentation regions.
Layout selection callers
shesha-reactjs/src/app/(main)/layout.tsx, shesha-reactjs/src/app/page.tsx
Replace hard-coded 'defaultLayout' string with imported LAYOUT_MODE when calling useLayoutSelection(...).
Login / header / footer form refs
shesha-reactjs/src/app/login/page.tsx, shesha-reactjs/src/components/horizontalLayout/index.tsx, shesha-reactjs/src/components/mainLayout/header.tsx
Swap direct imports/uses of LOGIN_CONFIGURATION, HEADER_CONFIGURATION, FOOTER_CONFIGURATION for ACTIVE_LOGIN, ACTIVE_HEADER, ACTIVE_FOOTER respectively; remove a type cast on login formId.

Sequence Diagram(s)

(omitted — changes are configuration/constant centralization and do not introduce a new multi-component sequential flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • James-Baloyi
  • IvanIlyichev

Poem

🐰 I hopped through constants, neat and bright,

ACTIVE names gathered, lined up just right.
From header to footer the meadow is one,
No scattered strings — a tidy run. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main objective: centralizing layout configuration into a single constants file, which is precisely what the changes accomplish.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

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: 1

🤖 Fix all issues with AI agents
In `@shesha-reactjs/src/components/mainLayout/constant.ts`:
- Around line 18-41: Add explicit type annotations for the exported constants
ACTIVE_HEADER, ACTIVE_LOGIN, and ACTIVE_FOOTER (similar to LAYOUT_MODE's
LayoutMode annotation) to improve clarity and type safety; update the
declarations for ACTIVE_HEADER, ACTIVE_LOGIN, and ACTIVE_FOOTER to include their
respective types (e.g., HeaderConfigType, LoginConfigType, FooterConfigType or
the actual types used for HEADER_CONFIGURATION, LOGIN_CONFIGURATION,
FOOTER_CONFIGURATION) so the compiler and readers can see the intended types
directly on ACTIVE_HEADER, ACTIVE_LOGIN, and ACTIVE_FOOTER.

@Lihlu Lihlu marked this pull request as ready for review January 19, 2026 08:14
@Lihlu Lihlu requested a review from James-Baloyi January 19, 2026 08:15
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