Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add tasks-docker first in starter templates list#20169

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

Open
bcpeinhardt wants to merge9 commits intomain
base:main
Choose a base branch
Loading
frombcpeinhardt/add-run-coder-tasks-on-docker-to-starter-templates

Conversation

bcpeinhardt
Copy link
Contributor

This PR:

  • Adds the tasks-docker template to the embeded template examples
  • Makes the tasks-docker template the leading template on the starter-templates page
  • Makes the tasks-docker template the leading template on the featured templates list (inEmptyTemplates)

closes#19718

Screen.Recording.2025-10-03.at.4.24.43.PM.mov

constsortVisibleTemplates=(templates:TemplateExample[])=>{
// The docker template should be the first template in the list,
// as it's the easiest way to get started with Coder.
constdockerTemplateId="docker";
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Previously, the docker template was being moved to the front of the list in the frontend. We simply swapped that for the tasks-docker template.

Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure I'm understanding the product goal: are we okay with dropping the old Docker template entirely, or would we still want it to be second in the list? We still have the Docker template as the second one for the empty templates component

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

The docker template is just no longer the very first template displayed. It's still in the list we're sorting it's just ordered based on its name rather than being manually pulled to the front.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Product wise I think these are meant to be different lists. The EmptyTemplates component is only ever seen when your deployment hasno templates pushed, whereas the starter-templates page is more likely to be encountered by a typical developer looking to make a quick template.
But also I'm okay with simply making the docker template second here too.

//go:embed templates/kubernetes-devcontainer
//go:embed templates/nomad-docker
//go:embed templates/scratch
//go:embed templates/tasks-docker
Copy link
ContributorAuthor

@bcpeinhardtbcpeinhardtOct 3, 2025
edited
Loading

Choose a reason for hiding this comment

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

We currently embed the starter template in the binary. This is where we add the tasks-docker template to the list (the examples/templates/tasks-docker directory contains its contents copied fromhttps://github.com/coder/registry/tree/main/registry/coder-labs/templates/tasks-docker).

@bcpeinhardtbcpeinhardtforce-pushed thebcpeinhardt/add-run-coder-tasks-on-docker-to-starter-templates branch from6974c83 tob865e8aCompareOctober 3, 2025 21:52
@bcpeinhardtbcpeinhardt marked this pull request as draftOctober 3, 2025 21:52
USAGE:  coder templates init [flags] [directory]  Get started with a templated template.OPTIONS:      --id aws-devcontainer|aws-linux|aws-windows|azure-linux|digitalocean-linux|docker|docker-devcontainer|docker-envbuilder|gcp-devcontainer|gcp-linux|gcp-vm-container|gcp-windows|kubernetes|kubernetes-devcontainer|nomad-docker|scratch          Specify a given example template by ID.———Run `coder --help` for a list of global options.
@bcpeinhardtbcpeinhardt marked this pull request as ready for reviewOctober 3, 2025 22:06
Copy link
Member

@ParkreinerParkreiner left a comment

Choose a reason for hiding this comment

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

Looks good to me overall. TheStarterTemplate page has some Emotion styling still, but I have a PR that removes that, so it's not a big deal to take care of that here


![Tasks](../../.images/tasks-screenshot.png)

This is a fantastic starting point for working with AI agents with Coder Tasks. Try prompts such as:
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I feel like "fantastic" feels too qualitative and feels kinda like AI output

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Haha I copied this source directly from the existing template in the registry, It should probably stay the same until we integrate registry into the core product, but I agree it feels like an AI wrote this.

constsortVisibleTemplates=(templates:TemplateExample[])=>{
// The docker template should be the first template in the list,
// as it's the easiest way to get started with Coder.
constdockerTemplateId="docker";
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure I'm understanding the product goal: are we okay with dropping the old Docker template entirely, or would we still want it to be second in the list? We still have the Docker template as the second one for the empty templates component

import{docs}from"utils/docs";

// Those are from https://github.com/coder/coder/tree/main/examples/templates
constfeaturedExampleIds=[
Copy link
Member

@ParkreinerParkreinerOct 6, 2025
edited
Loading

Choose a reason for hiding this comment

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

Nothing wrong with this file, but it looks like it'd be pretty easy to swap in Tailwind here.

If we get rid of thestyles object, we should be able to addclassName="max-w-[50%] h-80 overflow-hidden opacity-85 [&_img]:max-w-full" to the div, and that should be equivalent

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I'm down to look at doing this together 😎

@aslilac
Copy link
Member

why are we unpinning the regulardocker template?

@bcpeinhardt
Copy link
ContributorAuthor

why are we unpinning the regulardocker template?

The ticket ask was to pin the Tasks on Docker Template first. I can update the PR to keep the Docker template pinned in the second slot. From the code I sort of thought the idea was to have one pinned template at a time and the rest organized by name. I think maybe the better solution though is to have the set of "featured templates" apply to the starter-templates page as well as the EmptyTemplates component.

@aslilac
Copy link
Member

agreed. having a simple template front and center that doesn't require spending a bunch of cloud provider money is a great way to ease into the product.

bcpeinhardt reacted with heart emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ParkreinerParkreinerParkreiner approved these changes

@aslilacaslilacAwaiting requested review from aslilacaslilac is a code owner

Assignees

@bcpeinhardtbcpeinhardt

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Tasks on Docker Template Should Appear First in the Start Templates List
3 participants
@bcpeinhardt@aslilac@Parkreiner

[8]ページ先頭

©2009-2025 Movatter.jp