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

Add active button filter #509

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

PolinaShneider
Copy link
Contributor

image

@@ -56,6 +56,7 @@ module.exports = (function () {
if (filterButton) {

filterButton.addEventListener('click', filterAction);
filterButton.addEventListener('click', toggleActiveButtonClass);
Copy link
Member

Choose a reason for hiding this comment

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

не нужно вешать дублирующее событие


filterButtons.forEach((button) => {

button.classList.remove('editor-landing__plugins-filter-button--active');
Copy link
Member

Choose a reason for hiding this comment

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

расхардкодить классы

};

/**
* Show only Inline Tools, hide Blocks
*/
const showInlineToolsOnly = function () {

toggleTools(inlineTools, blockTools);
toggleTools(inlineTools, blockTools, this);
Copy link
Member

Choose a reason for hiding this comment

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

передавать контекст это плохо и не надежно

@PolinaShneider PolinaShneider deleted the editor-landing-improvement branch December 19, 2018 06:31
@PolinaShneider PolinaShneider restored the editor-landing-improvement branch January 23, 2019 08:38
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.

3 participants