-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implemented top bar redesign #445
Conversation
[diff-counting] Significant lines: 273. |
Spotted a bug relating to this PR. Please look at issue #448 . I believe this is an old issue though (like it was an issue before this PR) but it'd be nice to fix this issue while you're at it 😄 |
import { Icon } from 'semantic-ui-react'; | ||
import { logOut } from '../../firebasefunctions'; | ||
import Logo from '../../media/Logo.svg'; |
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.
import Logo from '../../media/QLogo2.svg';
}) => { | ||
const history = useHistory(); | ||
|
||
const [showMenu, setShowMenu] = useState(false); | ||
const [image, setImage] = useState(props.user ? props.user.photoUrl : '/placeholder.png'); | ||
|
||
const userPhotoUrl = props.user ? props.user.photoUrl : '/placeholder.png'; | ||
useEffect(() => setImage(userPhotoUrl), [userPhotoUrl]); |
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'm not sure that this line of code does anything because it doesn't actually introduce any side effects (outside of React). If you think this should be removed, you should probably test whether removing it introduces any strange behaviour / regressions. Probably best to leave it alone.
Looks good to me. Great Job. Some minor issues you should clear up then your PR is good to go. |
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.
Hi Vladia, nice work on incorporating the design revisions!
There are still a few other things left to add (also there's a merge conflict in one file. Let me know if you need any help resolving it!):
For each dropdown, the dropdown should close as soon as you click off the dropdown (i.e., whitespace, the other dropdown, etc.)
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.
Nice work, @triple-jay! Unfortunately it seems that the Queue/Dashboard dropdown also needs to be collapsed when not clicking on the dropdown.
In addition, there is still a problem with #448 - it displays courses that have ended ((in the screenshot below, CS 3110 has already ended):
You can fix this by referring to lines 26-32 in CourseSelection.tsx
, which filter courses by endDate
.
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.
Looks good to me! Just be sure to rebase with the newest commits from master,
There is as major bug related to caching the last class.
d85eeaa
to
2901b2e
Compare
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.
LGTM
Summary
Redesigned the top bar by moving the course toggle from the CalendarView to the TopBar and changing the QMI Logo. For professors, I also added a toggle that switches between Student and Professor View, replacing the Switch View button in the log out menu.
Cristie's figma design for reference: https://www.figma.com/file/h0kMHuGjX9QCtZ0Y6rUbDj/Fall-2020?node-id=709%3A143
I also fixed a weird bug (which is in production QMI too), where if you click anywhere on the top bar, the modal for the log out menu appears. Now, it only appears if you click the user profile div.
Test Plan
Notes
Breaking Changes
None