Defers loading of package assets on package details page
What does this MR do and why?
- Defers loading of package assets on package details page
- Move major parts of
packageFilesGraphQL query from package details query to its own separate query. - Add apollo options to
package_files.vueand move pagination methods fromdetails.vue. - Define apollo merge policy so that cache can be updated.
- Shows alert when query fails. UX
- Adds loading functionality to package files table UX
- Update tests.
MR to address Only the first 100 files are shown when browsin... (#353820 - closed) & add pagination is planned next.
Screenshots or screen recordings
with loading
Screen_Recording_2023-05-16_at_4.27.44_pm
How to set up and validate locally
- Use the following command
for i in $(seq 1 125); do curl --header "PRIVATE-TOKEN: <TOKEN>" --upload-file $PWD/<filename> "http://172.16.123.1:3000/api/v4/projects/<project-id>/packages/generic/<package-name>/<version>/<filename>$i"; doneto upload 125 package files.- Replace token, project-id, package-name, version, filename
- Visit package registry detail page via groups & projects package list page.
- Confirm the package assets are visible.
- Confirm loading screen is visible when the assets are loading/network connection is slow.
- Confirm features delete assets, bulk deletion of assets work as expected.
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.
Closes #365232 (closed)
Edited by Rahul Chanila
