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

Feature/f 39 implement generic accordion component #12

Merged
merged 16 commits into from
Nov 8, 2024

Conversation

ArmanpreetGhotra
Copy link
Collaborator

@ArmanpreetGhotra ArmanpreetGhotra commented Nov 4, 2024

For testing, i added some icons under "Images" folder as svg and added some arguments for testing. i changed the accordion layout whenever there are more than 2 components.
Next todos would be:
right now there is image icon on some accordions. Plan is as soon as user hover over the info icon, information model appear and it's same as Information Popup. As soon as that is implemented, I'm going to integrate that.

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.

Overall good job! You should generally adapt to the code guidelines we set, I guess for the first time it is usually like that, so you code according to your own style, which is totally fine.

Few things I also noticed:

  1. Generally the text and the icon size is too small inside the cards
  2. I think the flex container inside the accordtion should havejustify-content: flex-start and align-items: flex-start
  3. The content inside the accordion when expanded overflows its container

Have a look at all comments and I hope the communication regarding the colors and theming comes soon.

src/app/elements/page.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,38 @@
'use client';
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need of client component here, you do not use any client side APIs

Copy link
Collaborator Author

@ArmanpreetGhotra ArmanpreetGhotra Nov 6, 2024

Choose a reason for hiding this comment

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

as soon as remove the 'use client' the accordions as well as card doesn't get rendered.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is actually an open bug in NextUI, I had the same problem for the table. Seems like keeping 'use client' is neccesary for now: nextui-org/nextui#1403 (comment)

src/components/Accordions/Accordion.tsx Outdated Show resolved Hide resolved
src/components/Accordions/Accordion.tsx Outdated Show resolved Hide resolved
src/components/Accordions/Accordion.tsx Show resolved Hide resolved
src/components/Cards/Card.tsx Outdated Show resolved Hide resolved
src/components/Cards/Card.tsx Outdated Show resolved Hide resolved
src/components/Cards/card.css Outdated Show resolved Hide resolved
src/app/elements/page.tsx Outdated Show resolved Hide resolved
@@ -1,9 +1,66 @@
import { Chart } from '@/components/Charts/Chart';
Copy link
Collaborator

Choose a reason for hiding this comment

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

generally do not remove other components when adding yours here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed that import because I was getting an "unused vars" error. Since the comments mentioned that page.tsx is intended for testing purposes, I decided to remove it.

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.

pls fix the comments, overall good job!

src/components/Accordions/Accordion.tsx Outdated Show resolved Hide resolved
src/components/Cards/Card.tsx Outdated Show resolved Hide resolved
src/components/Accordions/Accordion.tsx Outdated Show resolved Hide resolved
src/styles/globals.css Outdated Show resolved Hide resolved
@bohdangarchu
Copy link
Collaborator

Can you also center the title of an accordion
image

@ArmanpreetGhotra
Copy link
Collaborator Author

Can you also center the title of an accordion image

Thank you for the feedback, but i like them in this alignment. In Center they won't look good.

@bohdangarchu
Copy link
Collaborator

Can you also center the title of an accordion image

Thank you for the feedback, but i like them in this alignment. In Center they won't look good.

I meant centering vertically, sorry for not clarifying

Copy link

netlify bot commented Nov 8, 2024

Deploy Preview for wfp-hungermap ready!

Name Link
🔨 Latest commit 6743a38
🔍 Latest deploy log https://app.netlify.com/sites/wfp-hungermap/deploys/672e735a61b814000809de00
😎 Deploy Preview https://deploy-preview-12--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.

@bohdangarchu bohdangarchu merged commit 0adcbda into main Nov 8, 2024
5 checks passed
@ArmanpreetGhotra ArmanpreetGhotra deleted the feature/f-39-implement-generic-accordion-component branch December 8, 2024 13:45
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.

4 participants