Skip to content

fix: add placeholder for pages with no contributors - #594

Open
frameworks-volunteer wants to merge 2 commits into
security-alliance:developfrom
frameworks-volunteer:fix/issue-593-attribution-placeholder
Open

fix: add placeholder for pages with no contributors#594
frameworks-volunteer wants to merge 2 commits into
security-alliance:developfrom
frameworks-volunteer:fix/issue-593-attribution-placeholder

Conversation

@frameworks-volunteer

Copy link
Copy Markdown
Collaborator

Summary

  • When a page has contributor roles defined in frontmatter but all user lists are empty (users: []), the AttributionList component rendered an empty styled container with no visible content.
  • Added a placeholder message ("No contributors yet. Be the first to contribute!") with a link to the contributing guide, shown when no contributors resolve from any role group.
  • Added hasAnyContributor() helper to detect the all-empty state before rendering role sections.
  • Added CSS for the placeholder styling, consistent with existing dark/light theme patterns.

Changes

  • components/attribution/AttributionList.tsx — new hasAnyContributor() check + placeholder JSX
  • components/attribution/AttributionList.css.attribution-empty, .attribution-placeholder, .attribution-placeholder-link styles

Closes #593

…ecurity-alliance#593)

When a page has contributor roles defined but all user lists are empty,
the AttributionList component rendered an empty styled container with
no content. Now displays a "No contributors yet" placeholder with a
link to the contributing guide, improving UI/UX for new or unstewarded
pages.
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
frameworks ✅ Ready (View Log) Visit Preview a72c2ce

@frameworks-volunteer frameworks-volunteer left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Model: z-ai/glm-5.2 Reasoning: medium Provider: openrouter

Security + QA review complete. Leaving a comment review (cannot approve own PR).

Security

  • No secrets, tokens, or API keys introduced.
  • Placeholder text is static; no user input rendered — no XSS/injection surface.
  • No unsafe eval, deserialization, or new dependencies.
  • The <a href="/contribute/contributing"> is a relative internal path validated against existing docs usage. No arbitrary-URL risk.

QA

  • Changes match the PR description and linked issue #593: hasAnyContributor() helper + placeholder JSX + CSS.
  • /contribute/contributing link resolves to docs/pages/contribute/contributing.mdx — confirmed valid via repo-wide search.
  • No frontmatter changes (component-only PR, so contributor attribution rule N/A).
  • CI all green: build preview, lint, socket security, sidebar-reminder.
  • No leftover debug content, TODOs, or placeholder cruft.
  • CSS follows the existing dark/light theme pattern consistently with surrounding rules.
  • hasAnyContributor() correctly mirrors the existing RoleSection null-filtering logic.

No blockers. Ready to merge.

…he frontmatter is present + substitute <a> tag with <Link> to do not trigger a reload

@scode2277 scode2277 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've made two changes:

  • the "no contributors" message now shows on any page that has nobody to credit. Before, it only appeared when the frontmatter had a contributors: block with empty users: lists. To be extra safe, I made it that also pages with no contributors: block render it.
  • I substituted the <a> tag with the <Link> one so the click doesn't trigger a reload of the page

gtg for me @mattaereal. Check it out at -> https://595656a7.frameworks-573.pages.dev/privacy/overview

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.

Add a better placeholder/default message when a page does not have authors yet.

2 participants