Skip to content

Fixed heading anchor icon misalignment and heading formatting for Kanvas documentation section - #1197

Merged
banana-three-join merged 1 commit into
layer5io:masterfrom
RaIyAn90:patch-2
Aug 11, 2026
Merged

Fixed heading anchor icon misalignment and heading formatting for Kanvas documentation section#1197
banana-three-join merged 1 commit into
layer5io:masterfrom
RaIyAn90:patch-2

Conversation

@RaIyAn90

@RaIyAn90 RaIyAn90 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #1196.

  1. The heading anchor icon (🔗) was previously misaligned on multi-line headings. Now it fixed.
2026-08-09.21-49-44.mp4
  1. Removed anchor icon from a sub-heading.
image

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Prevented heading anchor content from wrapping onto multiple lines, improving readability and layout consistency.
    • Simplified heading link alignment for a cleaner appearance.
  • Documentation
    • Updated the “Publishing from Kanvas” heading by removing the link emoji.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The heading anchor layout now uses inline-block positioning and non-wrapping content. The “Publishing from Kanvas” heading no longer includes the trailing link emoji.

Changes

Heading presentation updates

Layer / File(s) Summary
Align heading anchors with wrapped text
assets/scss/_elements_project.scss
The .heading-link flex properties are removed. The .heading-anchor style uses inline-block and white-space: nowrap.
Remove catalog heading emoji
content/en/cloud/concepts/catalog/_index.md
The “Publishing from Kanvas” heading no longer includes the trailing link emoji.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: banana-three-join, codexraunak

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes address both requirements in [#1196]: multiline anchor alignment and removal of the unused emoji.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objectives and contain no unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the heading anchor alignment fix and formatting change in the Kanvas documentation.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/scss/_elements_project.scss`:
- Line 167: Update the .heading-link styles by removing the flex-only
declarations, then set .heading-anchor to display: inline-block while preserving
its existing transform and nowrap behavior. Ensure the heading text and anchor
use inline flow so the anchor remains immediately after the final word when
headings wrap.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c0ace054-1fde-4f8c-bb2b-f1131afdc818

📥 Commits

Reviewing files that changed from the base of the PR and between 0cdf512 and e451ae9.

📒 Files selected for processing (1)
  • assets/scss/_elements_project.scss

Comment thread assets/scss/_elements_project.scss
@banana-three-join
banana-three-join self-requested a review August 9, 2026 16:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
assets/scss/_elements_project.scss (2)

158-172: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Add a visible keyboard-focus state for the anchor.

The template renders .heading-anchor as an <a> with an aria-label. This rule sets the anchor to opacity: 0 and reveals it only on hover. Keyboard users can focus the link without hover and see no visible anchor or focus state. Add a :focus-visible or :focus-within rule that restores visibility.

Proposed fix
   &:hover .heading-anchor {
     opacity: 1;
     transform: translateY(0);
   }

+  &:focus-within .heading-anchor,
+  .heading-anchor:focus-visible {
+    opacity: 1;
+    transform: translateY(0);
+  }
 }

