DependencyTrack / DependencyTrack/frontend
Project view should not preload all tabs
- Dominant language
- Vue
- Stars
- 171
- Forks
- 250
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 82
Description
### Current Behavior
When opening a project, all tables in all tabs are auto-loaded directly, causing some delay in the UI and unnecessary load on the server.
The loaded data is used to also populate the number on the tab-badge, so just making tabs lazy will have side effects.
### Proposed Behavior
Tabs should be loaded only when being opened.
This could be done by applying the lazy attribute, to the tab, but that has 2 drawbacks:
1. The badge with number on the tab name will not be populated, as it relies on the data loaded in the tab
2. whenever you switch between tabs, the old tab content gets discarded, causing multiple loads again which would not be necessary
Possible solution to both problems:
1. Check if the data required for tab-badge-numbers is available e.g. in the project object, or if it could be loaded in a single additional call e.g. loading a metrics object
2. Instead using the lazy attribute, do a lazy initialize of the table server loading, triggering the first load when the tab gets activated.
### Checklist
- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/frontend/issues) for whether this enhancement was already requested
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.