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

Allow Events to be Duplicated #232

Closed
wants to merge 14 commits into from

Conversation

nathangong
Copy link
Contributor

Summary

Resolves #231

Allows users to duplicate custom blocks

Checklist

UI Requirements

  • A new duplicate button is added to Event, which should display a popup saying "Duplicate event" when hovered over.

Functional Requirements

  • Event is duplicated correctly with a new ID.

How to Test

Host website locally and test event duplication. Verify that duplicated event id's are unique

EmilyAL001 and others added 14 commits April 2, 2023 01:59
### Summary

Resolves #188 

<!-- What does this PR change and why? Discuss any breaking changes. -->

Adds text at the bottom of the calendar to inform users of courses that
will not appear on the calendar

### Checklist

- [x] The bottom text is displayed with all TBA and weekend sections.
Each section must include the course name + the section code.
- [x] When a user exports the calendar via downloading the image, the
text should also display in the exported image.
- [x] The text should be available in appropriate ratio (text should not
be cut off)
- [x] The text should be wrapped (moved to the next line) or scrollable
automatically according to screen size
- [x] Mobile view works.


### How to Test
<!-- Describe how to test your code. -->
Add a course that is not on the Atlanta campus or has a Saturday meeting
time, and the text of the course name and section will appear at the
bottom of the calendar. When you 'download image', the text will also
appear at the bottom of the calendar.

---------

Co-authored-by: Hailey Ho <[email protected]>
### Summary

Resolves #183

Bugfix for events outside of the calendar's timeframe. Since GTS also
has a bug for classes that end at 9:15pm being displayed outside of the
calendar, this PR also extends the calendar timeframe to 10pm. With
these changes, all events now have to be between 8am and 10pm.

### Checklist

- [x] When the recurring event block start/end time is before 8am or
after 10pm an error message should be generated.
- [x] When a user inputs a custom block start time before 8am and clicks
"add", an error message of "Event start time cannot be before 8am" is
generated in red below the time input field.
- [x] When a user inputs a custom block start time before 10pm and
clicks "add", an error message of "Event end time cannot be past 10pm"
is generated in red below the time input field.
- [x] When the recurring event block start/end time is before 8am or
after 10pm, the recurring event block should:
    - [x] NOT be created as a block
    - [x] NOT be stored 
    - [x] NOT be displayed on the scheduler

### How to Test
Try to add a new event outside of timeframe.

---------

Co-authored-by: Hailey Ho <[email protected]>
### Summary

Resolves #178 

Adds preview labels to some buttons.

### Checklist

- [x] Make sure buttons for each schedule display preview text box with
text upon hover
- [x] Make sure hovering over `Rename Schedule` button displays preview
text box with text "Rename Schedule"
- [x] Make sure hovering over `Create a Copy of Schedule` button
displays preview text box with text "Create a Copy"
- [x] Make sure hovering over `Delete Schedule` button displays preview
text box with text "Delete Schedule"
- [x] Make sure buttons for each course display preview text box with
text upon hover
- [ ] Make sure hovering over `Down Arrow to Expand` button displays
preview text box with text "View Sections and Waitlists" (did not
implement as this would interfere with the seating info popup)
- [x] Make sure hovering over `Prerequisites` button displays preview
text box with text "View Prerequisites"
- [x] Make sure hovering over `Course Color` button displays preview
text box with text "Edit Color"
- [x] Make sure hovering over `Delete Course` button displays preview
text box with text "Remove Course"
    

### How to Test
Hover over buttons

---------

Co-authored-by: Hailey Ho <[email protected]>
### Summary

Resolves #179 

This PR fixes the bug where zooming in and out on the Map using a
trackpad or mouse wheel is extremely slow and laggy. I upgraded
`react-map-gl` from `v5.2.10` to `v5.2.11` which didn't have this
performance issue. I did not upgrade to the latest version since it uses
MapBox v2 which hosts compatibility issues with Babel and would require
hacky fixes.

### Checklist

