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

Student Modal Styling #318

Merged
merged 10 commits into from
May 27, 2024
Merged

Student Modal Styling #318

merged 10 commits into from
May 27, 2024

Conversation

hannahmcg
Copy link
Contributor

Updated Modal CSS Module and added some sx styling where needed to have the student modal match the design system mockups.
modalstyling-desktop
modalstyling-tablet
modalstyling-mobile

Copy link
Contributor

@katconnors katconnors left a comment

Choose a reason for hiding this comment

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

The styling looks great!
I just have a few comments/questions that I'll add to each file.

.env.example Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this file deleted for code cleanup reasons?

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 didn't mean to delete this actually i'll go ahead and reinstate it!

</Typography>
<Box className={$Modal.editModalContent}>
<p id="modal-modal-title" className={$Modal.editModalHeader}>
Editing {student?.first_name || "Student"}&apos;s Profile
Copy link
Contributor

@katconnors katconnors Apr 29, 2024

Choose a reason for hiding this comment

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

Would there be a scenario where the student would be null or undefined, and you could then access the modal?
If not, we could get rid of the hard coded student for that scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point - I just left it in as a backup but if it seems unnecessary I can go ahead and take it out!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think @KCCPMG mentioned that student first name is a required field, but just going to tag him here for confirmation, in case I misunderstood.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's right, in the initial migrations it's specified that a student's first name must not be null, but I personally don't see any harm in leaving the || "Student" in there. Thanks for tagging me here, I somehow didn't even see that my review was requested for this PR!

width: 100%;
}

.modalContent {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is .modalContent used later on? If not, that could be a contender for code cleanup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used as styling for the other modals in the file (not the edit student one) so I left it in there, but we could maybe change the classnames to make the difference more clear?

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense! In that case, no worries!

@hannahmcg hannahmcg requested a review from KCCPMG May 8, 2024 19:35
Copy link
Contributor

@KCCPMG KCCPMG left a comment

Choose a reason for hiding this comment

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

Looks good! I think there's just the merge conflict to handle and this should be fine. As I moved the window around I noticed that the modal can't be seen or scrolled when the height is less than around 690 pixels, but that seems like an extremely unlikely use case.

Copy link
Contributor

@katconnors katconnors left a comment

Choose a reason for hiding this comment

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

Hey! Sorry to bring up an older PR, but I was working on a feature and wanted to check what scenario line 143 handles?

@katconnors
Copy link
Contributor

katconnors commented May 23, 2024

Hey! Sorry to bring up an older PR, but I was working on a feature and wanted to check what scenario line 143 handles?
Update: Made an edit to the CI workflow
Also, was trying to commit some code, and ran into some es lint issues. Did you see that on your end?

@katconnors katconnors requested a review from KCCPMG May 23, 2024 23:06
Copy link
Contributor

@KCCPMG KCCPMG left a comment

Choose a reason for hiding this comment

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

This looks good! The logic aspect of having one form handle the IEP edit plus the student edit is a remnant of a prior branch rather than this one, but I think that just putting this check in is a very elegant way of removing the unnecessary (and misleading) fields that come up if a student doesn't yet have an IEP. Since the logic is unchanged, the procedure for editing the IEP is still being called, but looking into it, it seems like there's basically zero cost for that since tRPC will actually batch requests, which I didn't know before.

@hannahmcg
Copy link
Contributor Author

Hey! Sorry to bring up an older PR, but I was working on a feature and wanted to check what scenario line 143 handles?

Good question - I'm honestly not quite sure either, might be good to turn the handling of that (if necessary) into another small PR for code cleanups!

@hannahmcg hannahmcg merged commit a8bfae7 into main May 27, 2024
3 checks passed
@hannahmcg hannahmcg deleted the student-modal-styling branch May 27, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants