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

♻️(frontend) reorganize starting frontend code #18

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

manuhabitela
Copy link
Collaborator

  • we now have "features" to try to organize code by intent instead of code type. everything at the root of frontend, not in feature/, is global
  • customized the panda config a bunch to try to begin to have an actual design system. The idea is to prevent using arbitrary values here and there in the code, but rather semantic tokens
  • changed the userAuth code logic to handle the fact that a 401 on the users/me call is not really an error per say, but rather an indication the user is not logged in

Copy link
Collaborator

@lebaudantoine lebaudantoine left a comment

Choose a reason for hiding this comment

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

GGWP

src/frontend/src/features/auth/api/useUser.tsx Outdated Show resolved Hide resolved
src/frontend/src/features/rooms/api/fetchRoom.ts Outdated Show resolved Hide resolved
src/frontend/src/features/rooms/api/fetchRoom.ts Outdated Show resolved Hide resolved
return fetchApi<ApiRoom>(
`/rooms/${roomId}?username=${encodeURIComponent(username)}`
).then((room) => {
if (!room.livekit?.token) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (!room.livekit?.token) {
if (!room?.livekit?.token) {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't understand why this should be added as when we are here it means the api responded correctly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll merge as is and change if needed :)

src/frontend/src/features/rooms/components/Join.tsx Outdated Show resolved Hide resolved
src/frontend/src/primitives/Badge.tsx Outdated Show resolved Hide resolved
src/frontend/src/primitives/Button.tsx Show resolved Hide resolved
src/frontend/src/primitives/H.tsx Show resolved Hide resolved
src/frontend/src/primitives/Text.tsx Show resolved Hide resolved
- we now have "features" to try to organize code by intent instead of
code type. everything at the root of frontend, not in feature/, is
global
- customized the panda config a bunch to try to begin to have an actual
design system. The idea is to prevent using arbitrary values here and
there in the code, but rather semantic tokens
- changed the userAuth code logic to handle the fact that a 401 on the
users/me call is not really an error per say, but rather an indication
the user is not logged in
@manuhabitela manuhabitela merged commit 31ea621 into main Jul 16, 2024
6 of 8 checks passed
@manuhabitela manuhabitela deleted the front-structure branch July 16, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants