projects: show badge URL in staff debug modal - #740
Draft
ericholscher wants to merge 2 commits into
Draft
Conversation
Pre-commit prettier hook reformats list bullets and inline code in AGENTS.md (pre-existing violations from the recent common sync).
Expose the project badge URL (including token for private versions) in the staff-only project debug modal so we can hand it to users who ask for it. The current ext-theme dashboard otherwise has no UI surfacing the tokenized URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HS: Had a support request for the badge url, and didn't have a way to even give it to them manually.
Summary
The ext-theme dashboard currently has no UI for retrieving a project's badge URL (the old dashboard rendered the embed snippets next to the badge image; that wasn't ported. For private projects, the URL is non-guessable — it requires a token computed from
SECRET_KEY + slugserver-side — so users have no way to construct it themselves.As a short-term measure so we can hand the URL to users who ask, this exposes the badge URL for the project's default version inside the staff-only project debug modal in
partials/header.html.The URL is generated via a new
get_project_badge_urltemplate tag inext_theme_tags.pythat wraps the existingProjectBadgeView.get_badge_urlclassmethod. For private versions this already appends the&token=query param.Test plan
&token=and resolves the correct badge staterequest.user.is_staff)Notes
AGENTS.md— pre-existing violations from the recent sync fromreadthedocs/commonthat the pre-commit prettier hook required. Happy to split this out if preferred.core/badge_markup.html) back to the ext-theme project home page.🤖 Generated by an AI agent (Claude Code)
EOF
)