-
Notifications
You must be signed in to change notification settings - Fork 37
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
[#701] Navbar selection and animation (connects #701) #705
Conversation
@Tille88 looked on both implementation. It seems similar but top one seems to have more delay on animation completion. Also after menu is highlighted white seems to be too strong than white used on pages. So can we change it to something that will not look too highlighted instead just a focus between menu items. |
Thanks @lmmrssa |
I think I saw in the end what you meant with the delay @lmmrssa , but when the transition kicks in is fully dependent on when the route is fully loaded it seems. Tried to see how having a fade out looked, but with any laggy behavior at all it looked terrible, so skipped that. For color, you can as here match the "Library" background rgb(245, 245, 245): The dashboard background rgb(250, 250, 250): Or have current implementationrgb(255, 255, 255): Can't find any scss variables that gives me any of the first two. And no implementation seems obviously superior, so keeping it for now until someone gives suggestions of what change, if any, would be best :) |
Also, in screenshots above, the navbar white matches the rgb(3x) x= [245, 250, 255] in that order |
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 like the animations & adding comments to the templates, but it needs a few changes
src/app/home/home.scss
Outdated
@@ -7,6 +7,31 @@ | |||
grid-template-areas: "header" "main"; | |||
height: 100vh; | |||
|
|||
// Animates pulsating movement before route being fully activated | |||
/deep/ mat-sidenav-container .mat-button.pulsate{ |
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.
Deep (shadow-piercing) selectors are deprecated and being phased out by browsers, so we shouldn't use them.
https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep
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.
@paulbert Please check changes when you have time
src/app/home/home.component.html
Outdated
<a mat-button routerLink="/users" i18n-title title="Users"> | ||
<mat-icon svgIcon="myTeams"></mat-icon> | ||
<label i18n>Members</label> | ||
<li *ngFor="let route of topNavEls"> |
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.
Each navigation link was written out individually because the i18n
translation does not currently work to translate JavaScript in the component. This will hopefully be updated for v6, but until then we should keep the navigation in a translatable state.
You've added a lot of attributes here, so I wouldn't want to repeat those. I think you should convert these into one directive that you can add to the a
elements.
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.
@paulbert Please check changes when you have time
|
d327027
to
2743d3b
Compare
@Tille88 I haven't been able to look through this in detail, but I think it's ready to merge with maybe a few tweaks which I can take care of. I rebased it today (we need to have all branches up to date before making a change to our Travis build process), so make sure to update your local branch if you are going to do any more work on this. |
@paulbert yes, I think I've done what I can with this one, the CSS may need to change when Angular have found a better way to allow overriding styles of e.g. material design components, but for now it uses what they, and everyone else writing on it seems to suggest. |
Left navbar selection, while keeping transition simple works pretty well IMHO
There is also a commented out part that (although ugly, and can easily be improved) tests how it would look with a reverse colour transition (blue to white, white to blue), but it ends up looking so similar to just having a global opacity transition instead. However, when reviewing please uncomment, comment out alternative solution and take a look!
I'm no CSS expert, so please provide ideas on improvements if you have any!