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: improve content of frontend contributing guide#14619

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
jaaydenh merged 4 commits intomainfromjaaydenh/frontend-guide
Sep 10, 2024

Conversation

jaaydenh
Copy link
Contributor

The goal of this update are:

  1. Remove any outdated text that I am aware of
  2. Make the language more concise
  3. Add information for modules, emotion, forms specifically highlighting the differences between components and modules

This refactor does not address the testing section

In the future, more information about theming should be included in the guide.

BrunoQuaresma reacted with heart emoji
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.

I like the changes overall! Just had a few suggestions

Comment on lines +58 to +59
- **components** - Reusable UI components without Coder specific business
logic
Copy link
Member

Choose a reason for hiding this comment

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

@jaaydenh@aslilac@BrunoQuaresma This was actually something I was going to ask about for this week's frontend variety, but do you think that going forward, we should enforce a "no data fetching in the components directory" rule?

We currently have some for the filter options and the autocomplete components, but my hope would be either:

  1. Move these to modules
  2. Decouple the layout concerns for the components from the fetching, and move the fetching somewhere else

Copy link
Member

Choose a reason for hiding this comment

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

The filter options logic technically isn't hitting an API endpoint itself, but it's still doing weird stuff like putting JSX directly inside the query cache

Copy link
Collaborator

Choose a reason for hiding this comment

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

The filter component is a bad example 😓, so we shouldn't consider it a best practice. However, I do think it makes sense not to have fetching logic inside 'shareable' components.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@Parkreiner Do you think there is anything specific to call out in the docs about this right now?

should always try to use the base components that are provided by the library or
from the codebase. It's recommended that you always do a quick search before
creating a custom primitive component like dialogs, popovers, buttons, etc.
Do not assume existing components and modules have been categorized correctly.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Do not assume existingcomponentsand modules have been categorized correctly.
Our codebase has some legacycomponentsthat are being updated to follow these new conventions, but all new components should follow these guidelines.

Copy link
Member

Choose a reason for hiding this comment

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

Feel like the current wording is throwing the team under the bus a bit

jaaydenh reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@Parkreiner hehe, you are totally correct, I was just trying to be really clear about the current state of things to avoid confusion. But I agree your wording sounds much better.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I wanted to create another PR eventually to move some components to modules.

aslilac reacted with thumbs up emoji
In both cases, you can access the dashboard on `http://localhost:8080`. If you
are running the `./scripts/develop.sh` you can log in using the default
credentials: `admin@coder.com` and `SomeSecurePassword!`.
> **Default Credentials:** `admin@coder.com` and `SomeSecurePassword!`.
Copy link
Member

Choose a reason for hiding this comment

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

nit: this is not quite the GHFM "callout" that@Parkreiner was suggesting, this is just a block quote, which is also kind of a misrepresentation

https://github.com/orgs/community/discussions/16925

Comment on lines +147 to +149
making API requests. The API functions are centralized in `site/src/api/api.ts`.
Auto-generated TypeScript types derived from our Go server are located in
`site/src/api/typesGenerated.ts`.
Copy link
Member

Choose a reason for hiding this comment

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

although it looks like we're inconsistent about it...sigh

@jaaydenhjaaydenh merged commit40688e4 intomainSep 10, 2024
24 checks passed
@jaaydenhjaaydenh deleted the jaaydenh/frontend-guide branchSeptember 10, 2024 19:52
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac left review comments

@ParkreinerParkreinerParkreiner approved these changes

@BrunoQuaresmaBrunoQuaresmaAwaiting requested review from BrunoQuaresma

Assignees

@jaaydenhjaaydenh

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@jaaydenh@aslilac@BrunoQuaresma@Parkreiner

[8]ページ先頭

©2009-2025 Movatter.jp