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

feat(settings): Rework user settings page with Form, loading skeleton… #9476

Merged
merged 123 commits into from
Feb 19, 2025

Conversation

andrewhooker2
Copy link
Contributor

@andrewhooker2 andrewhooker2 commented Feb 13, 2025

Implemented a fully functional user settings page allowing changes to account details and notification preferences. This change uses a server first approach and adds much needed form validation to this page.
This PR has added loading skeletons for better UX during data fetching. Refactored related components to support these changes and finally implemented server actions to streamline data ingestion.

Note to developers:

At the moment the notification switches set back to default upon save. We will want to pass in this information after the api is implemented.

Changes 🏗️

Rebuilt / Refactored SettingsFormInput to SettingsForm:

  • Implemented Form Validation
  • Implemented a form schema with Zod to validate user input
  • Added toast messaging to properly inform the user if the form has been successfully completed or if there is an error in thrown from the server action.

Added loading.tsx

  • Using Skeletons we can deliver a better loading UI for our users causing less screen shifting.

Added actions.ts

  • Added a server action for the settings page. This server action will handle the updating of user's settings for this page. It handles the interaction between the application and supabase. After this server action is ran we revalidate the path for our settings page ensuring proper data passed to our components.

There is an additional TODO for @ntindle for the api endpoint getting created. This endpoint will cover the newly added notification switches and it's toggles.

Screenshots 📷

Before Changes:

image

After Changes:

image image image

Form Validation

image image image

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
Test Plan
  • Goto the route of profile/settings
  • Add an invalid email and notice the new validation messaging
  • Add invalid passwords that do not match and or is under 8 characters notice the new validation messaging
  • Select the cancel button and notice that the form has been set back to the default values
  • With the form untouched notice the Save changes button is disabled. Toggle a switch and notice the Save changes button is now enabled.
  • Enter in a valid pair of new passwords in the New Password and Confirm New Password input fields and select Save changes
  • Enter in the same passwords again and notice that we will now be shown an Error. This error is bubbling up from supabase in our backend and is stating New password should be different from the old password

ntindle and others added 30 commits February 6, 2025 13:07
…r-compose' into ntindle/secrt-1087-attach-rabbit-mq-to-the-services-processes-similar-to-how
…r-compose' into ntindle/secrt-1087-attach-rabbit-mq-to-the-services-processes-similar-to-how
@ntindle ntindle dismissed Swiftyos’s stale review February 14, 2025 18:13

The base branch was changed.

@andrewhooker2 andrewhooker2 requested a review from a team as a code owner February 14, 2025 18:13
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Feb 14, 2025
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 71adce3
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67b5ebb38b02ba00089b54a8

Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 8e47517
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67afb524b0b8580008b94166

Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 71adce3
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67b5ebb38b02ba00089b54a4

Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Feb 14, 2025
ntindle
ntindle previously approved these changes Feb 14, 2025
ntindle
ntindle previously approved these changes Feb 14, 2025
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Feb 18, 2025
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Feb 19, 2025
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@ntindle ntindle enabled auto-merge February 19, 2025 14:40
@ntindle ntindle added this pull request to the merge queue Feb 19, 2025
Merged via the queue into dev with commit a0be165 Feb 19, 2025
27 checks passed
@ntindle ntindle deleted the andrewhooker2/secrt-1077-add-email-service-settings-page branch February 19, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end Review effort [1-5]: 4 size/xl
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants