Skip to content

centred the bars in status page UI#3057

Closed
yuracoff18 wants to merge 4 commits intobluewave-labs:developfrom
yuracoff18:statusPage-bars-centred-fix
Closed

centred the bars in status page UI#3057
yuracoff18 wants to merge 4 commits intobluewave-labs:developfrom
yuracoff18:statusPage-bars-centred-fix

Conversation

@yuracoff18
Copy link
Contributor

@yuracoff18 yuracoff18 commented Nov 9, 2025

Added a padding to the bars in status page, with this should be fix.

Fixes #2879

  • [ x] (Do not skip this or your PR will be closed) I deployed the application locally.
  • [x ] (Do not skip this or your PR will be closed) I have performed a self-review and testing of my code.
  • [x ] I have included the issue # in the PR.
  • [x ] I have added i18n support to visible strings (instead of <div>Add</div>, use):
const { t } = useTranslation();
<div>{t('add')}</div>
  • I have not included any files that are not related to my pull request, including package-lock and package-json if dependencies have not changed
  • [x ] I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application).
  • [x ] I made sure font sizes, color choices etc are all referenced from the theme. I don't have any hardcoded dimensions.
  • [ x] My PR is granular and targeted to one specific feature.
  • I ran npm run format in server and client directories, which automatically formats your code.
  • [x ] I took a screenshot or a video and attached to this PR if there is a UI change.
Captura de pantalla 2025-11-09 003311

Summary by CodeRabbit

  • Style
    • Refined monitor list layout: content is centered with a 1200px maximum width and increased horizontal padding to improve readability and spacing across screen sizes. These are presentation-only adjustments with no changes to behavior, data handling, or public interfaces.

@coderabbitai
Copy link

coderabbitai bot commented Nov 9, 2025

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'release_notes'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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

Walkthrough

Outer Stack in MonitorsList.jsx was updated to center and constrain layout with margin, maxWidth, and theme-based horizontal padding; a line-break formatting change was added to an adjacent Box without semantic effect.

Changes

Cohort / File(s) Summary
Monitor list layout
client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx
Added margin="0 auto", maxWidth="1200px", and paddingX={theme.spacing(7)} to the outer Stack to center and constrain content; introduced a formatting-only line break in the Box wrapping StatusLabel (no behavioral change).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Review the single JSX file for layout/styling changes and verify responsive/visual behavior across viewports and browsers.

Poem

