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
new setting button for CBPlayer #768
Conversation
Codecov Report
@@ Coverage Diff @@
## master #768 +/- ##
=======================================
Coverage 77.46% 77.46%
=======================================
Files 85 85
Lines 1522 1522
=======================================
Hits 1179 1179
Misses 343 343 Continue to review full report at Codecov.
|
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.
Все хорошо, но надо переделать (с)
services/app/assets/css/style.scss
Outdated
.cb-icon-setting { | ||
display: flex; | ||
font-size: 17px; | ||
} |
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.
по дефолту он в rem и равен 16пикс, а ты своим действием ломаешь это
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.
да и флекс родитель в бутстрапе делается чуть по-другому .d-flex
я так и не понял зачем он нам тут
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.
Размер я подбирал чтобы визуально шестерёнка подходила, flex лучше центрировал иконку, без него она почему то вниз слазит, флекс как я думаю, надёжней чем вручную двигать поэтому увидел, что он центрировал и оставил его
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.
дефолт лучше подбора
в таких случаях лучше заюзать что-то стандартное
Плюс ты можешь благодаря флексам сделать полное выравнивание по центру, но это надо делать через бутсраповские классы, а не свои
@@ -72,6 +72,23 @@ const ControlPanel = ({ | |||
</button> | |||
{children} | |||
<button type="button" className={speedControlClassNames} onClick={onChangeSpeed}>x2</button> | |||
<div className="dropup"> |
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.
Это бутсраповский класс для "Выпадающий вверх".
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.
без него тоже вверх выпадает)) убрал его
@@ -72,6 +72,23 @@ const ControlPanel = ({ | |||
</button> | |||
{children} | |||
<button type="button" className={speedControlClassNames} onClick={onChangeSpeed}>x2</button> | |||
<div className="dropup"> | |||
<button | |||
className="btn dropdown-toggle cb-icon-setting" |
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.
что-то мне подсказывает, что мы можем немного схитрить, убрать dropdown-toggle
и не понадобиться то, что ты выдумал с .dropdown-toggle::after
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.
кнопка обычно не существует без каких-то описывающих ее классов-принадлежностей
https://getbootstrap.com/docs/4.5/components/buttons/#examples
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.
Всё верно, так гораздо лучше будет и чище. Я не проверял т.к. решил, что этот класс поддерживает возможность открывать список т.к. без него это будет просто кнопкой, но ошибался.
services/app/assets/css/style.scss
Outdated
.dropdown-toggle::after { | ||
content: none; | ||
} |
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.
только что сломались все дропдауны на сайте ;)
<button type="button" className="dropdown-item" href="/">Action</button> | ||
<button type="button" className="dropdown-item" href="/">Another action</button> | ||
<button type="button" className="dropdown-item" href="/">Something else here</button> |
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.
кнопки у которых есть href? что-то новенькое)
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.
ссылки заменял на кнопки, невнимательность (
services/app/assets/css/style.scss
Outdated
.cb-icon-setting:active, .cb-icon-setting:focus { | ||
outline: none; | ||
box-shadow: none; | ||
} |
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.
x-outline-none
есть у ребят в файле стилей, скорее всего тебе его хватит
@@ -72,6 +72,23 @@ const ControlPanel = ({ | |||
</button> | |||
{children} | |||
<button type="button" className={speedControlClassNames} onClick={onChangeSpeed}>x2</button> | |||
<div> | |||
<button | |||
className="btn d-flex cb-icon-setting" |
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.
до этого у тебя тут было убирание аутлайна, а сейчас и его нет
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.
не совсем понял, тут дополнительный класс - "cb-icon-setting"
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.
Или речь о чём то вроде "btn-info" ? Если да, то для чего это нужно?
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.
речь о чем-то вроде btn-info,
бутстрап так устроен, что он сам делает то что надо и при нажатиях и без них, при фокусе и тд
для этого ему нужно знать тип кнопки, который указывается вторым классом
возможно тебе поможет btn-link
или что-то с аутлайном
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.
ты отключаешь тут тень, но аутлайн так и не выключил (хз нужно тебе это или нет)
@@ -72,6 +72,23 @@ const ControlPanel = ({ | |||
</button> | |||
{children} | |||
<button type="button" className={speedControlClassNames} onClick={onChangeSpeed}>x2</button> | |||
<div> |
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.
а нужен ли тут тогда пустой див?
и всё-таки верни то что рекомендует бутстрап
то что ты не видишь что что-то не работает, не значит что это так)
я про dropup
services/app/assets/css/style.scss
Outdated
@@ -166,6 +166,10 @@ a { | |||
right: 10%; | |||
} | |||
|
|||
.cb-icon-setting:active, .cb-icon-setting:focus { | |||
box-shadow: none; | |||
} |
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.
если бы при нажатии тень не вылазила, а так у меня пока нет идей как по другому отключить дефолтное поведение бустраповской кнопки
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.
если хочешь убирать, то надо сделать как класс outline, это класс-утилита и у него должно быть другое название
closes #num