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

feat(site): allow any file extension on template editor#12000

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
BrunoQuaresma merged 20 commits intomainfrombq/template-editor
Feb 7, 2024
Merged
Changes from1 commit
Commits
Show all changes
20 commits
Select commitHold shift + click to select a range
4635cbd
Display all files in the editor
BrunoQuaresmaFeb 2, 2024
541c953
Adjust group padding
BrunoQuaresmaFeb 2, 2024
1785b90
Show error for unsupported files
BrunoQuaresmaFeb 2, 2024
9653fc7
Save version on URL even when building
BrunoQuaresmaFeb 2, 2024
ce75edd
Remove unecessary state
BrunoQuaresmaFeb 2, 2024
4403a18
Keep user navigation from URL
BrunoQuaresmaFeb 2, 2024
3957240
Merge branch 'main' of https://github.com/coder/coder into bq/templat…
BrunoQuaresmaFeb 5, 2024
a418467
Show stack files
BrunoQuaresmaFeb 5, 2024
0c72ecc
Remove unecessary imports
BrunoQuaresmaFeb 5, 2024
2353ea9
Add file tree on template files
BrunoQuaresmaFeb 5, 2024
0c2ffc9
Add edit button
BrunoQuaresmaFeb 5, 2024
98aa054
Use same editor bg
BrunoQuaresmaFeb 5, 2024
8508e69
Add storybook for visual testing
BrunoQuaresmaFeb 6, 2024
94775b1
Fix tests
BrunoQuaresmaFeb 6, 2024
4593f0e
Fix test
BrunoQuaresmaFeb 6, 2024
1a7ef6d
Merge branch 'main' of https://github.com/coder/coder into bq/templat…
BrunoQuaresmaFeb 7, 2024
955bced
wip: group empty folders
BrunoQuaresmaFeb 7, 2024
bfdabb3
Group empty folders + remove contextual actions if there is any
BrunoQuaresmaFeb 7, 2024
469a35c
Grey out hidden files
BrunoQuaresmaFeb 7, 2024
9a95846
Fix storybook
BrunoQuaresmaFeb 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Remove unecessary state
  • Loading branch information
@BrunoQuaresma
BrunoQuaresma committedFeb 2, 2024
commitce75edd5c76411b16e811e724e39bd3088d76db6
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,16 +37,14 @@ type Params = {
export const TemplateVersionEditorPage: FC = () => {
const queryClient = useQueryClient();
const navigate = useNavigate();
const { version:initialVersionName, template: templateName } =
const { version:versionName, template: templateName } =
useParams() as Params;
const orgId = useOrganizationId();
const [currentVersionName, setCurrentVersionName] =
useState(initialVersionName);
const templateQuery = useQuery(templateByName(orgId, templateName));
const templateVersionOptions = templateVersionByName(
orgId,
templateName,
currentVersionName,
versionName,
);
const templateVersionQuery = useQuery({
...templateVersionOptions,
Expand DownExpand Up@@ -102,7 +100,6 @@ export const TemplateVersionEditorPage: FC = () => {
};

const onBuildEnds = (newVersion: TemplateVersion) => {
setCurrentVersionName(newVersion.name);
queryClient.setQueryData(templateVersionOptions.queryKey, newVersion);
navigateToVersion(newVersion);
};
Expand DownExpand Up@@ -164,7 +161,6 @@ export const TemplateVersionEditorPage: FC = () => {
...templateVersionQuery.data,
...data,
};
setCurrentVersionName(publishedVersion.name);
setIsPublishingDialogOpen(false);
setLastSuccessfulPublishedVersion(publishedVersion);
queryClient.setQueryData(
Expand DownExpand Up@@ -195,7 +191,6 @@ export const TemplateVersionEditorPage: FC = () => {
}
disableUpdate={
templateVersionQuery.data.job.status !== "succeeded" ||
templateVersionQuery.data.name === initialVersionName ||
templateVersionQuery.data.name ===
lastSuccessfulPublishedVersion?.name
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp