Skip to content

Comments

don't render nb-user-name if there's nothing to#508

Open
iEgit wants to merge 1 commit intoyandex-ui:masterfrom
iEgit:master
Open

don't render nb-user-name if there's nothing to#508
iEgit wants to merge 1 commit intoyandex-ui:masterfrom
iEgit:master

Conversation

@iEgit
Copy link
Contributor

@iEgit iEgit commented Aug 19, 2015

Проблема в том, что, если передать пустой userName и остается по умолчанию ltr, то _nb-user-label выставляется margin-left: 10px, и получается лишнее пространство внутри _nb-normal-user

Copy link
Member

Choose a reason for hiding this comment

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

А если указан только email, но не указан username — все равно нарисуем пустой спан для username? Кажется, что имеет смысл проверять только юзернейм, потому что это обязательный параметр: нет юзернейма, не получится указать только емаил.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Тут все в одном _nb-user-label лежит, посмотри

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Пустой _nb-user-name ни на что не влияет пока что, его можно всегда рисовать

Copy link
Member

Choose a reason for hiding this comment

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

Ок. Я бы разбил на два матча, для удобства:

<span class="_nb-user-label">
  apply .[.username] nb-user-username
  apply .[.email] nb-user-email
</span>

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.

2 participants