feat: Add diff and Dockerfile support for template version page#5339
Conversation
There was a problem hiding this comment.
Had a few comments but other than that, BE looks good. 👍🏻
And wrt frontend, I think this solution is a great start. It'd be pretty cool if we opened up an instance of code-server or something that showed the files/diff, but IDK if that'd make our bundle size way too huge. 😂
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Yeah, but we are basically using the editor that is used by VS Code. https://microsoft.github.io/monaco-editor/ |
|
|
||
| export type GetPreviousTemplateVersionByNameResponse = | ||
| | TypesGen.TemplateVersion | ||
| | undefined |
There was a problem hiding this comment.
Can we make a type for this on the BE? Maybe in Nvmd, I see what's happeningcodersdk/templateversions.go?
|
|
||
| if (coderTheme.isLoading) { | ||
| return null | ||
| } |
There was a problem hiding this comment.
Not really, it is VERY fast. It is only a few milliseconds to monaco be loaded. From what I was able to inspect there is no networking involved so the "loading time" is "static"
| }, | ||
| }) | ||
|
|
||
| export const useCoderTheme = (): { isLoading: boolean; name: string } => { |
There was a problem hiding this comment.
Adding a comment here explaining what this hook/what its scope is might be helpful.
Demo:
Screen.Recording.2022-12-06.at.18.49.24.mov