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

Optional dropdownLimit property at a level of singular feed. #13512

Merged

Conversation

pszczesniak
Copy link
Contributor

Suggested merge commit message (convention)

Feature (mention): Should be possible to limit the dropdown on singular feed level. Closes #13504 .


Additional information

For example – encountered issues, assumptions you had to make, other affected tickets, etc.

packages/ckeditor5-mention/_src/mention.js Outdated Show resolved Hide resolved
packages/ckeditor5-mention/_src/mention.js Show resolved Hide resolved
packages/ckeditor5-mention/src/mentionconfig.ts Outdated Show resolved Hide resolved
@@ -239,7 +241,7 @@ export default class MentionUI extends Plugin {
const { item, marker } = data;

// Set to 10 by default for backwards compatibility. See: #10479
const dropdownLimit = this.editor.config.get( 'mention.dropdownLimit' ) || 10;
const dropdownLimit = data.dropdownLimit || this.editor.config.get( 'mention.dropdownLimit' ) || 10;
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 we don't need to pass the dropdownLimit all over the place. It would be much simpler (and would affect less code) if you would resolve the limit depending on the marker here. You could normalize the config to store limits for specific markers and just access this map here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

c2b3c7b

I have extend the _mentionsConfigurations to pass there the dropdownLimit . I think thatthis is the right way 🙂

@niegowski niegowski merged commit 489b3fd into master Feb 23, 2023
@niegowski niegowski deleted the ck/13504-add-dropdownlimit-at-a-level-of-singular-feed branch February 23, 2023 11:27
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.

Add dropdownLimit at a level of singular feed
2 participants