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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iEgit
Copy link
Contributor

@iEgit iEgit commented Aug 19, 2015

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

@@ -52,7 +52,7 @@ match .user nb-user-pic {
</span>
}

match .user nb-user-name {
match .user[!!.username || !!.email] 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.

А если указан только 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