Skip to content

refactor: Show template versions as timeline #4800

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

Merged
merged 18 commits into from
Oct 31, 2022
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

  • Extract Timeline component
  • Refactor templateversion to return created_by instead of created_by_something

Before:
Screen Shot 2022-10-28 at 15 44 25

After (Sorry, I only have the one in storybook to use as example)
Screen Shot 2022-10-28 at 15 43 25

@BrunoQuaresma BrunoQuaresma requested a review from a team as a code owner October 28, 2022 18:44
@BrunoQuaresma BrunoQuaresma requested review from code-asher and a team and removed request for a team October 28, 2022 18:44
@BrunoQuaresma BrunoQuaresma self-assigned this Oct 28, 2022
@@ -21,8 +21,7 @@ type TemplateVersion struct {
Name string `json:"name"`
Job ProvisionerJob `json:"job"`
Readme string `json:"readme"`
CreatedByID uuid.UUID `json:"created_by_id"`
CreatedByName string `json:"created_by_name"`
CreatedBy User `json:"created_by"`
Copy link
Member

Choose a reason for hiding this comment

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

I'd make this Creator instead

Copy link
Collaborator Author

@BrunoQuaresma BrunoQuaresma Oct 28, 2022

Choose a reason for hiding this comment

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

Do you have a strong opinion about that? I like the CreatedBy tho and it keeps consistent with the database so makes it easier, at least for me, to find and associate with the DB data.

@BrunoQuaresma BrunoQuaresma requested a review from coadler October 28, 2022 20:00
@BrunoQuaresma
Copy link
Collaborator Author

I would love some help/guidance on how to fix the test. I don't know what is causing the error below:

Error Trace:	/home/runner/work/coder/coder/coderd/templateversions_test.go:494
        	Error:      	Received unexpected error:
        	            	do:
        	            	    github.com/coder/coder/codersdk.(*Client).Request
        	            	        /home/runner/work/coder/coder/codersdk/client.go:100
        	            	  - Get "http://localhost:34269/api/v2/templates/373ac77a-20e4-4d38-9c47-e8df45e295b6/versions": context deadline exceeded
        	Test:       	TestTemplateVersionsByTemplate/Get

@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) October 31, 2022 16:03
@BrunoQuaresma BrunoQuaresma merged commit 46e0953 into main Oct 31, 2022
@BrunoQuaresma BrunoQuaresma deleted the bq/refactor-versions branch October 31, 2022 16:38
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants