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

feat: redesign accordions of fcs and ipc #138

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ArmanpreetGhotra
Copy link
Collaborator

@ArmanpreetGhotra ArmanpreetGhotra commented Dec 15, 2024

Redesign Food Security accordions of fcs and ipc. Split the Accordions
Desktop Version
Screenshot 2024-12-15 at 13 49 29

Mobile Version
Screenshot 2024-12-15 at 13 50 25

Split version of accordions
Screenshot 2024-12-15 at 13 52 47

-> pack fcs and nutrition files into fcsMap and nutritionMap folder.

Copy link

netlify bot commented Dec 15, 2024

Deploy Preview for wfp-hungermap ready!

Name Link
🔨 Latest commit 0901ddb
🔍 Latest deploy log https://app.netlify.com/sites/wfp-hungermap/deploys/67656ef68887500008624bd0
😎 Deploy Preview https://deploy-preview-138--wfp-hungermap.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.

Copy link
Collaborator

@bohdangarchu bohdangarchu left a comment

Choose a reason for hiding this comment

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

generally good job.
Could you please reduce vertical padding between cards
image.
Also please fix that linting warning in Card.tsx

src/components/Map/FcsMap/FcsFoodSecurityAccordion.tsx Outdated Show resolved Hide resolved
src/components/Map/FcsMap/FcsMacroEconomicAccordion.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@marinovl7 marinovl7 left a comment

Choose a reason for hiding this comment

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

Good job, just few things need to be adjusted regarding code style. What I also noticed is that on Mobile screens the bigger accordion with 1 Month 3 Months is scrollable, this should not be the case. I would reduce the padding on the left and right and also little bit the gap between items. Nevertheless I would also align the items in the accordion to the left instead of center, I think it looks better like this. The breakpoint where we switch to mobile accordions should be earlier, because right now the accordions are overflowing. Also is F-164 going to be done in another PR?

image

<Image alt={item.altText} className="w-[102px] h-[75px]" src={item.imageSrc} />
<div className="svg-icon w-[70px] h-[70px] object-contain">{item.svgIcon}</div>
) : item.imageSrc ? (
<img alt={item.altText || ''} className="w-[70px] h-[70px] -mt-4" src={item.imageSrc} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

use next Image

<div className="flex flex-row space-x-3">
{item.changeValues.map((delta) => (
<div key={uuid()} className="flex flex-col items-center gap-2">
<img src={delta.imageSrc} alt={delta.altText} className="w-6 h-6" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

next Image

{
imageSrc: deltaThreeMonth && deltaThreeMonth > 0 ? '/Images/ArrowUp.svg' : '/Images/ArrowDown.svg',
text: deltaThreeMonth ? `${deltaThreeMonth.toFixed(2)} M` : 'N/A',
timeText: '3 Month ago',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Months instead of Month

@ArmanpreetGhotra
Copy link
Collaborator Author

Good job, just few things need to be adjusted regarding code style. What I also noticed is that on Mobile screens the bigger accordion with 1 Month 3 Months is scrollable, this should not be the case. I would reduce the padding on the left and right and also little bit the gap between items. Nevertheless I would also align the items in the accordion to the left instead of center, I think it looks better like this. The breakpoint where we switch to mobile accordions should be earlier, because right now the accordions are overflowing. Also is F-164 going to be done in another PR?

image

@marinovl7 regarding the mobile version i didn't get your point. Could you please elaborate

@marinovl7
Copy link
Collaborator

Good job, just few things need to be adjusted regarding code style. What I also noticed is that on Mobile screens the bigger accordion with 1 Month 3 Months is scrollable, this should not be the case. I would reduce the padding on the left and right and also little bit the gap between items. Nevertheless I would also align the items in the accordion to the left instead of center, I think it looks better like this. The breakpoint where we switch to mobile accordions should be earlier, because right now the accordions are overflowing. Also is F-164 going to be done in another PR?
image

@marinovl7 regarding the mobile version i didn't get your point. Could you please elaborate

Well reduce the screen width to 350px and see that the accordion content is scrollable

@ArmanpreetGhotra
Copy link
Collaborator Author

ArmanpreetGhotra commented Dec 19, 2024

@bohdangarchu @marinovl7
Here's what i changed
-> reduce the bottom padding of the accordion
-> add svg to nutrition accordion
-> ipc map was missing fcs tooltip, i added that
-> increase the size of the population accordion
-> i also added the scrollbar (it's working now)
Screenshot 2024-12-19 at 18 24 43

Copy link
Collaborator

@bohdangarchu bohdangarchu left a comment

Choose a reason for hiding this comment

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

UI is great, code-wise some improvements are needed

src/components/Map/FcsMap/FcsAccordion.tsx Outdated Show resolved Hide resolved
src/components/Map/FcsMap/FcsAccordion.tsx Outdated Show resolved Hide resolved
src/components/Map/FcsMap/FcsAccordion.tsx Outdated Show resolved Hide resolved
src/components/Map/FcsMap/FcsAccordion.tsx Outdated Show resolved Hide resolved
src/components/Map/FcsMap/FcsAccordion.tsx Outdated Show resolved Hide resolved
src/operations/map/FcsFoodSecurityOperations.tsx Outdated Show resolved Hide resolved
src/operations/map/FcsFoodSecurityOperations.tsx Outdated Show resolved Hide resolved
src/operations/map/FcsMacroEconomicOperations.tsx Outdated Show resolved Hide resolved
src/operations/map/FcsMacroEconomicOperations.tsx Outdated Show resolved Hide resolved
src/operations/map/IpcFoodSecurityOperations.tsx Outdated Show resolved Hide resolved
@ArmanpreetGhotra ArmanpreetGhotra marked this pull request as draft December 19, 2024 18:08
@ArmanpreetGhotra ArmanpreetGhotra marked this pull request as ready for review December 19, 2024 18:20
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.

3 participants