Skip to content

refactor(fe): remove "container" divs#7271

Merged
jmelahman merged 1 commit intomainfrom
jamison/rm-container
Jan 8, 2026
Merged

refactor(fe): remove "container" divs#7271
jmelahman merged 1 commit intomainfrom
jamison/rm-container

Conversation

@jmelahman
Copy link
Copy Markdown
Contributor

@jmelahman jmelahman commented Jan 7, 2026

Description

I noticed after fix(fe): admin containers apply bottom padding, some pages were applying this individually + this was partially provided from this "container" class, so removed them so that the centralized layout component can uniformly apply the bottom padding.

How Has This Been Tested?

Expecting minimal visual change

I spot checked all of the admin pages on st-dev. I think that's missing some ee pages though? Might try to test those as well.

Additional Options

  • Override Linear Check

Summary by cubic

Removed redundant "container" wrappers across admin pages and centralized vertical padding in ClientLayout for consistent spacing. This standardizes layout and removes duplicate styling with minimal visual impact.

  • Refactors
    • Replaced page-level container divs with fragments to reduce extra DOM.
    • Moved vertical padding to ClientLayout (now uses uniform py-10).
    • Ensures consistent bottom padding across admin pages; no logic changes.

Written for commit 865eb62. Summary will update on new commits.

@jmelahman jmelahman requested a review from a team as a code owner January 7, 2026 20:52
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 33 files

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile Summary

This PR removes container class div wrappers from 33 admin pages and replaces them with React Fragments (<></>). The centralized ClientLayout.tsx component was updated to apply uniform bottom padding (py-10 instead of pt-10 pb-4), eliminating the need for individual pages to apply their own bottom padding via the container class.

Key changes:

  • Removed <div className="container"> wrappers from all admin and enterprise admin pages
  • Replaced with React Fragments (<></>) to maintain component structure
  • Updated ClientLayout.tsx to use py-10 for symmetric vertical padding
  • Removes instances of max-w-4xl constraint that was combined with container class in some pages
  • Also removed a wrapper div with flex flex-col pb-8 from SettingsForm.tsx

This refactor consolidates layout spacing logic into the centralized layout component, making it easier to maintain consistent styling across all admin pages.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • This is a straightforward refactoring that removes redundant wrapper divs and centralizes padding logic. The changes are purely presentational and don't affect functionality. All modifications follow a consistent pattern across 33 files, replacing container divs with React Fragments while centralizing the padding in ClientLayout.tsx.
  • No files require special attention

Important Files Changed

Filename Overview
web/src/components/admin/ClientLayout.tsx Changed padding from pt-10 pb-4 to py-10 to centralize bottom padding application
web/src/app/admin/add-connector/page.tsx Removed container div wrapper, replaced with React Fragment
web/src/app/admin/settings/SettingsForm.tsx Removed wrapper div with flex flex-col pb-8, replaced with React Fragment
web/src/app/admin/configuration/web-search/page.tsx Removed container div wrapper from multiple return paths, replaced with React Fragments

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant AdminPage
    participant ClientLayout
    participant DOM

    User->>Browser: Navigate to admin page
    Browser->>AdminPage: Render page component
    Note over AdminPage: No container div wrapper<br/>(uses React Fragment)
    AdminPage->>ClientLayout: Wrapped by layout
    Note over ClientLayout: Applies py-10 padding<br/>(centralized spacing)
    ClientLayout->>DOM: Render with uniform padding
    DOM->>Browser: Display admin page
    Browser->>User: Show page with consistent spacing
Loading

@jmelahman jmelahman added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit a9de250 Jan 8, 2026
77 of 78 checks passed
@jmelahman jmelahman deleted the jamison/rm-container branch January 8, 2026 07:29
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
@jmelahman jmelahman temporarily deployed to release-devtools January 8, 2026 07:36 — with GitHub Actions Inactive
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