-
Notifications
You must be signed in to change notification settings - Fork 57
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
IBX-497: As an Editor, I want to see redesigned tabs #1780
IBX-497: As an Editor, I want to see redesigned tabs #1780
Conversation
@@ -76,6 +76,7 @@ | |||
<div class="panel panel-primary"> | |||
<div class="panel-body"> | |||
{# 'is_location_visible': location.invisible - param deprecated since EZP-32395 #} | |||
asdf |
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.
There's asdf in this line.
ac70d45
to
11f7677
Compare
|
||
doc.addEventListener('click', handleClickOutsideSecondaryMenu); | ||
doc.querySelectorAll('.ibexa-tabs__toggler').forEach((toggler) => { | ||
toggler.addEventListener('click', toggleContainer); |
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.
toggler.addEventListener('click', toggleContainer); | |
toggler.addEventListener('click', toggleContainer, false); |
toggler.addEventListener('click', toggleContainer); | ||
}); | ||
|
||
doc.addEventListener('click', handleClickOutsidePopupMenu); |
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.
doc.addEventListener('click', handleClickOutsidePopupMenu); | |
doc.addEventListener('click', handleClickOutsidePopupMenu, false); |
document.body.addEventListener('ez-content-tree-resized', adaptTabs); | ||
window.addEventListener('resize', adaptTabs); | ||
})(window, window.document, window.jQuery, window.Translator); | ||
document.body.addEventListener('ez-content-tree-resized', adaptAlltabs); |
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.
document.body.addEventListener('ez-content-tree-resized', adaptAlltabs); | |
document.body.addEventListener('ez-content-tree-resized', adaptAlltabs, false); |
@@ -0,0 +1,8 @@ | |||
<ul class="ibexa-popup-menu {{ class|default('') }}"> | |||
{% for item in items %} | |||
{{ include('@ezdesign/ui/component/popup_menu/popup_menu_item.html.twig', { |
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 think it's bad indent below?
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? I don't know.
@@ -1,24 +1,49 @@ | |||
<div class="ez-header"> | |||
<div class="container"> | |||
<ul class="nav nav-tabs ez-tabs" role="tablist" id="ez-tab-list-{{ group }}"> | |||
<div class="ibexa-tabs"> |
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.
bad indent
10a3376
to
d9509a4
Compare
d9509a4
to
ab1bf94
Compare
cancelAnimationFrame(frame); | ||
} | ||
|
||
frame = requestAnimationFrame(adaptTabsAndPopupMenu); |
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 wonder if frame is correct name, maybe sth like animationFrame? As frame is quite vast term
this.itemHiddenClass = config.itemHiddenClass; | ||
this.container = config.container; | ||
this.getActiveItem = config.getActiveItem; | ||
|
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.
why empty line?
} | ||
|
||
const lastItem = this.items[this.items.length - 1] | ||
const isLastNonactiveItem = lastItem === activeItem ? i === this.items.length - 2 : i === this.items.length - 1; |
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.
what would you say for this.items.length - (lastItem === activeItem ? 2 : 1)
?
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, you are proposing this?
const isLastNonactiveItem = lastItem === activeItem ? i === this.items.length - 2 : i === this.items.length - 1; | |
const isLastNonactiveItem = i === this.items.length - (lastItem === activeItem ? 2 : 1); |
It is shorter, but for me my version is easier to understand.
Do you think that your version is easier to understand?
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 don't. ;) But also I don't like using comparison inside ternary operator, now you have three ===
in one line
…locations/tab.html.twig
Related PRs:
New tabs design
Checklist:
$ composer fix-cs
)