-
Notifications
You must be signed in to change notification settings - Fork 929
feat: add Coder registry links to template creation and editing #18680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add links to https://registry.coder.com in two locations: - "Browse Templates" card on starter templates page - "Browse Modules" button in template editor topbar This provides users with easy access to community templates and modules as a short-term solution before full registry integration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace template card with "Browse the Coder Registry" link in page header. The link appears in the top right aligned with the page title and includes an external link icon to indicate it opens in a new tab. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace "Browse Modules" button with "Browse the Coder Registry" link in the template editor topbar. The link matches the styling of the starter templates page with an external link icon. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace custom styled links with the existing Link component that: - Provides consistent styling and behavior - Includes proper external link icon (SquareArrowOutUpRightIcon) - Has built-in accessibility features and focus states - Removes duplicate custom CSS for link styling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add simple tests to verify the Coder registry links are present and properly configured on both the starter templates page and template editor: - Tests link text, href, target, and rel attributes - Uses existing test patterns with MSW and React Testing Library - Verifies external link behavior and accessibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix TypeScript error by passing createTestQueryClient() to renderEditorPage function call in the registry link test, matching the pattern used by other tests in the file. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
5060fa3
to
f72fbd5
Compare
- Move template editor registry link to left of build status pill - Make links consistent with size=\sm\ variant - Add white-space: nowrap to prevent text wrapping - Add proper spacing with margins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- suggested some tailwind classes to use instead of emotion styles
- I feel like the tests are pretty low value. they aren't verifying any actual behavior, they're just repeating stuff that the code already says explicitly. chromatic snapshots show that the link is definitely there, and will catch if it ever changes for "free" (no testing code).
site/src/pages/CreateTemplateGalleryPage/CreateTemplateGalleryPageView.tsx
Outdated
Show resolved
Hide resolved
site/src/pages/CreateTemplateGalleryPage/CreateTemplateGalleryPageView.tsx
Outdated
Show resolved
Hide resolved
site/src/pages/TemplateVersionEditorPage/TemplateVersionEditor.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a hard requirement but would be nice to make the link use some style. Maybe a button or a pill with an eye catching color.
…n links - Replace custom CSS with Tailwind classes (whitespace-nowrap, mr-2) - Add 'button' prop to Link components for button-like styling - Apply consistent styling across template editor and template gallery pages
- Replace Link components with Button + asChild pattern - Use variant=\outline\ for button styling - Keep tailwind classes for proper spacing
- Remove registry link tests from both page components - Fix Button variant and size values to use valid options - Remove unused theme import and reference - Fix build issues
- Import ExternalLinkIcon from lucide-react - Add icon after text in both registry link buttons - Use flex layout for proper alignment in the buttons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from the feature perspective.
/cherry-pick release/2.24 |
Summary
🤖 Generated with Claude Code