Support pagination when loading award emojis in work items
What does this MR do and why?
Currently, maximum 100 award emojis are loaded in work items due to default page size in the backend. Support pagination for award emojis in work items so that all the emojis get loaded.
Screenshots or screen recordings
In below recording, there are 27 emojis awarded on the work item. To showcase multiple calls to fetch award emojis, the page size is set to 5 instead of 100. Thus, the query is called 6 times in total.
Screen Recording 2023-07-06 at 7.35.09 PM.mov
How to set up and validate locally
Prerequisites:
-
Make sure GDK is running on Enterprise mode
-
Enable the following feature flag to create objects supporting this feature using
gdk rails console
:`Feature.enable(:okrs_mvc, Project.find_by_full_path('gitlab-org/gitlab-test'))`
Steps:
- Login with any user
- Go to any Project > Issues > List
- Create an new Objective under New issue split button
- Go to Objective detail page
- Check if the award emojis are loading properly
- There should be no error
To check the pagination on the local setup,
- Login with a particular user
- Go to any Project > Issues > List
- Create an new Objective under New issue split button
- Go to Objective detail page and award 20 emojis
- Set
DEFAULT_PAGE_SIZE_WORK_ITEM_AWARD_EMOJIS
to 5 in the /work_items/constants.js file - Check if the award emojis are loading properly and the query is called 4 times
- There should be no error
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #414857 (closed)