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

Implemented top bar redesign #445

Merged
merged 15 commits into from
Jan 27, 2021
Merged

Implemented top bar redesign #445

merged 15 commits into from
Jan 27, 2021

Conversation

vladiatrinh
Copy link
Contributor

@vladiatrinh vladiatrinh commented Dec 10, 2020

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

  • Enroll in multiple courses in QMI where you have different roles, TA and student, for example.
  • Make sure that the new toggle shows up on all pages
  • When clicked, a menu should pop up with all the classes you are enrolled in. Your current class should have a check mark next to it.
  • If you aren't currently in a specific course view, the toggle should just say "Courses." This happens if you're on the Course Selection page.
  • If professor, make sure Prof/Student toggle switches between the two views

Notes

Breaking Changes

None

  • I have updated the documentation accordingly.
  • My PR adds a @ts-ignore

@vladiatrinh vladiatrinh requested a review from a team as a code owner December 10, 2020 23:08
@dti-github-bot
Copy link
Member

dti-github-bot commented Dec 10, 2020

[diff-counting] Significant lines: 273.

@vladiatrinh vladiatrinh changed the title Implemented redesign for new top bar in the student and ta view Implemented top bar redesign in the student and ta view Dec 10, 2020
@vladiatrinh vladiatrinh changed the title Implemented top bar redesign in the student and ta view Implemented top bar redesign Dec 11, 2020
@ngwattcos
Copy link
Member

ngwattcos commented Dec 11, 2020

Looks very good in general! There are a couple things I want to mention here:

Interaction
The dropdown should collapse if you click on anything except for the dropdown. For example, if the dropdown for INFO 4998 is open, and you click either 1) a white space, or 2) the other dropdown, it will collapse INFO 4998.

Gradient & Width
Might be seeing things, but I believe the designs of the buttons is slightly wider, by about 50%. In addition, I believe the gradient in the design is mainly horizontal, at a slight vertical angle, around 15 degrees from vertical (used a color picker so it's just an estimation)

image
image

Design Questions

Alignment/Scroll Bars/Top Bar Hovering (absolute) Position
This probably wasn't thought up of during the design but switching from student view to professor view could cause alignment to shift when a scroll bar appears (it's a bit jarring visually but not egregious). See INFO 4998 for example.

Naming
I feel that the name Student for the student view is a bit iffy, since 1) all users can see some form of the queue and 2) students vs. tas/professors see a different view.

Prof Tags?
TAs get tags, but should professors as well?
image

Do you mind if we bring these questions back to design?

@abcdefguan abcdefguan linked an issue Dec 16, 2020 that may be closed by this pull request
@abcdefguan
Copy link
Contributor

abcdefguan commented Dec 16, 2020

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 😄

@abcdefguan
Copy link
Contributor

Which Queue Me In logo is correct?
Is it this one?
Logo
Or this one
QLogo2

I've got the feeling that
QLogo2
is the correct logo, but this PR appears to use
Logo
as its logo

import { Icon } from 'semantic-ui-react';
import { logOut } from '../../firebasefunctions';
import Logo from '../../media/Logo.svg';
Copy link
Contributor

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]);
Copy link
Contributor

@abcdefguan abcdefguan Dec 16, 2020

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.

@abcdefguan
Copy link
Contributor

Looks good to me. Great Job. Some minor issues you should clear up then your PR is good to go.

Copy link
Member

@ngwattcos ngwattcos left a 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.)

ngwattcos
ngwattcos previously approved these changes Jan 25, 2021
@ngwattcos ngwattcos dismissed their stale review January 25, 2021 02:10

Needs more changes.

Copy link
Member

@ngwattcos ngwattcos left a 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):
image

You can fix this by referring to lines 26-32 in CourseSelection.tsx, which filter courses by endDate.

ngwattcos
ngwattcos previously approved these changes Jan 26, 2021
Copy link
Member

@ngwattcos ngwattcos left a 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,

@ngwattcos ngwattcos dismissed their stale review January 27, 2021 03:20

There is as major bug related to caching the last class.

Copy link
Member

@ngwattcos ngwattcos left a comment

Choose a reason for hiding this comment

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

LGTM

@ngwattcos ngwattcos merged commit d4de532 into master Jan 27, 2021
@ngwattcos ngwattcos deleted the vladia/new_top_bar branch January 27, 2021 04:55
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.

Top bar does not handle courses that have ended correctly
5 participants