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

[BoG S24] Share Schedule Modal Redesign #281

Closed
yatharth-b opened this issue Feb 20, 2024 · 0 comments
Closed

[BoG S24] Share Schedule Modal Redesign #281

yatharth-b opened this issue Feb 20, 2024 · 0 comments
Labels
task Task issue for a current or past sprint

Comments

@yatharth-b
Copy link
Contributor

yatharth-b commented Feb 20, 2024

Problem Description

We want to make edits to the share schedule modal to support sharing multiple schedules at the same time as well as sharing schedules with links. To see current functionality, branch off of bog-s23-changes-merged. The invitation modal is triggered here -

<InvitationModal show={invitationOpen} onHide={hideInvitation} />

Mockups

Link (Ready for Dev)

image

Your Goal

  • Modify InvitationModalContent in ``src/components/InvitationModal` to now also use all of the version names from the ScheduleContext and create the input component for selecting which versions to share.
  • Modify the request made to /createFriendInvitation to now use a list of versions instead of a single version
  • When the modal opens, pre-select the current version the user is on. Generate a new link and attach to copy link button, upon clicking which the link is copied to the user's clipboard.
  • Everytime a user changes the selected versions, generate a new link and attach to button.
  • Modify the logic for checking if the invitee has already accepted an invite from the sender.
  • The ScheduleContext currently contains the invites sent only for the version the user is currently on. Read
    function ContextProvider({
    for more details.
  • The context needs to be updated to now contain invites from all versions (can probably be done using termScheduleData passed to the context provider).
  • Update the middle section of the modal accordingly and show invites from all version instead of just current. Make this component scrollable in case it becomes longer than a specified height.
@yatharth-b yatharth-b added the task Task issue for a current or past sprint label Feb 20, 2024
@joannacheng21 joannacheng21 mentioned this issue Feb 23, 2024
9 tasks
yatharth-b added a commit that referenced this issue Mar 23, 2024
### Summary

Resolves #281

### Checklist

- [x] Modify InvitationModalContent in ``src/components/InvitationModal`
to now also use all of the version names from the ScheduleContext and
create the input component for selecting which versions to share.
- [x] Modify the request made to /createFriendInvitation to now use a
list of versions instead of a single version
- [x] When the modal opens, pre-select the current version the user is
on. Generate a new link and attach to copy link button, upon clicking
which the link is copied to the user's clipboard.
- [x] Everytime a user changes the selected versions, generate a new
link and attach to button.
- [x] Modify the logic for checking if the invitee has already accepted
an invite from the sender.
- [x] The ScheduleContext currently contains the invites sent only for
the version the user is currently on. The context needs to be updated to
now contain invites from all versions (can probably be done using
termScheduleData passed to the context provider).
- [x] Update the middle section of the modal accordingly and show
invites from all version instead of just current. Make this component
scrollable in case it becomes longer than a specified height.
- [x] Modify logic for removing friends now that there are multiple
schedule versions
- [x] Create link expiration dropdown and connect selection to
createLink function

### How to Test
Change cloud function base url to test

### Notes:
1. When I try to send email invite, I'm getting the error Error: connect
ECONNREFUSED 127.0.0.1:465 from nodemailer, I don't think this is my
code's problem? or maybe it is
2. Had to make couple changes to firebase functions, should I make pr to
firebase repo?
3. Question: "Modify the logic for checking if the invitee has already
accepted an invite from the sender." what are we doing if the invitee
has accepted invites for some but not all selected schedules?
4. How are we setting validFor field for links that never expire? put it
as 1000 days for now

---------

Co-authored-by: Yatharth Bhargava <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task issue for a current or past sprint
Projects
None yet
Development

No branches or pull requests

1 participant