-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
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.
The styling looks great!
I just have a few comments/questions that I'll add to each file.
.env.example
Outdated
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.
Was this file deleted for code cleanup reasons?
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 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"}'s Profile |
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.
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.
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.
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!
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 @KCCPMG mentioned that student first name is a required field, but just going to tag him here for confirmation, in case I misunderstood.
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.
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 { |
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.
Is .modalContent used later on? If not, that could be a contender for code cleanup.
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.
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?
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.
Makes sense! In that case, no worries!
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 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.
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.
Hey! Sorry to bring up an older PR, but I was working on a feature and wanted to check what scenario line 143 handles?
|
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.
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.
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! |
Updated Modal CSS Module and added some sx styling where needed to have the student modal match the design system mockups.
![modalstyling-desktop](https://private-user-images.githubusercontent.com/73210740/326330257-cfe1043e-cee4-435f-b524-14f6b2100670.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTY2NTksIm5iZiI6MTczOTU1NjM1OSwicGF0aCI6Ii83MzIxMDc0MC8zMjYzMzAyNTctY2ZlMTA0M2UtY2VlNC00MzVmLWI1MjQtMTRmNmIyMTAwNjcwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1Dcm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LTN-KLKu4zr2aAS_US0k7XVU1c)
![modalstyling-mobile](https://private-user-images.githubusercontent.com/73210740/326330283-8ccda11a-369e-4f1a-b2c5-b739fc72657a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NTY2NTksIm5iZiI6MTczOTU1NjM1OSwicGF0aCI6Ii83MzIxMDc0MC8zMjYzMzAyODMtOGNjZGExMWEtMzY5ZS00ZjFhLWIyYzUtYjczOWZjNzI2NTdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDE4MDU1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlNmI5Mzg5N2VkZGE4MDZjZmM2NzE2NDUyMzQ0OGNjZDQ5YTA3MmFjYzE4YmQyMDUzNzZmZDNiMjAwOWZjNTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.M9mLG6qjO2kae4b3lPmObC-bARj0tvWhvsActkpYf-I)