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

IBX-497: As an Editor, I want to see redesigned tabs #1780

Merged
merged 18 commits into from
Jun 30, 2021

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
Copy link
Contributor

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.

@tischsoic tischsoic force-pushed the IBX-497-as-editor-i-want-to-see-redesigned-tabs branch from ac70d45 to 11f7677 Compare June 15, 2021 08:34

doc.addEventListener('click', handleClickOutsideSecondaryMenu);
doc.querySelectorAll('.ibexa-tabs__toggler').forEach((toggler) => {
toggler.addEventListener('click', toggleContainer);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
toggler.addEventListener('click', toggleContainer);
toggler.addEventListener('click', toggleContainer, false);

toggler.addEventListener('click', toggleContainer);
});

doc.addEventListener('click', handleClickOutsidePopupMenu);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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', {
Copy link
Contributor

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?

Copy link
Contributor Author

@tischsoic tischsoic Jun 15, 2021

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">
Copy link
Contributor

Choose a reason for hiding this comment

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

bad indent

@tischsoic tischsoic changed the title [WIP] IBX-497: As an Editor, I want to see redesigned tabs IBX-497: As an Editor, I want to see redesigned tabs Jun 21, 2021
@tischsoic tischsoic force-pushed the IBX-497-as-editor-i-want-to-see-redesigned-tabs branch 2 times, most recently from 10a3376 to d9509a4 Compare June 22, 2021 09:26
cancelAnimationFrame(frame);
}

frame = requestAnimationFrame(adaptTabsAndPopupMenu);
Copy link
Contributor

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;

Copy link
Contributor

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;
Copy link
Contributor

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)?

Copy link
Contributor Author

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?

Suggested change
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?

Copy link
Contributor

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

@dew326 dew326 merged commit b361aac into master Jun 30, 2021
@dew326 dew326 deleted the IBX-497-as-editor-i-want-to-see-redesigned-tabs branch June 30, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants