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-8436: Added modal helper #1320

Open
wants to merge 2 commits into
base: 4.6
Choose a base branch
from
Open

IBX-8436: Added modal helper #1320

wants to merge 2 commits into from

Conversation

dew326
Copy link
Contributor

@dew326 dew326 commented Aug 8, 2024

🎫 Issue IBX-8436

Description:

For QA:

Documentation:

@dew326 dew326 self-assigned this Aug 8, 2024
Copy link

sonarcloud bot commented Aug 8, 2024

Copy link

sonarcloud bot commented Sep 24, 2024

super(config);

this.suggestionsListNode = config.suggestionsListNode ?? this.container.querySelector('.ibexa-taggify__suggestions');
this.token = config.token ?? doc.querySelector('meta[name="CSRF-Token"]').content;
Copy link
Contributor

Choose a reason for hiding this comment

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

We have currently helpers for extracting these, so maybe it can be used here?

import { getRestInfo } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/context.helper';
...
const { siteaccess, token } = getRestInfo()

return;
}

if (this.inputNode.value.length > 3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Put 3 to some const at the begininng to remove this magic number, I guess that's min number of characters needed to perform search?

const tag = div.querySelector('.ibexa-taggify__list-tag');

this.attachEventsToTag(tag, value);

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 these empty lines are unnecessary here? (31, 33, 35)

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.

7 participants