🐰 I hopped in code to smooth the view,
Centered stacks and padding new.
A tidy Box, a tiny break—
Now status bars sit still, awake. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes the issue number (#2879) and explains the change (padding adjustment). However, several checklist items are incorrectly marked with formatting errors (e.g., '[ x]' instead of '[x]'), and at least one critical item remains unchecked. Fix checkbox formatting and verify all required checklist items are properly completed before requesting review.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: centering bars in the status page UI, matching the primary objective.
Linked Issues check ✅ Passed The code changes directly address the linked issue #2879 by adding layout refinements (margin, maxWidth, paddingX) to center the MonitorsList component on the status page.
Out of Scope Changes check ✅ Passed The changes are limited to layout refinements in MonitorsList without altering control flow or data handling, remaining fully in scope with the centering objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c04c06 and 1abe1d1.

📒 Files selected for processing (1)
  • client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx

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

@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

🧹 Nitpick comments (1)
client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx (1)

54-56: Remove redundant paddingRight.

The paddingRight="0px" is unnecessary since padding defaults to 0 in CSS. This adds no functional value and should be removed for cleaner code.

Apply this diff:

-<Box flex={statusPage.showCharts !== false ? 1 : 10}
-  paddingRight="0px"
->
+<Box flex={statusPage.showCharts !== false ? 1 : 10}>
   <StatusLabel
     status={status}
     text={status}
     customStyles={{ textTransform: "capitalize" }}
   />
 </Box>
📜 Review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cb9851 and 3822d97.

⛔ Files ignored due to path filters (2)
  • client/package-lock.json is excluded by !**/package-lock.json
  • server/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-24T17:52:55.506Z
Learnt from: Jesulayomy
Repo: bluewave-labs/Checkmate PR: 2664
File: client/src/Pages/Uptime/Create/index.jsx:92-96
Timestamp: 2025-07-24T17:52:55.506Z
Learning: In the Uptime monitor components, the `formatAndSet` function was deprecated due to rendering issues caused by state mutations. The current approach stores intervals internally in milliseconds (API format) but converts for display using `const displayInterval = monitor?.interval / MS_PER_MINUTE || 1;` and converts user input back to milliseconds using `value = value * MS_PER_MINUTE` in the onChange handler.

Applied to files:

  • client/src/Pages/v1/StatusPage/Status/Components/MonitorsList/index.jsx

Copy link

@llamapreview llamapreview bot left a comment

Choose a reason for hiding this comment

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

AI Code Review by LlamaPReview

🎯 TL;DR & Recommendation

Recommendation: Approve with suggestions

This PR successfully centers the status bars in the UI but includes minor maintainability suggestions regarding hardcoded values and redundant code.

🌟 Strengths

  • Effectively addresses the UI centering issue reported in #2879.
  • Maintains consistency with theme-based spacing where applicable.
Priority File Category Impact Summary Anchors
P2 client/src/Pages/v1/StatusPage/.../MonitorsList/index.jsx Maintainability Hardcoded padding may break responsiveness
P2 client/src/Pages/v1/StatusPage/.../MonitorsList/index.jsx Maintainability Redundant zero padding adds noise
P2 client/package-lock.json Architecture Inconsistent package-lock changes path:server/package-lock.json
P2 client/src/Pages/v1/StatusPage/.../MonitorsList/index.jsx Architecture Asymmetric padding may not center properly
⚠️ **Unanchored Suggestions (Manual Review Recommended)**

The following suggestions could not be precisely anchored to a specific line in the diff. This can happen if the code is outside the changed lines, has been significantly refactored, or if the suggestion is a general observation. Please review them carefully in the context of the full file.


📁 File: client/package-lock.json

The PR includes significant changes to both client and server package-lock.json files (+1162/-480 and +94/-21 lines respectively), which typically indicates dependency updates. However, the PR description states no dependency changes were made. This inconsistency could indicate accidental inclusion of unrelated changes or misalignment between local development and the target branch.

Related Code:



💡 Have feedback? We'd love to hear it in our GitHub Discussions.
✨ This review was generated by LlamaPReview Advanced, which is free for all open-source projects. Learn more.

@@ -31,6 +31,9 @@ const MonitorsList = ({
key={monitor._id}
width="100%"
gap={theme.spacing(2)}
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

Speculative: The use of hardcoded 50px padding contradicts the PR description's claim of avoiding hardcoded values. This fixed value may not scale appropriately across different screen sizes and devices, potentially breaking responsive behavior. The value should reference theme spacing for consistency with the application's design system.

The asymmetric padding (left padding added, right padding remains default) may not achieve true centering and could create visual imbalance. True centering typically requires symmetric horizontal spacing or flex-based centering. The current approach might only shift content rightward rather than properly centering it within the container.

Comment on lines +56 to +58
<Box flex={statusPage.showCharts !== false ? 1 : 10}
paddingRight="0px"
>
Copy link

Choose a reason for hiding this comment

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

P2 | Confidence: High

Explicitly setting paddingRight="0px" is redundant since 0 is the default padding value. This adds unnecessary code without functional benefit and could confuse future maintainers about whether there was a specific reason to override a non-zero default.

Suggested change
<Box flex={statusPage.showCharts !== false ? 1 : 10}
paddingRight="0px"
>
<Box flex={statusPage.showCharts !== false ? 1 : 10}>

@yuracoff18
Copy link
Contributor Author

I made the changes, deleting the padding 0 and changing to paddingX with theme.spacing

@gorkem-bwl
Copy link
Contributor

@yuracoff18 you have format issue here.

@gorkem-bwl gorkem-bwl requested review from SajanGhuman and removed request for Br0wnHammer, Owaiseimdad, ajhollid and karenvicent November 10, 2025 18:46
@SajanGhuman SajanGhuman mentioned this pull request Nov 11, 2025
4 tasks
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.

Status Page UI - Bars not centred properly

2 participants