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

Implement input form dropdown functionality #42

Open
wants to merge 2 commits into
base: david-kenzy/scrollable-calendar-with-functionality
Choose a base branch
from

Conversation

kenzysoror
Copy link
Contributor

@kenzysoror kenzysoror commented Nov 20, 2024

Notion ticket link

Dropdowns in Calendar Input Form - Functionality

Implementation description

  • Created API route to fetch Subject and Location data for dropdown options
  • Created the dropdown component
  • Implemented de-selection of already-selected option when clicked again
  • Integrated the dropdown component into InputForm's Subject and Location fields

Steps to test

  1. Visit http://localhost:3000/calendar
  2. Open the input form via the "declare absence" button or a date block click
  3. Verify Subject dropdown selection when an option is clicked
  4. Verify Subject dropdown de-selection when an already-selected option is clicked again
  5. Verify Location dropdown selection when an option is clicked
  6. Verify Location dropdown de-selection when an already-selected option is clicked again
  7. Input all fields but Subject dropdown - verify validation alert
  8. Input all fields but Location dropdown - verify validation alert
  9. Input all fields including dropdown - verify form submission via the "declare absence" button
  10. Verify absence is populated in the calendar and database with the correct Subject and Location

What should reviewers focus on?

  • Intuitive and user-friendly dropdown experience (selection, de-selection, navigation)
  • Proper reflection of declared absence in the calendar and database
  • General code style/best practices

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sistema ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 2:36am

@kenzysoror kenzysoror force-pushed the kenzy/input-form-dropdowns branch from 95305c7 to 49cdc1f Compare November 20, 2024 02:24
@ChinemeremChigbo ChinemeremChigbo marked this pull request as draft November 20, 2024 02:29
@kenzysoror kenzysoror marked this pull request as ready for review November 20, 2024 03:01
@kenzysoror kenzysoror changed the title Kenzy/input form dropdowns Input form dropdowns Nov 23, 2024
@kenzysoror kenzysoror changed the title Input form dropdowns Implement input form dropdown functionality Nov 23, 2024
@ChinemeremChigbo
Copy link
Member

ChinemeremChigbo commented Nov 25, 2024

Right now I am getting: duplicates for the subject and location

image image

Which leads to the following error:

hydration-error-info.js:63 Warning: Encountered two children with the same key, `Percussion`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

@ChinemeremChigbo
Copy link
Member

ChinemeremChigbo commented Nov 25, 2024

The file upload should use Chakra's file Upload. Probably the drop Zone so as to best match the Figma designs.
https://www.chakra-ui.com/docs/components/file-upload#dropzone
image

Copy link
Member

@ChinemeremChigbo ChinemeremChigbo left a comment

Choose a reason for hiding this comment

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

see comments.

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.

2 participants