-
Notifications
You must be signed in to change notification settings - Fork 14
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
Roadmap Search Redesign (Part 1) #514
base: main
Are you sure you want to change the base?
Conversation
(preliminary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grabbing cursor only shows when you first start the drag and are still hovering over the original spot which bothers me. I think the way around would have to be adding/removing the cursor: grabbing
style to the document body within the onStart and onEnd listeners for dragging.
|
||
.add-course-modal { | ||
@include globals.bottom-overlay(500); | ||
background-color: var(--background); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background-color: var(--background); | |
background-color: var(--overlay1); |
background color is a little dark IMO in dark mode, and for most modals or divs containing content, the background is overlay1 or 2 so this would be more consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
react-beautiful-dnd still needs to be removed as well as any dead code (e.g. CourseHitItem component in RoadmapPage)
@@ -112,8 +113,7 @@ const SideBar = () => { | |||
<div className="sidebar mini">{links}</div> | |||
<CSSTransition in={showSidebar} timeout={500} unmountOnExit> | |||
{/* Clicking this is only an alternative action to something that is already accessible */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment looks like it can be removed
.add-course-form { | ||
border-radius: var(--border-radius); | ||
// border-radius: var(--border-radius); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// border-radius: var(--border-radius); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this component is unused right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this file still used?
|
||
const { coursebag } = useCoursebag(); | ||
const { results, searchInProgress } = useAppSelector((state) => state.search.courses); | ||
const shownCourses = JSON.parse(JSON.stringify(showCourseBag ? coursebag : results)) as CourseGQLData[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume JSON.parse(JSON.stringify(...)
is a way to make a deep copy of the array of courses. Is that necessary? If so, add a comment stating why. Also not sure if this is the best way to make a deep copy but can't think of any other off the top of my head.
</Draggable> | ||
); | ||
}); | ||
const coursesCopy = JSON.parse(JSON.stringify(data.courses)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment I had for SearchSidebar
Description
SortableJS instead of React Beautiful DND
This library makes the animations more smooth when being dragged (cloned) from the search bar and when being dropped (inserted) into a quarter in the user's roadmap.
Previously, it used to move the dragged element into the quarter, then have a sudden transition in it's shape as it re-rendered the component. Now, there's a placeholder component when dragging so there's no layout change.
Compare https://peterportal.org/roadmap vs https://staging-514.peterportal.org/roadmap
Search Layout and Desktop Year Layout
Before (left) and after (right):
Mobile "Add Course" Menu
Before:
After:
Steps to verify/test this change:
Issues
Didn't find any