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

new setting button for CBPlayer #768

Merged
merged 7 commits into from Jul 30, 2020

Conversation

jurassic-period
Copy link
Contributor

github-icon closes #num

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2020

Codecov Report

Merging #768 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c4646f...dd0bd53. Read the comment docs.

@jurassic-period
Copy link
Contributor Author

@amshkv

Copy link
Collaborator

@amshkv amshkv left a comment

Choose a reason for hiding this comment

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

Все хорошо, но надо переделать (с)

Comment on lines 169 to 172
.cb-icon-setting {
display: flex;
font-size: 17px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

хм
а зачем тут увеличивать размер шрифта?

Copy link
Collaborator

Choose a reason for hiding this comment

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

по дефолту он в rem и равен 16пикс, а ты своим действием ломаешь это

Copy link
Collaborator

Choose a reason for hiding this comment

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

да и флекс родитель в бутстрапе делается чуть по-другому .d-flex
я так и не понял зачем он нам тут

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Размер я подбирал чтобы визуально шестерёнка подходила, flex лучше центрировал иконку, без него она почему то вниз слазит, флекс как я думаю, надёжней чем вручную двигать поэтому увидел, что он центрировал и оставил его

Copy link
Collaborator

@amshkv amshkv Jul 29, 2020

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">
Copy link
Collaborator

Choose a reason for hiding this comment

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

что за класс такой интересный?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Это бутсраповский класс для "Выпадающий вверх".

Copy link
Collaborator

Choose a reason for hiding this comment

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

Верно, извиняюсь, тут пропустил

Copy link
Contributor Author

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"
Copy link
Collaborator

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

Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Всё верно, так гораздо лучше будет и чище. Я не проверял т.к. решил, что этот класс поддерживает возможность открывать список т.к. без него это будет просто кнопкой, но ошибался.

Comment on lines 179 to 181
.dropdown-toggle::after {
content: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

только что сломались все дропдауны на сайте ;)

Comment on lines 87 to 89
<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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

кнопки у которых есть href? что-то новенькое)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ссылки заменял на кнопки, невнимательность (

Comment on lines 174 to 177
.cb-icon-setting:active, .cb-icon-setting:focus {
outline: none;
box-shadow: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

x-outline-none есть у ребят в файле стилей, скорее всего тебе его хватит

amshkv
amshkv previously approved these changes Jul 29, 2020
@@ -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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

для кнопки класс так и не указал никакой дополнительный

Copy link
Collaborator

Choose a reason for hiding this comment

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

до этого у тебя тут было убирание аутлайна, а сейчас и его нет

Copy link
Contributor Author

Choose a reason for hiding this comment

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

не совсем понял, тут дополнительный класс - "cb-icon-setting"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Или речь о чём то вроде "btn-info" ? Если да, то для чего это нужно?

Copy link
Collaborator

Choose a reason for hiding this comment

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

речь о чем-то вроде btn-info,
бутстрап так устроен, что он сам делает то что надо и при нажатиях и без них, при фокусе и тд
для этого ему нужно знать тип кнопки, который указывается вторым классом
возможно тебе поможет btn-link или что-то с аутлайном

Copy link
Collaborator

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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

а нужен ли тут тогда пустой див?
и всё-таки верни то что рекомендует бутстрап
то что ты не видишь что что-то не работает, не значит что это так)
я про dropup

@@ -166,6 +166,10 @@ a {
right: 10%;
}

.cb-icon-setting:active, .cb-icon-setting:focus {
box-shadow: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

без этого разве нельзя обойтись?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

если бы при нажатии тень не вылазила, а так у меня пока нет идей как по другому отключить дефолтное поведение бустраповской кнопки

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Или оставить тень кнопки? Не красиво же смотрится при нажатии..

Copy link
Collaborator

Choose a reason for hiding this comment

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

если хочешь убирать, то надо сделать как класс outline, это класс-утилита и у него должно быть другое название

@jurassic-period
Copy link
Contributor Author

Снимок экрана от 2020-07-29 17-34-51

@jurassic-period
Copy link
Contributor Author

Снимок экрана от 2020-07-29 19-11-40

amshkv
amshkv previously approved these changes Jul 29, 2020
@ReDBrother ReDBrother merged commit 288453b into hexlet-codebattle:master Jul 30, 2020
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.

None yet

4 participants