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

Add Caregiver Baby Book Main Pages & Update Admin Baby Book Page #144

Merged
merged 12 commits into from
Oct 3, 2024

Conversation

tsar-boomba
Copy link
Contributor

What does this Pull Request change?

Adds the caregiver baby book pages. Updates the admin baby book page

Important Changes

  • Adds /caregiver/book and /caregiver/book/[babyId] for viewing and editing baby books
  • Updates /admin/book/[babyId] to reflect new design and add ability to select images

Copy link

netlify bot commented Sep 29, 2024

Deploy Preview for motherhoodbeyondbars ready!

Name Link
🔨 Latest commit a2ef419
🔍 Latest deploy log https://app.netlify.com/sites/motherhoodbeyondbars/deploys/66ff1a9bbfca460009b85eb4
😎 Deploy Preview https://deploy-preview-144--motherhoodbeyondbars.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tsar-boomba
Copy link
Contributor Author

Path to DO NOT DELETE's caregiver album: /caregiver/book/bd89888ca382e490a04183167a810518f2aa9f39?iv=af3abe9304c706f681857b64fc4e6127

@parkerra parkerra added this to the Sprint 2 milestone Sep 29, 2024
@parkerra parkerra linked an issue Sep 29, 2024 that may be closed by this pull request
Copy link
Contributor

@parkerra parkerra left a comment

Choose a reason for hiding this comment

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

Great work, especially on the Admin page! Everything works really well and is clean which I know is difficult to do in the Admin side since the older code is hard to work with 😅 I left a few small comments about code fixes, but the functionality itself works really well and looks great!

layout="fixed"
src={admin_portal_gradient}
<div className="flex items-center justify-center min-w-[164px] h-[81px] overflow-hidden bg-admin-baby-book-background">
<svg
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the logo SVG from /public/MBBLogo.svg or create a new SVG in public or file in Icons if it's too different to keep the code clear and the logo consistent!

const deselectImage = () => {
setIsPictureSelected(false);
};

console.log(
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to remove unneeded console.logs!

{selectedForDownload.size > 0 && (
<div className="absolute w-[70vw] left-[50%] translate-x-[-50%] rounded shadow bottom-3.5 px-6 py-[1.125rem] flex justify-between bg-background">
<div className="flex items-center gap-[18px]">
<svg
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this to /components/Icons so that it's easier to tell which Icon this is in the code and so that it can be more easily reused

iv,
}: Props) {
return (
<div className="flex flex-col my-6 md:my-15 mx-4 md:mx-10 items-center gap-[18px] w-full">
Copy link
Contributor

Choose a reason for hiding this comment

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

Use rem units instead of px for custom values since rem is relative to the font size which is super important if someone needs to set the font size larger or needs to zoom into the website. To convert from px to rem divide the value by 16 so 18px would be 1.125rem. This is less important for the Admin portal since less people will be using it, but many Caregivers are older so accessibility is more important for Caregiver pages!

<>
<div
key={imageUrl}
className="h-[160px] md:h-[240px] overflow-hidden relative shadow-lg cursor-pointer"
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to rem units! Also thanks for adding the TODO comment so we can clearly find where to put the single-page functionality :D

<Image
key={imageUrl}
src={imageUrl}
alt={`Baby image from ${new Date(date.seconds * 1000).toLocaleDateString()}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

Love the image alt text!

@parkerra parkerra self-requested a review October 3, 2024 22:30
Copy link
Contributor

@parkerra parkerra left a comment

Choose a reason for hiding this comment

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

Great work! Everything looks really nice and functions very well :D

@parkerra parkerra merged commit f01faca into main Oct 3, 2024
4 checks passed
@parkerra parkerra deleted the 142-isaiah-baby-book branch October 3, 2024 22:31
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.

[FE] Baby Book View All Photos
2 participants