Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Content list owner filter #15470
Content list owner filter #15470
Changes from 6 commits
ef263cb
adb12a1
915b061
d337160
251022c
a70eaa6
2c725c6
26c53d2
ce55fc2
abf19c4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We may need to cache this for optimization otherwise we'll significantly increase the server load.
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 had the same thought. It at least isn't page blocking with it loading after page render. I was thinking it would be fine if it would only start loading users when the select dropdown is shown, but bootstrap-select does not make that easy. Thoughts?
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.
@douwinga we agree on your suggestion to only load the list on the first drop down, and maybe less than 50, probably something close to what the drop down can fit by default.
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.
If "Owner" is indexed, you may also not have to load all users, but just the distinct values of this field.
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.
@douwinga a better idea Sebestien mentioned was to not load any users by default. If the user clicks on the filter menu, then make an AJAX request that would fetch the first 50 users as you are doing today. This way you don't need to cache anything and also you don't need to render anything on every single request.
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.
@MikeAlhayek ya, I am just struggling to implement that with bootstrap-select
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.
let me know what you think. I made it load the data on first dropdown toggle. It is gross, but I am not sure how else to do it. bootstrap-select needs help, but I want to use it for this so that it is consistent with all the other filter dropdowns,