-
Notifications
You must be signed in to change notification settings - Fork 180
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
fix(Link): rm margin from icon #6895
Conversation
Удаляем `margin`, т.к.: - сейчас расчёт такой, что иконка всегда после текста, а она может быть перед текстом; - обычный пробел сам по себе и так компенсирует отступ, чтобы текст и иконка не слипались; - по прошедшим e2e тестам видно, что `margin` не нужен.
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
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.
🔥
👀 Docs deployed
Commit f19dcec |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6895 +/- ##
=======================================
Coverage 83.33% 83.33%
=======================================
Files 350 350
Lines 10729 10729
Branches 3575 3575
=======================================
Hits 8941 8941
Misses 1788 1788
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e2e tests |
А к нам дизайнеры не придут, что теперь иконки сильно липнут к тексту?) |
так они не липнут, т.к. есть пробел e2e тесты бы иначе упали если бы удаление если нужен отступ больше, то можно добавить два пробела <Link>Text <Icon /></Link> |
@BlackySoul e2e не поехали, т.к. там иконки и не было xDDD поправил) Вот разница |
А неразрывный пробел будут ставить вручную? |
Ага, но зависит от кейса. Если текст небольшой, то обычного пробела хватит. Вообще на вычитке текста копирайтером такие места находятся и правятся. |
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.
Выглядит разумно, если мы подразумеваем иконку как элемент внутри текста. Но потребует вычитки повсюду, это факт. Может, укажем на этот момент в документации?
изменение в этом PR лишь удаляет пользователи, которые обновятся до версии с этим изменением лишь столкнуться с тем, что иконка теперь имеет отступ только на ширину пробела |
Описание
Удаляем
margin
, т.к.:margin
не нужен.Изменения
Заменил в доках обычный пробел на
&npsp;
, т.к. логичнее использовать его, чтобы иконка не переносилась без текста.Скриншот