refactor(profile): migrate edit profile modal to SolidJS (@AzureNightlock)#7880
refactor(profile): migrate edit profile modal to SolidJS (@AzureNightlock)#7880AzureNightlock wants to merge 1 commit intomonkeytypegame:masterfrom
Conversation
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
| value !== initial && value !== ""; | ||
|
|
||
| return ( | ||
| <dialog |
| if (e.target === e.currentTarget) props.onClose(); | ||
| }} | ||
| > | ||
| <form class="modal" onSubmit={handleSubmit}> |
There was a problem hiding this comment.
use tanstack form with validation
| value: string; | ||
| }) => ( | ||
| <Show when={isNotDefault(props.value, props.initial)}> | ||
| <div class="statusIndicator"> |
There was a problem hiding this comment.
use ts/form and validations, check other usages
| if (!snapshot) return; | ||
|
|
||
| const badges = snapshot.inventory?.badges ?? []; | ||
| const originalState = { |
| } | ||
|
|
||
| export const TwitterProfileSchema = profileDetailsBase(slug().max(20)).or( | ||
| export const TwitterProfileSchema = profileDetailsBase(slug().max(15)).or( |
There was a problem hiding this comment.
Twitter's max handle/username length is 15 not 20 so I changed it if that's okay?
| props.profile.uid !== undefined && | ||
| props.profile.uid === (getUserId() ?? ""); | ||
|
|
||
| const [showEditProfile, setShowEditProfile] = createSignal(false); |
There was a problem hiding this comment.
remove, state is handled by AnimatedModal
|
Hey! @fehmer Thanks for the review! Can I address the feedback tomorrow if that's okay? I spent quite a bit of time on this and I have an exam tomorrow that I need to prepare for (prolly failing icl😭). I mainly did this with whatever knowledge I had with react and I haven't really used tan stack and stuff so I apologize if some parts aren't as good as expected. I will work on this and make it better. |
|
hi @AzureNightlock , sure, no hurry. I thought we talked about ts/form before but I am not sure anymore. Best is to always check existing code before starting the implementation to not re-invent the wheel. Good luck with your exam. |
Description
This PR: Migrates the Edit Profile modal to a SolidJS component
The Overall Flow:
The Simple Logic:
Changes Made:
Additional Changes Made:
Checks
Closes #7683