Skip to content
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

docs: Add frontend guide #5852

Merged
merged 3 commits into from
Jan 25, 2023
Merged

docs: Add frontend guide #5852

merged 3 commits into from
Jan 25, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

No description provided.

Copy link
Member

@Kira-Pilot Kira-Pilot left a comment

Choose a reason for hiding this comment

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

Nice, very thorough

Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Nice and thorough!

All the code related to the UI is inside the `site`` folder and we defined a few conventions to help people to navigate through it.

- **e2e** - E2E tests
- **src** - Source code
Copy link
Member

Choose a reason for hiding this comment

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

We could turn these into links src (not sure about the syntax though). I think that'll let markdown link check catch if any of these links every break due to restructuring, and it's a convenient way to hop in.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good one! Annotated to improve this in a next PR.

docs/contributing/frontend.md Outdated Show resolved Hide resolved

### Where to fetch data

Finding the right place to fetch data in React apps is the one million dollar question but we decided to make it only in the page components and pass the props down to the views. This makes it easier to find where data is being loaded and easy to test using Storybook - We are going to talk more about our testing strategy. So you will see components like `UsersPage` and `UsersPageView`.
Copy link
Member

Choose a reason for hiding this comment

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

[...] We are going to talk more about our testing strategy. So you will see components like UsersPage and UsersPageView.

This was a bit confusing for me, talk more about it where? And where will I see the components?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch.

docs/contributing/frontend.md Outdated Show resolved Hide resolved
docs/contributing/frontend.md Outdated Show resolved Hide resolved
@mtojek mtojek self-requested a review January 25, 2023 15:31
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

We should probably do a similar work for backend.

@@ -0,0 +1,133 @@
# Frontend

This is a guide to help the Coder community and also Coder members contribute to our UI. It is ongoing work but we hope it provides some useful information to get started. If you have any questions or need help, please send us a message on our [Discord server](https://discord.com/invite/coder). We'll be happy to help you.
Copy link
Member

Choose a reason for hiding this comment

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

Is there any place where we can find a cheatsheet with commands? vite, yarn, how to start Coder in development mode, etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nops, but it is a good idea! I'm going to send this in a next PR.

BrunoQuaresma and others added 2 commits January 25, 2023 13:04
Co-authored-by: Kira Pilot <kira@coder.com>
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
@BrunoQuaresma BrunoQuaresma enabled auto-merge (squash) January 25, 2023 16:07
@BrunoQuaresma BrunoQuaresma merged commit de66f0d into main Jan 25, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/add-fe-contributing-guide branch January 25, 2023 16:15
@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
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.

None yet

4 participants