As per coding guidelines, interactive elements must support keyboard navigation and use ARIA labels when semantic HTML is insufficient.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/scss/_elements_project.scss` around lines 158 - 172, Update the
`.heading-anchor` styles to add a visible keyboard-focus state using
`:focus-visible` or `:focus-within`, restoring opacity (and the intended visible
transform) when the anchor receives keyboard focus while preserving the existing
hover behavior.

Source: Coding guidelines


154-173: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Restore the .heading-link nesting before merging.

Line 156 closes .heading-link before .heading-anchor and &:hover .heading-anchor. The & selector at Line 169 has no parent selector, so Sass compilation fails. Move the closing brace to after the hover rule.

Proposed fix
 .heading-link {
   position: relative;
-}
-
-  .heading-anchor {
+  .heading-anchor {
     display: inline-block;
     font-size: 0.6em;
     opacity: 0;
     transform: translateY(2px);
     transition: opacity 0.3s ease, transform 0.3s ease;
     margin-left: 0.25rem;
     text-decoration: none;
     white-space: nowrap;
   }

   &:hover .heading-anchor {
     opacity: 1;
     transform: translateY(0);
   }
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@assets/scss/_elements_project.scss` around lines 154 - 173, Restore the
`.heading-link` nesting in the `.heading-link` rule by moving its closing brace
after the nested `.heading-anchor` and `&:hover .heading-anchor` rules, ensuring
the parent selector remains valid for Sass compilation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@assets/scss/_elements_project.scss`:
- Around line 158-172: Update the `.heading-anchor` styles to add a visible
keyboard-focus state using `:focus-visible` or `:focus-within`, restoring
opacity (and the intended visible transform) when the anchor receives keyboard
focus while preserving the existing hover behavior.
- Around line 154-173: Restore the `.heading-link` nesting in the
`.heading-link` rule by moving its closing brace after the nested
`.heading-anchor` and `&:hover .heading-anchor` rules, ensuring the parent
selector remains valid for Sass compilation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9b8c6718-273c-4205-ab33-74a60e9735b0

📥 Commits

Reviewing files that changed from the base of the PR and between e451ae9 and e32fc74.

📒 Files selected for processing (1)
  • assets/scss/_elements_project.scss

@dhruveshmishra dhruveshmishra 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.

@RaIyAn90 Why have u created 2 issues for a same issue of same repo, u can cover it for the whole docs by same pr. Also make sure do not raise the pr directly, wait for someone to get u assigned to that issue, and just not resolve the suggestions given by the ai address them properly if neccesary then do the changes if not then give proper reason.

@RaIyAn90

RaIyAn90 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@RaIyAn90 Why have u created 2 issues for a same issue of same repo, u can cover it for the whole docs by same pr. Also make sure do not raise the pr directly, wait for someone to get u assigned to that issue, and just not resolve the suggestions given by the ai address them properly if neccesary then do the changes if not then give proper reason.

Hi @dhruveshmishra, thanks for the feedback.

I split them because they seemed to have different root causes one is a CSS layout bug and the other resolve by changing in .md file. I thought separating would make review cleaner. should I close #1199 and cover both in the existing issue and PR, or would you prefer I close the current PR and reopen once both issues are consolidated and I'm assigned?

On the PR being raised before assignment apologies, I should have waited. Noted for future contributions.

On the AI-review comments, I understood. I'll re-read the suggestions carefully, respond to each with reasoning, and only push changes where the suggestion is actually improving the fix. Will update the PR shortly.

@dhruveshmishra

Copy link
Copy Markdown
Contributor

If u think it coorect then u can close the other issue and add it on this issue only by making a secondary point, make a commit in this pr only for the other changes.

@Utkarsh-Mauryaa

Copy link
Copy Markdown

@RaIyAn90
Yes, I agree with @dhruveshmishra. If the issues are somewhat related but have different solutions, it would still be a good idea to keep them under a single issue when the root cause/context is related, and address the related fixes together in a single PR.

As long as the fixes are closely related and not significantly different in scope, keeping them in one issue and PR makes it easier for the reviewer to understand the overall change and review everything together.

@RaIyAn90 RaIyAn90 changed the title Fixed heading anchor icon misalignment Fixed heading anchor icon misalignment and heading formatting for Kanvas publishing section Aug 9, 2026
@RaIyAn90

RaIyAn90 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@dhruveshmishra, @Utkarsh-Mauryaa I've made the changes and merged the two issues into one as well the PRs. Now you can check this out.

@RaIyAn90
RaIyAn90 requested a review from dhruveshmishra August 9, 2026 19:27
@RaIyAn90 RaIyAn90 changed the title Fixed heading anchor icon misalignment and heading formatting for Kanvas publishing section Fixed heading anchor icon misalignment and heading formatting for Kanvas documentation section Aug 10, 2026

@banana-three-join banana-three-join 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.

For a change this small, 4 commits aren't needed, so please, squash your commits. Also, for reviews, please provide a response to all of the given suggestions to determine whether the suggestion itself is valid or not.

@RaIyAn90
RaIyAn90 force-pushed the patch-2 branch 3 times, most recently from 3942366 to cd78ac3 Compare August 11, 2026 14:23
Signed-off-by: Mubassir Raiyan <111300457+RaIyAn90@users.noreply.github.com>
Signed-off-by: RaIyAn90 <samin.raiyan09@gmail.com>

@banana-three-join banana-three-join 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.

Ty!

@banana-three-join
banana-three-join merged commit 697240c into layer5io:master Aug 11, 2026
4 checks passed
@welcome

welcome Bot commented Aug 11, 2026

Copy link
Copy Markdown

        Thank you for contributing to the Layer5 community! 🎉 \ \ Congrats! \ \         ⭐ Please leave a star on the project. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Heading anchor icon🔗misaligned on multi-line headings, [Docs] 🔗emoji appears inside a title content

4 participants