- [x] Zoom with a trackpad is not finicky
- [x] Zoom with a mouse is not finicky

### How to Test
- Upgrade module with `yarn install`
- Try out the map

---------

Co-authored-by: EmilyAL001 <[email protected]>
Co-authored-by: Hailey Ho <[email protected]>
### Summary

Resolves #181 

Fixes UI issue where "\<unknown\>" is briefly displayed as delete modal
transitions out.

### Checklist

- [x] “Are you sure you want to delete schedule <unknown>?” message is
investigated and removed.
- [x] Popup should be closed immediately with no further UI changes.

### How to Test
Delete a schedule and check to see if "\<unknown\>" is briefly displayed
as the modal transitions out.
### Summary

Resolves #180 

<!-- What does this PR change and why? Discuss any breaking changes. -->
Fixes the feedback window close button resetting the submission page

### Checklist

- [x]  Make sure the x button on the top right closes the session window
- [x] Make sure that the close button on the bottom center ends the
session and closes the session window
- [x] Upon reopening the feedback window after the close button, make
sure a new session starts


### How to Test
<!-- Describe how to test your code. -->
Open the Feedback window, enter a rating and text, then hit "submit" and
then "close" and reopen the window. The submission form should be reset.

---------

Co-authored-by: Nghi Ho <[email protected]>
### Summary

Resolves #177 

Fixed a bug where users weren't able to clone schedules while logged in.

### Checklist
- [x] Upon clicking the `Create a Copy` button, a new schedule should be
generated in the list of schedules below the current schedule.
- [ ] The name of the new schedule should be "OriginalScheduleName" + "
(1)"
- [ ] Upon the nth click of the `Create a Copy` button, each new
schedule created should have a name of "OriginalScheduleName" + " (n)"
- [x] `ScheduleContext` and local storage/firebase collection must be
updated with the new schedule.
- [x] The view should be switched to the duplicate schedule, not the
original one.
- [x] Make sure the above feature is functional in mobile view and web
view


### How to Test
Try cloning a schedule after logging in.

---------

Co-authored-by: EmilyAL001 <[email protected]>
Co-authored-by: Nghi Ho <[email protected]>
### Summary

Resolves: N/A

With the addition of recurring events, we want users to be able to
export their events as well into a `.ics` calendar or image. However,
having only recurring events in the schedule does not enable this
feature. Moreso, the exported `.ics` calendar does not contain recurring
events. This PR fixes these issues and other minor bugs.

### Checklist

- [x] Fixed export not enabling with only recurring events
- [x] Fixed export to calendar not exporting recurring events
- [x] Fixed not being able to set start/end time between 9 PM and 10 PM

### How to Test
- Add events and try exporting to calendar or image

---------

Co-authored-by: Hailey Ho <[email protected]>
### Summary

Resolves #176 

Enabled drag and drop functionality for events. Users can change day and
time of events with a single day and only the time of events with
multiple days by dragging them.

NOTE: Events can't be selected on desktop screens anymore, but can do
further work to make drag and drop work with select functionality as
well if required.

### Checklist
- [x] User can click on the an `EventBlock` and drag it around.
- [x] While the `EventBlock` is being dragged, the block at the original
time should be "blurred"
- [x] Wherever the user drop the `EventBlock`, the event's time info
should be updated in `ScheduleContext`.
- [x] UI works for both light and dark modes.

### How to Test
Add an event and try dragging it.
### Summary

Resolves n/a

Adds new feature popup and fixes event title overflow on mobile.

### Checklist
n/a

### How to Test
Open gt-scheduler

---------

Co-authored-by: Hailey Ho <[email protected]>
Co-authored-by: Hailey Ho <[email protected]>
### Summary

Resolves #211

Only associate lab with lecture by professor's name if they don't have
time conflict

Co-authored-by: Hailey Ho <[email protected]>
@nathangong nathangong closed this Apr 20, 2023
@nathangong nathangong deleted the nathan/duplicate-events branch April 20, 2023 19:40
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.

6 participants