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

Sidenav based on screen resize #164

Merged
merged 23 commits into from
Dec 16, 2020
Merged

Conversation

andOrlando
Copy link
Collaborator

@andOrlando andOrlando commented Nov 7, 2020

Closes #152
Adds a hamburger with different contents based on screensize. Also comes with a couple css changes for dropdown-related things. For more specific details, see commits

Importantly, this doesn't work dynamically so should we add tabs or change tab sizes, we're going to reconfigure the exact screensizes in both the css and the javascript fixed that

@andOrlando
Copy link
Collaborator Author

andOrlando commented Nov 7, 2020

merged the branch from info-tab to both debug the dynamic screen resize breakpoints and because now there's actually enough space to fit it in nicely. This will also close #76 partially but people should also update the info tab as they see fit.

@andOrlando andOrlando changed the title Screensize hamburger Sidenav based on screen resize Nov 9, 2020
@psvenk psvenk force-pushed the screensize-hamburger branch 3 times, most recently from 153e24b to 98f1a1d Compare November 12, 2020 00:20
@psvenk
Copy link
Member

psvenk commented Nov 12, 2020

This pull request currently depends on #157 because it adds the info tab to the hamburger menu. I have added the current contents of #157 to this PR, but this can be replaced with the final info tab (using a rebase) when #157 is done.

@psvenk psvenk force-pushed the screensize-hamburger branch 4 times, most recently from 19f253c to 567e467 Compare November 25, 2020 16:28
@andOrlando
Copy link
Collaborator Author

  • move hamburger to left
  • fix close button
  • remove weird color merge in sidenav

@psvenk psvenk modified the milestone: 2.6.0 Nov 29, 2020
@tektaxi tektaxi added this to the 2.5.2 milestone Dec 4, 2020
@MohanMaker MohanMaker mentioned this pull request Dec 9, 2020
@psvenk
Copy link
Member

psvenk commented Dec 9, 2020

@andOrlando Looks good. The only remaining blocker is that there is no visual indication of the currently selected tab (as there is in the status quo). We also thought that it would be nice to have an animation when the sidenav changes size, but this can be addressed in a separate pull request (#197).

@psvenk psvenk removed this from the 2.5.2 milestone Dec 9, 2020
public/home.html Outdated Show resolved Hide resolved
Copy link
Member

@psvenk psvenk left a comment

Choose a reason for hiding this comment

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

Here are some code style changes. In general, a couple more things:

  • Be more consistent in your usage of single vs. double quotes. The convention for this codebase is to use double quotes (at least in the frontend), so it would be good to go with that.
  • It would be good to avoid jQuery for new code, but my view is that this code is already written and so it is not as much of a priority here.

public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/extraFunctions.js Outdated Show resolved Hide resolved
public/js/home.js Outdated Show resolved Hide resolved
public/js/home.js Outdated Show resolved Hide resolved
@psvenk psvenk force-pushed the screensize-hamburger branch 3 times, most recently from a0cb9aa to 1c1415c Compare December 14, 2020 03:02
@psvenk psvenk added this to the 2.6.0 milestone Dec 15, 2020
Adds the hamburger and stuff inside of it. Adds media tags to all the tab buttons. Currently the "Current GPA" dropdown only displays in the sidenav menu
just moves the one gpa dropdown in and out of the navbar, removes the gpa dropdown in the navbar, and updates the order of the elements in the .tab

also does some visual changes like the positioning of the dropdown arrow in the sidenav (sorry psvenk for not doing multiple commits lol)
updates the inaccessible color to make it contrast a little less

updates the dropdown items so that they actually fit correctly. There's a small padding issue with this if someone feels like fixing this

makes everything 270px and float right in the sidenav so it can have a consistant animation

makes the activated item thing for the side nav a little different as to better fit with its theme

also, this one is super important, makes it so that whenever you open one dropdown menu it closes all others becuase otherwise the sidenav freaks out when you have multiple open at once, also this is just a nice ux change
@psvenk psvenk force-pushed the screensize-hamburger branch from 1c1415c to 95c55e0 Compare December 16, 2020 15:09
makes it look a little better
removes hardcoded media queries, instead initializes the resize things later in home.js.

Side note: I now love jQuery
andOrlando and others added 8 commits December 16, 2020 10:11
makes it less of a mess in terms of readability, separating ui changes into functions (like switch_hamburger)

improves performance by only updating ui when it changes from one bracket of screensizes to the next

improves css a little for consistancy (in ui not css, the css is a mess) and some nicer colors.
.... I have nothing to say
Since it only detected changes in state 1 apart from eachother it couldn't detect it from 0 to 2 or 2 to 0, which was an oversight on my part. Fixed now
instead of having dupilcates it hides/shows in the sidenav, it just removes displaces them altogether.

also:
- fixes overcomplicated jquerys
- improves a couple comments
- removes tabs in sidenav
- removes weird unecessary init if tree
ugly, but apparently consistant with the codebase. Also changes ==s into ===s
changes lets to consts and vars to lets
@psvenk psvenk force-pushed the screensize-hamburger branch from 95c55e0 to e9271f2 Compare December 16, 2020 15:12
andOrlando and others added 9 commits December 16, 2020 10:21
- removes "close" text and separates close button from rest of sidenav
- moves hamburger over to the far left
- makes hamburger switch exempt
- fixes bug with moving elements in and out of sidenav
- Fixes a weird bug where it would reorder the sidenav sometimes
- Makes the right items not duplicated in the sidenav
- Seriously cleans up the code for switch_right_items
- Cleans up the code a little for switch_left_items
- makes it so that the width of the tableData dropdown is 210px normally and 270px in the sidenav
- removes the last-child thing which was a bandaid for a problem that was fixed in an earlier commit
- darkens basically all sidenav colors
- makes x a little smaller
- makes colors variables
- gives x button's background color a variable in the style attribute
- makes sidenav-overlay have a normal pointer
It still doesn't work in the sidenav, but I think I prefer it that way
Co-authored-by: psvenk <45520974+psvenk@users.noreply.github.com>
I accidentally deleted some code during code review; this restores that
code.
@psvenk psvenk force-pushed the screensize-hamburger branch from e9271f2 to 1fdc66b Compare December 16, 2020 15:42
also changes some of the variable names which were unused outside of sidenav to be more sidenav oriented (all the lightgrays were only used in sidenav)
@psvenk psvenk merged commit 474a653 into Aspine:master Dec 16, 2020
@andOrlando andOrlando deleted the screensize-hamburger branch December 20, 2020 03:28
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.

Collapse navigation bar into hamburger menu on small screens
3 participants