Skip to content

[Learn-Components] Remove extra closing brace in ChapterStyle - #8443

Merged
miacycle merged 1 commit into
layer5io:masterfrom
ayushbuilds-code:fix/8442-chapter-style-extra-closing-brace
Nov 18, 2026
Merged

miacycle merged 1 commit into
layer5io:masterfrom
ayushbuilds-code:fix/8442-chapter-style-extra-closing-brace

Conversation

@ayushbuilds-code

@ayushbuilds-code ayushbuilds-code commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Description
This PR fixes #8442 by removing a stray closing brace } in src/components/Learn-Components/Chapters-Style/chapters.style.js.

The stray brace caused unbalanced braces in the styled component, prematurely terminating the CSS block and affecting subsequent rules (.image-design-icons and .chapter-image).

Fixes
Fixes #8442

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have signed my commits (DCO signed-off)

Summary by CodeRabbit

  • Style
    • Cleaned up chapter-related styling declarations. No changes to the app’s visible appearance or functionality are noted.

Signed-off-by: Ayush <ayushdungarwal3445@gmail.com>
@github-actions github-actions Bot added the area/learn Related to /learn section label Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change removes an extra closing brace from ChapterStyle, reformats heading selectors and a theme-property expression, and reindents the chapter-image comment.

Changes: ChapterStyle styling

Layer / File(s) Summary
ChapterStyle rules and comment
src/components/Learn-Components/Chapters-Style/chapters.style.js
The extra closing brace is removed. Heading selectors and a theme-property expression are reformatted, and the chapter-image comment is reindented.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested labels: area/learn

Suggested reviewers: nikhil-ladha

Merge Risk: Minimal · up to 59ae6

This fixes a CSS brace error so the later image rules apply as intended. The change is small and localized, and no merge-blocking risk is identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: removing an extra closing brace in the ChapterStyle component. The raw summary says ChapterStyle removes an extra closing brace before .image-design-icons, and the PR objec…
Linked Issues check Passed Issue #8442 requires removing the redundant closing brace after the a selector in ChapterStyle so the CSS block is balanced. The whole-PR diff (merge base b6495f4 to head 59ae694) removes the extr…
Out of Scope Changes check Passed All changes are in chapters.style.js, the file named by #8442. Besides the brace removal, the diff contains formatting-only edits: splitting selector lists onto separate lines, adding a space in `(p…
Full details: Title check

Explanation

The title names the change: removing an extra closing brace in the ChapterStyle component. The raw summary says ChapterStyle removes an extra closing brace before .image-design-icons, and the PR objectives confirm the stray brace was removed from chapters.style.js. The title is specific and matches the main change, so the check passes. The title also names the component path area as [Learn-Components], which matches the changed file.

Full details: Linked Issues check

Explanation

Issue #8442 requires removing the redundant closing brace after the a selector in ChapterStyle so the CSS block is balanced. The whole-PR diff (merge base b6495f4 to head 59ae694) removes the extra } after the a { &amp;:hover { ... } } block. At head, the a block closes correctly and .image-design-icons and .chapter-image follow inside ChapterStyle. The brace count at head is balanced. The issue asks for no automated tests, so no test requirement applies.

Full details: Out of Scope Changes check

Explanation

All changes are in chapters.style.js, the file named by #8442. Besides the brace removal, the diff contains formatting-only edits: splitting selector lists onto separate lines, adding a space in (props) =&gt;, removing trailing whitespace, and reindenting a comment. None of these change CSS behavior. These edits relate to the same styled block and do not introduce unrelated functional changes. They add some review noise but do not require remediation.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/Learn-Components/Chapters-Style/chapters.style.js

Parsing error: The keyword 'import' is reserved

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b99ff574-a3c0-490d-9983-08d8e798ab1a
Commits

Reviewing files that changed from the base of the PR and between b6495f4 and 59ae694.

Files selected for processing: 1

  • src/components/Learn-Components/Chapters-Style/chapters.style.js

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for PR #8443 removed.

This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits.

If needed, push a new commit to this PR to generate a fresh preview.

@miacycle miacycle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch, and the fix checks out. I verified the counts directly: the base file has 11 opening braces against 12 closing, with the stray } at line 19 after the a hover block, and this PR brings it to 11/11 with that brace removed. The linked issue #8442 describes exactly this, so the change matches its intent.

The small formatting normalizations in the same file (splitting the multi-selector rules onto separate lines, consistent arrow-function parens, trailing whitespace) are harmless and keep the diff readable.

One question, non-blocking: the issue describes the stray brace as prematurely terminating the styled block. Did the rules below it (.image-design-icons, .chapter-image) actually stop applying on the rendered page, or was the CSS parser quietly recovering? Worth a quick visual check of a chapter page to confirm the fix restores the intended styling.

@leecalcote
leecalcote removed the request for review from carlosriosilva November 18, 2026 06:57
@ayushbuilds-code

Copy link
Copy Markdown
Contributor Author

Thanks for the review @miacycle!

To answer your question: ChapterStyle is imported and wraps chapter MDX content across content-learn (for example, content-learn/mastering-meshery/introduction-to-meshery/meshery/deploying-meshery-designs.mdx).

In styled-components (via stylis), styles inside the template literal are scoped to the generated component class. Because the extra } closed the component block early, rules below it (.image-design-icons and .chapter-image) were emitted un-nested / outside the component's generated scope rather than being properly scoped under ChapterStyle.

Verified on the preview build that the chapter images and responsive styling apply cleanly as intended.

@miacycle miacycle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for following up. The preview verification answers my question, the fix matches issue #8442, and the build and DCO checks are green. Approving.

@miacycle
miacycle merged commit 4fbd384 into layer5io:master Nov 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/learn Related to /learn section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Learn-Components] Remove extra closing brace in ChapterStyle component styling

2 participants