-
Notifications
You must be signed in to change notification settings - Fork 56
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
EZP-29117: Improve Content Type view design #448
Conversation
Amazing! Thanks @mikadamczyk for the improvement. |
@@ -74,7 +74,7 @@ | |||
color: $ez-color-base-dark; | |||
} | |||
|
|||
.ez-info-view, .ez-link-manager-view { | |||
.ez-info-view, .ez-link-manager-view, .ez-content-type-view { |
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.
Please move it to a new line, it's more readable.
</tr> | ||
</thead> | ||
|
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.
Not needed empty line
|
||
<br /> | ||
<br /> |
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.
I know it's not yours but this br
looks odd. Can you check if it's needed?
ba8fc5f
to
0145ae1
Compare
@@ -74,7 +74,9 @@ | |||
color: $ez-color-base-dark; | |||
} | |||
|
|||
.ez-info-view, .ez-link-manager-view { | |||
.ez-info-view, |
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.
Maybe, instead of adding parent selectors you should create an instance of modifier class? It becomes to coupled to a specific context that is against BEM rules.
A thing to consider @dew326
@@ -117,6 +119,14 @@ | |||
} | |||
} | |||
|
|||
.ez-content-type-view { | |||
.ez-table-field-definitions { | |||
thead th { |
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.
Can you avoid using tag selectors? Please, create a CSS class attached to th
elements and use it instead.
<br /> | ||
<div class="container mt-4 px-4"> | ||
<section class="ez-fieldgroup"> | ||
<h2 class="ez-fieldgroup-name">{{ "content_type.content_field_definitions"|trans|desc("Content field definitions") }}</h2> |
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.
ez-fieldgroup-name
is against BEM rules. You have to improve it. I suggest converting it to: ez-fieldgroup__name
</div> | ||
<section class="container mt-4 px-5"> | ||
{% for group, field_definitions in field_definitions_by_group %} | ||
<header class="ez-table-header ez-table-header"> |
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.
Duplicated classes
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.
It should be ez-table__header
|
||
<table class="table ez-table-field-definitions"> |
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.
ez-table__field-definitions
ping @sunpietro |
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.
Please, review your Twig updates once again.
|
||
<table class="table"> | ||
<thead> | ||
<table class="table ez-table--list table"> |
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.
Duplicated CSS class
{{ macros.content_type_edit(content_type, content_type_group, 'btn btn-primary') }} | ||
</div> | ||
<header class="ez-table__header"> | ||
<div class="ez-table-header__headline">{{ "content_type.content_type"|trans|desc("Content Type") }}</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.
Instead of ez-table-header__headline
set ez-table__headline
EZP-29117: Improve content type view design - miko EZP-29117: Improve content type view design -miko
width: calc(100% / 3); | ||
} | ||
} | ||
} | ||
|
||
.ez-table-header { |
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.
It can be removed now.
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.
So far so good. ✨
Waiting for final commit.
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.
Looks like there are naming inconsistencies in many other files, unrelated to this PR. For this PR +1
@micszo can we merge it? |
Checklist:
$ composer fix-cs
)