- Notifications
You must be signed in to change notification settings - Fork1k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
15 commits Select commitHold shift + click to select a range
81eb7fd
feat: add Coder registry links to template creation and editing
f0sselfb9a73e
refactor: change templates registry link to header action
f0sseld112320
refactor: change modules registry button to simple link
f0ssel3d1c952
refactor: use standardized Link component for registry links
f0ssel85233ae
test: add registry link tests for template pages
f0sself72fbd5
fix: provide required QueryClient parameter to renderEditorPage
f0ssel4f81fe5
fix: update registry links styling
f0sselc7af960
fix: remove unused css import to fix lint error
f0sselc4d1b09
fmt
f0ssel2a13787
refactor: use Tailwind classes for registry links and make them butto…
f0sselcd97e0d
refactor: use Button with asChild for registry links
f0sseld138ef2
chore: remove tests and fix lint errors
f0ssel1332676
fix whitespace
f0sselabd3b27
feat: add external link icon to registry buttons
f0ssele3abac5
fmt
f0sselFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
18 changes: 17 additions & 1 deletionsite/src/pages/CreateTemplateGalleryPage/CreateTemplateGalleryPageView.tsx
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
22 changes: 18 additions & 4 deletionssite/src/pages/TemplateVersionEditorPage/TemplateVersionEditor.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import { type Interpolation, type Theme, useTheme } from "@emotion/react"; | ||
import IconButton from "@mui/material/IconButton"; | ||
import Tooltip from "@mui/material/Tooltip"; | ||
import { getErrorDetail, getErrorMessage } from "api/errors"; | ||
@@ -12,6 +11,7 @@ import type { | ||
WorkspaceResource, | ||
} from "api/typesGenerated"; | ||
import { Alert } from "components/Alert/Alert"; | ||
import { Button } from "components/Button/Button"; | ||
import { Sidebar } from "components/FullPageLayout/Sidebar"; | ||
import { | ||
Topbar, | ||
@@ -25,7 +25,7 @@ import { displayError } from "components/GlobalSnackbar/utils"; | ||
import { Loader } from "components/Loader/Loader"; | ||
import { TriangleAlertIcon } from "lucide-react"; | ||
import { ChevronLeftIcon } from "lucide-react"; | ||
import {ExternalLinkIcon,PlayIcon, PlusIcon, XIcon } from "lucide-react"; | ||
import { linkToTemplate, useLinks } from "modules/navigation"; | ||
import { ProvisionerAlert } from "modules/provisioners/ProvisionerAlert"; | ||
import { AlertVariant } from "modules/provisioners/ProvisionerAlert"; | ||
@@ -255,6 +255,20 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({ | ||
paddingRight: 16, | ||
}} | ||
> | ||
<span className="mr-2"> | ||
<Button asChild size="sm" variant="outline"> | ||
<a | ||
href="https://registry.coder.com" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Ideally we would like to point to | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="flex items-center" | ||
> | ||
Browse the Coder Registry | ||
<ExternalLinkIcon className="size-icon-sm ml-1" /> | ||
</a> | ||
</Button> | ||
</span> | ||
<TemplateVersionStatusBadge version={templateVersion} /> | ||
<div className="flex gap-1 items-center"> | ||
@@ -312,8 +326,8 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({ | ||
dismissible | ||
actions={ | ||
<Button | ||
variant="subtle" | ||
size="sm" | ||
onClick={onCreateWorkspace} | ||
> | ||
Create a workspace | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.