Skip to content

Hide Make a contribution CTA/modal on pages from private repos - #410

Open
JakeSCahill wants to merge 2 commits into
mainfrom
remove-contribution-cta-private-repos
Open

Hide Make a contribution CTA/modal on pages from private repos#410
JakeSCahill wants to merge 2 commits into
mainfrom
remove-contribution-cta-private-repos

Conversation

@JakeSCahill

@JakeSCahill JakeSCahill commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Related to https://redpandadata.atlassian.net/browse/DOC-2303 (making docs, cloud-docs, rp-connect-docs, adp-docs private).

1. Hide the "Make a contribution" CTA/modal on private-origin pages

The feedback footer's "Make a contribution" button opens a modal offering "Edit on GitHub" and a link to the contribution guide — a flow that only works when the underlying repo is public. The modal already hides its own "Edit on GitHub" link via page.origin.private (Antora's own per-page privacy flag), but the outer button + modal still rendered regardless, misleadingly inviting a contribution path that no longer works for external contributors.

This applies the same page.origin.private check one level up, so the whole button and modal are hidden together on pages sourced from a private repo. Still-public components (docs-site, labs) are unaffected — nothing hardcoded to specific component names, so this holds automatically for any future component that goes private too.

2. Drop the modal's now-dead generic "Contribution guide" link

For pages that stay public, the modal's second column pointed at docs-site/meta-docs/CONTRIBUTING.adoc. That file is being removed (redpanda-data/docs-site#201) since it described a fork-and-clone workflow that no longer works once the four repos above go private. There's no public replacement destination, so the column is dropped entirely rather than repointed — it only remains for the Labs branch, which stays public with its own separate guide (/labs/contribute/). Also removes README's :url-contributing: attribute, which pointed at the same removed file and wasn't referenced anywhere else in the doc.

What was checked

  • src/css/feedback-footer.css - .feedback-section uses display: flex / justify-content: space-between with no nth-child or fixed-count assumptions, so dropping columns doesn't break layout.
  • The inner "Edit on GitHub" check in contributors-modal.hbs is now redundant given the outer gate, but left in place as a harmless belt-and-suspenders check.

Related PRs

DOC-2303 makes several content-source repos private (docs, cloud-docs,
rp-connect-docs, adp-docs). Forking and editing on GitHub no longer works
for external contributors once a repo is private, so offering that path is
misleading. The inner "Edit on GitHub" link already checked
page.origin.private; this applies the same check one level up, hiding the
whole "Make a contribution" button and its modal, not just that one link
inside it. Still-public components (docs-site, labs) are unaffected since
Antora computes page.origin.private per-component automatically.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit d6a0838
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a7208a138d154000748ac83
😎 Deploy Preview https://deploy-preview-410--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 31 (🟢 up 5 from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (no change from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The feedback footer now checks page.origin.private before rendering contributor-related UI. Private-origin pages omit the contributors modal and the “Make a contribution” link. Other feedback controls remain unchanged.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: hiding the contribution CTA and modal on pages from private repositories.
Description check ✅ Passed The description accurately explains the privacy-based rendering change and its effect on contribution links and public components.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-contribution-cta-private-repos

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.

The linked docs-site/meta-docs/CONTRIBUTING.adoc is being removed
(redpanda-data/docs-site#201) since it described a fork-and-clone
workflow that no longer works once docs/cloud-docs/rp-connect-docs/
adp-docs go private. The Labs branch is unaffected — Labs stays
public and keeps its own separate contribution guide. Also drops
README's :url-contributing: attribute, which pointed at the same
removed file and wasn't referenced anywhere else in the doc.

Related: https://redpandadata.atlassian.net/browse/DOC-2303

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

LGTM — gating on page.origin.private means this is a no-op until the content repos actually flip private, so it's safe to merge ahead of Monday.

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