-
Notifications
You must be signed in to change notification settings - Fork 3
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] create simple interest form component #25
[feat] create simple interest form component #25
Conversation
IJP-10 Create simple interest form component.
Routes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks rlly good! a couple things to implement:
- clear out the form responses when clicking on a new case on the scroll bar
- form validation + updating interests table w/ submission
- include a warning on the interest form that the form responses are not saved (according to HIFI)
- make the input text border to 2 pixels (David will also change on figma)
- hover functionality for the Radio Button
The Button, ErrorButton + their secondary formats look great!
const [rolesInterested, setRolesInterested] = useState<string>(''); | ||
const [startDate, setStartDate] = useState<string>(''); | ||
|
||
const handleInsert = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why this function seems to force a re-render of the whole page? Are we explicitly doing this somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a rough idea of why it might be re-rendering, but I'll also look more into this during the next sprint! I think once I reconnect the form to the backend it'll be easier to debug.
start_date: startDate, | ||
}, | ||
}; | ||
await insertInterest(newInterest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is just on my end, but for me this doesn't seem to be writing an interest to the table? All of this seems fine though, so I'm not sure why this might be 🤔
But also since this sprint is entirely frontend-focused, we can look deeper into this in your next sprint!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, there's a 409 error rn... I'll look more into it during the next sprint to not delay merging the frontend changes in!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I just added some minor details to consider, looking forward to the new changes!
position: sticky; | ||
top: 4rem; | ||
width: 95%; | ||
border-radius: 10px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we use rem
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved this in slack DMs with sauhard! this is what he said:
i would rec using px
reason is rem depends on root font size and border widths have no relation to font size
and the variance is border width across screen size is pretty limited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so let's keep this as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for border-radius
we will still use rem
, only px
for border-width
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pragyakallanagoudar are you fine with going along with this change? I think it makes sense to change border-radius
to rem
src/api/supabase/queries/profiles.ts
Outdated
@@ -13,6 +13,15 @@ export async function fetchProfiles() { | |||
} | |||
} | |||
|
|||
export async function fetchProfileById(userId: UUID) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jinkang-0 any idea why this might be here? 🤔 I assumed that this was part of the profile context PR which was already merged in...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually it seems like all the changes from the profile context and global styles are included on here...? i somehow thought this diff would only included changes that were not already present on main after rebasing :o but i might be misremembering!
@@ -0,0 +1,45 @@ | |||
import styled from 'styled-components'; | |||
|
|||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMAZING documentation!! thank you for this alvaro :)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOOKS AMAZINGGGG THANK YOU FOR ALL YOUR HARD WORK ALVARO!!!
de04806
to
e3bdd8f
Compare
e3bdd8f
to
3078d38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gonna drop some unit policing stuff
🎋 Description
components/Button.tsx
🌴 What's new in this PR
🌲 Screenshots
🌳 How to review
http://localhost:3000/cases
Might be good to test all versions of the Button/ErrorButton component
components/Button.tsx
for documentation on how to use the buttons🌱 Next steps
🔗 Relevant Links
ℹ️ Online sources
Guide for creating a custom radio input using styled components (kinda janky implementation, but Jinkang++ helped make edits to it in this PR to improve it):
Styled Components documentation that is useful for understanding the Button component implementation:
https://styled-components.com/docs/basics#adapting-based-on-props
🪴 Related PRs
CC: @pragyakallanagoudar @davidqing6432