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

Refactored frontend following best practices #16

Merged
merged 10 commits into from
Apr 15, 2024

Conversation

ozerodb
Copy link
Collaborator

@ozerodb ozerodb commented Jan 3, 2024

This PR addresses this Trello card.

The frontend has been restructured both files-wise and appearance-wise following best practices suggested by the web / docs / ChatGPT.

Changes include:

  • code cleanup and typos fixed
  • url-based rendering instead of logic-based
  • Auth0 now tries to automatically login when viewing "protected" pages, and redirects accordingly
  • added basic navigation between pages (doesn't break authentication session)
  • added temporary debug page to be used to debug APIs
  • added basic responsive layout

image

Next steps:

  • populating availabilities page
  • do API testing from debug page
  • fix logout redirecting to localhost
  • separate login page?
    ⮱regarding the last point, the Miro board suggests there should be a login page with different auth methods for (non-)members. How will authentication work in that case? Not Auth0?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This file can be removed if no longer used

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it's no longer used. I temporarily kept it as a source of inspiration for the styling of the availabilities table, to not disregard the others' work, but can be removed from upcoming commits

@ozerodb
Copy link
Collaborator Author

ozerodb commented Apr 9, 2024

Confirmed that using TypeScript solves SonarCloud's typing-related warnings.
The file frontend/src/Auth0ProviderWithNavigate.tsx does not generate a consistency warning anymore.

Copy link

sonarcloud bot commented Apr 15, 2024

Quality Gate Passed Quality Gate passed

Issues
36 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@AlbertoBaroso AlbertoBaroso merged commit 8cdd032 into dev Apr 15, 2024
2 checks passed
@ozerodb ozerodb deleted the feature/frontend-structure-and-login branch April 27, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants