Skip to content

Conversation

@AmarTrebinjac
Copy link
Contributor

@AmarTrebinjac AmarTrebinjac commented Oct 9, 2025

Changes

DESIGN

Not currently testable on preview due to backend compat.
If you wish to test locally, you must also switch your backend branch to MI-1067-update-user-profile (remember to run migrations)

missing the job section, but there's a TODO for that, as it depends on the user experience section being implemented:

Screenshot 2025-10-13 at 17 36 39 Screenshot 2025-10-13 at 17 36 30

For now, since this form already exists and has plenty of logic, I did not fully convert it to a zod schema. Instead using the existing error handling and implementing it with react-hook-form, which worked surprisingly well.

New location input in action:

Screen.Recording.2025-10-13.at.17.42.31.mov

Also supports the type field, but not relevant for this form

Additionally I created a new Select component that has a proper hidden input for dropdowns, as well as new image drag and drop handling compatible with react-hook-form

All other inputs have been wrapped with react-hook-form. Currently the ones with existing forms are just named ControlledExistingInput. Eventually when we move entirely to react-hook-form, we can maybe remove the controlled part, or if anyone has any other naming suggestions, I'm all ears.

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Jira ticket

MI-1067

Preview domain

https://mi-1067.preview.app.daily.dev

@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
daily-webapp Ready Ready Preview Oct 16, 2025 1:53pm
1 Skipped Deployment
Project Deployment Preview Updated (UTC)
storybook Ignored Ignored Oct 16, 2025 1:53pm

UpdateProfileParameters
>({
mutationFn: ({ image, onUpdateSuccess, ...data }) =>
mutationFn: ({ upload, coverUpload, onUpdateSuccess, ...data }) =>
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
mutationFn: ({ upload, coverUpload, onUpdateSuccess, ...data }) =>
mutationFn: ({ onUpdateSuccess, ...data }) =>

Comment on lines +137 to +138
upload,
coverUpload,
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
upload,
coverUpload,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not following here? These are required for the uploads to work 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Yes, they should still be included, we just don't have to destructure them now since the mutation's data shape is the same as what is being spread here. My bad for not giving enough context/details 🙏

Copy link
Member

Choose a reason for hiding this comment

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

Hence why I removed it here too #4987 (comment)

},
});
},
// eslint-disable-next-line react-hooks/exhaustive-deps
Copy link
Member

@sshanzel sshanzel Oct 15, 2025

Choose a reason for hiding this comment

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

Why do we have this disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not 100% sure what the reason was behind this, as I copied the code from Header.tsx which was a lot bigger component, and re-adjusted it a bit. I removed the comment and added the openModal dependency, and there didn't seem to be issues.

Copy link
Member

@sshanzel sshanzel left a comment

Choose a reason for hiding this comment

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

Just the last few open points, then we should be good 🤩

Copy link
Member

@sshanzel sshanzel left a comment

Choose a reason for hiding this comment

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

🚀 🌔

@sshanzel
Copy link
Member

sshanzel commented Oct 15, 2025

@sshanzel sshanzel merged commit a7bb10e into MI-1027-profile Oct 16, 2025
8 of 9 checks passed
@sshanzel sshanzel deleted the MI-1067 branch October 16, 2025 13:54
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