Skip to content

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Jun 30, 2025

Summary

Screenshot 2025-07-01 at 9 29 26 AM Screenshot 2025-07-01 at 9 29 45 AM

🤖 Generated with Claude Code

f0ssel and others added 6 commits June 30, 2025 16:39
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>
@f0ssel f0ssel force-pushed the f0ssel/registry-branch branch from 5060fa3 to f72fbd5 Compare June 30, 2025 20:39
f0ssel added 3 commits June 30, 2025 21:41
- 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
@f0ssel f0ssel marked this pull request as ready for review June 30, 2025 21:59
@f0ssel f0ssel requested review from matifali and aslilac June 30, 2025 22:00
Copy link
Member

@aslilac aslilac left a 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).

Copy link
Member

@matifali matifali left a 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.

f0ssel added 5 commits July 1, 2025 12:49
…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
@f0ssel
Copy link
Contributor Author

f0ssel commented Jul 1, 2025

Updated the styling and code from feedback

Screenshot 2025-07-01 at 9 29 26 AM Screenshot 2025-07-01 at 9 29 45 AM

@f0ssel f0ssel requested review from aslilac and matifali July 1, 2025 13:40
Copy link
Member

@matifali matifali left a 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.

@matifali
Copy link
Member

matifali commented Jul 1, 2025

/cherry-pick release/2.24

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.

3 participants