-
Notifications
You must be signed in to change notification settings - Fork 38
Conversation
Congratulations on your first PR!!! |
Про сами тултипы В тултипе типографика своя, а не взята из миксинов типографики. Посмотри как в навбаре, например, там вроде правильно используется. Только в тултипах не title, а caption. Про доки Давай ещё кнопки соберем ближе к центру? Даже при достаточно широком окне не хватает места, чтобы в левой колонке left'у хватило места, он переносится наверх. Я сначала не понял, что происходит. |
Про сами тултипы Пока открыты эти тултипы не показываются другие, привязанные на хувер: Скринкаст: http://d.mikeozornin.ru/w0RnZJ Вот здесь в типографике должен быть не small-text, а caption. Примеры |
А, забыл написать. Новое позиционирование (когда уголок у right и left сверху, а не по середине) — отлично. |
@mikeozornin выставил caption вместо small-text. Клик-ивент убрал, теперь Enter не будет работать. Обновил немного пример - повесил тултип на элементы списка, так же добавил пример со свойством mcTooltipDisabled. |
На вид все хорошо. |
На вики должны быть доки для компонента |
Опиши в кратце, общую концепцию работы тултипа, например: То что я сейчас вижу по коду меня не очень радует, но возможно я что то не понимаю... |
src/lib/tooltip/tooltip.component.ts
Outdated
console.log(this.availablePositions); | ||
|
||
Object.keys(this.availablePositions).some((key) => { | ||
if (JSON.stringify($event.connectionPair) === JSON.stringify(this.availablePositions[ key ])) { |
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.
я думаю найдется не один способ сделать это без JSON.stringify
src/lib/tooltip/_tooltip-theme.scss
Outdated
|
||
$shadow-color: rgba(0, 0, 0, 0.2); | ||
$border-radius-base: 3px; | ||
$box-shadow-base: 0 2px 4px 0 $shadow-color; |
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.
Все что касается цвета и типографики должно быть в теме т.е. нужно было перенести только эту строчку. Посмотри как сделано в других компонентах.
Нужно исправить ошибки линтера: |
не нашел команды запуска дев примера. |
в дев примере при фокусировке на первой кнопке тултип не появляется. |
src\lib-dev\tooltip\module.ts - нужно почистить, содержит неиспользуемый код, видимо копипаст... |
Насколько Я вижу, теперь тултип удаляется из DOM сразу же после добавления. Считаю, что проблема не решена, нужно разбираться и убрать такое поведение. |
Ошибки в тестах нужно поправить |
Еще смущает ESC для тултипа, но если так было задумано то... В остальном все отлично, после исправления: |
src/lib/tooltip/tooltip.component.ts
Outdated
ngOnInit(): void { | ||
const element: any = this.elementRef.nativeElement; | ||
// tslint:disable-next-line | ||
ngOnInit(): void {} |
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.
С какой целью добавлен пустой метод ?
src/lib/tooltip/tooltip.component.ts
Outdated
|
||
// tslint:disable-next-line | ||
ngAfterViewInit(): void { |
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.
А какой смысл делать какие либо действия в ngAfterViewInit, если они никак не связаны с view ?
src/lib/tooltip/tooltip.component.ts
Outdated
|
||
_afterVisibilityAnimation(e: AnimationEvent): void { | ||
if (e.toState === 'false' && !this.mcVisible) { | ||
this.hideTId = setTimeout(() => { |
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.
линтер ругается на тип
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.
Не должен по идее. Возвращаемое значение у setTimeout -> number. Пробовал invalidate сделать, у меня ошибки не появляются.
src/lib/tooltip/tooltip.component.ts
Outdated
this._markForCheck(); | ||
if (!this.isContentEmpty()) { | ||
this._closeOnInteraction = true; | ||
this.showTId = setTimeout(() => { |
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.
линтер ругается на тип
feat(tooltip): Fixing tests feat(tooltip): MR comments partly fixed feat(tooltip): Updating implementation feat(tooltip): Tooltip typography feat(tooltip): Some positioning updates feat(tooltip): Mr fixes: click event removed, example updated feat(tooltip): Fixing unit tests feat(tooltip): Fix positioning change on scroll strategy feat(tooltip): Removing console log and unused variables from styles feat(tooltip): Update after rebase feat(tooltip): Removing tooltip element from DOM unless it is triggered to show feat(tooltip): Moving styles feat(tooltip): Merge request changes feat(tooltip): Minor changes connected to overlay feat(tooltip): Updating positioning logic feat(tooltip): Linter errors fix feat(tooltip): Destroy tooltip component after hide feat(tooltip): Fixing issues with show\hide delay and positioning feat(tooltip): Updating tests feat(tooltip): Renaming error throw method for positioning
@lskramarov approve it? |
Тултип WIP.
Запускать "server-dev:tooltip": "npm run server-dev -- --env.component tooltip"
Первая кнопка показывает тултип по фокусу, две последнии по клику.