-
Notifications
You must be signed in to change notification settings - Fork 39
Feature/navbar collpase optimisation #12
Merged
pimenovoleg
merged 11 commits into
positive-js:master
from
roll314:feature/navbar_collpase-optimisation
Jul 21, 2018
Merged
Feature/navbar collpase optimisation #12
pimenovoleg
merged 11 commits into
positive-js:master
from
roll314:feature/navbar_collpase-optimisation
Jul 21, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pimenovoleg
reviewed
Jul 11, 2018
src/lib/navbar/navbar.component.ts
Outdated
public itemsForCollapse: CachedCollapsedItemWidth[] = [] | ||
) {} | ||
|
||
setCollapsed(collapsed: boolean): number { |
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.
реализовать метод по его названию
pimenovoleg
reviewed
Jul 16, 2018
src/lib/core/utils/utils.ts
Outdated
@@ -6,5 +6,5 @@ export function toBoolean(value: any): boolean { | |||
} | |||
|
|||
export function isNotNil(value: any): boolean { | |||
return value !== 'undefined' && value !== null; | |||
return value !== undefined && value !== null; |
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.
turn on --strictNullChecks (for Webpack dev build)
pimenovoleg
reviewed
Jul 20, 2018
src/lib/navbar/_navbar-theme.scss
Outdated
@include mc-typography-level-to-styles($config, body); | ||
} | ||
|
||
.mc-navbar-left, .mc-navbar-right, .mc-navbar-brand { | ||
.mc-navbar-item { | ||
> mc-navbar-title > .mc-navbar-title, > .mc-navbar-title { |
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.
очень ждем этой правки
pimenovoleg
approved these changes
Jul 21, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@fost
200 000 запусков с различным (случайным) кол-м элементов для схлопывания
Время указано без учета отрисовки
Не оптимизированый вариант
Google Chrome
4.67507360048536 (ns)
Firefox
5.05437921458204 (ns)
Edge
5.04821571180474 (ns)
Оптимизированый нативный варинат
Google Chrome
0.2304445221024541 (ns)
Firefox
0.3454046790842149 (ns)
Edge
0.3523217045234725 (ns)
Angular way (время без учета времени обработки изменения angular)
визуально выглядит чуть чуть похуже чем нативный вариант.
Возможно стоит устанавливать класс нативно, но дожидаясь обработки angular.
Введена опция allowSetClassNative у McNavbarTitle в качестве внутренней настройки
Google Chrome
0.2525322296627511 (ns)
Firefox
0.2962355475514478 (ns)
Edge
0.2999287502285111 (ns)