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

Redesign tree page and add sections for site images and tree benefits #264

Merged
merged 28 commits into from
Sep 13, 2023

Conversation

chromium-52
Copy link
Member

Checklist

  • 1. Run npm run check
  • 2. Run npm run test
  • 3. Run npm build --if-present

Why

Resolves #240

Redesigns the tree page according to the Figma designs
Adds two new sections on the tree page for the site image carousel and tree benefits

Note: This PR doesn't include adding/deleting site images from the frontend

This PR

The most important changes are the two new components, <SiteImageCarousel /> and <TreeBenefits />, as well as restructuring the tree page components (specifically, putting them in src/components/treePage/) with a barrel file so that they're all in one place and not scattered throughout the components folder

Screenshots

localhost_3000_tree_3303432

Verification Steps

Visually checked the tree page for several trees (http://localhost:3000/tree/3303432, http://localhost:3000/tree/3175896, etc.)

@chromium-52 chromium-52 requested a review from huang0h September 10, 2023 22:30
Copy link
Contributor

@huang0h huang0h left a comment

Choose a reason for hiding this comment

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

💯 redesign looks awesome!! Thanks for working on this, I really should have split this over multiple tickets

src/components/treePage/siteImageCarousel.tsx Outdated Show resolved Hide resolved
Comment on lines 68 to 74
<StyledCarousel
arrows
prevArrow={<LeftOutlined />}
nextArrow={<RightOutlined />}
adaptiveHeight
afterChange={onAfterChange}
>
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ For some reason, the onAfterChange function wasn't being called when I changed images in the carousel, which meant the uploader's name and date weren't properly changing. Using the beforeChange prop on the carousel works though, and I was able to get it working with this function:

const onBeforeChange = (_: number, next: number) => { 
  setCurrSlideIndex(next);
};

No idea why this prop works but afterChange doesn't 😞

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm is this what you're expecting to see if there are two images where one is uploaded by chromium52 and the other is by anonymous? I'm not 100% sure why but I can't seem to reproduce it on my end 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that's what should be happening - might be an issue on my end somewhere else then 🤔. Let's just merge this and see this issue happens in prod then

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok sounds good!

Copy link
Member Author

@chromium-52 chromium-52 Sep 14, 2023

Choose a reason for hiding this comment

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

Just verified this looks good on prod

Tree.-.Google.Chrome.2023-09-14.09-11-13.mp4

src/containers/treePage/ducks/types.ts Outdated Show resolved Hide resolved
@chromium-52 chromium-52 merged commit fdf4c8f into master Sep 13, 2023
4 checks passed
@chromium-52 chromium-52 deleted the kjung/feat-my-trees-redesign branch September 13, 2023 23:42
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.

Update My Trees Page
2 participants