Repository navigation
Description
Problem to Solve
The current sorting mechanism in the bundle analysis page is non-intuitive, only sorting at the highest level. Users currently lack the ability to selectively filter or segment bundle contents when conducting bundle analysis.
Related following feedback also related to ongoing discovery around improved display/filtering.
However, something that would be really useful is some way to filter or split bundles when reporting. In its simplest form an option to specify which file extensions to include/exclude would suffice.
We are using Vite for our project and import our styles into the entry JS file, however when building for deployment we split out the CSS stuff into a separate file. This removes the styles themselves from the bundle analysis, but all the other stuff such as images and fonts that were included are still there.
In the above example the described limitation affects projects where assets such as CSS, images, and fonts are split from main JavaScript files during the build process but are still included in the overall bundle analysis. This inclusion can lead to misleading reporting, as the bundle size may appear larger than it is for the scripts alone, complicating efforts to monitor and optimize specific file types effectively.
Solution
- Consider a more detailed breakdown (such as: asset by size > type by size) and improved down/search/sort(?)
- Explore filtering capabilities that allow users to specify which file extensions to include or exclude from the reports. The goal is to enable more targeted and accurate bundle size tracking and reporting, allowing users to focus on specific asset types or to separate assets into different bundles based on their extensions.
### Investigation Tasks
- [ ] https://github.com/codecov/engineering-team/issues/1799
### API Tasks
- [ ] https://github.com/codecov/engineering-team/issues/1895
- [ ] https://github.com/codecov/engineering-team/issues/1896
- [ ] https://github.com/codecov/engineering-team/issues/1897
- [ ] https://github.com/codecov/engineering-team/issues/1924
- [ ] https://github.com/codecov/engineering-team/issues/1925
- [ ] https://github.com/codecov/engineering-team/issues/1898
### UI Tasks
- [ ] https://github.com/codecov/engineering-team/issues/1893
- [ ] https://github.com/codecov/engineering-team/issues/1894
Activity
[-]ISSUE: file filtering for more accurate analysis[/-][+]DISCOVERY: file filtering for more accurate analysis[/+]codecovdesign commentedon May 6, 2024
engineering/design discovery notes/questions
user task: view bundle by grouping, per their designation in the PR report + UI repo level
review with VU
- in the scenario that a file extends across groupings - helpful to identify that
- how do we devise a system that takes into account - consider scenario where there is a duplication issue, since the sum total of the page (design consideration if multiple selection existed)
- also would be helpful to group by:
- 1) endpoint, 2) first loaded assets vs lazy loading assets
codecovdesign commentedon May 14, 2024
@katia-sentry @nicholas-codecov this issue is at the point where it's ready for investigation of:
nicholas-codecov commentedon May 14, 2024
We don't have any vis on this atm, that would require a lot more work in the plugins, plus some exploration to see if we can even do it
What do you mean by this? I personally don't understand what users would want to be grouping on? things are already grouped via asset
codecovdesign commentedon May 15, 2024
@nicholas-codecov
Yes, that is the ask for the mini-investigation for that and the other items
we're exploring the ability to group bundle related items similar to how components or flags with our coverage product. examples of use case that came up is being able to view bundle details by page in-app (user would group related page assets) OR otherwise just parts of the bundle that are helpful to user/repo to monitor (filtering out less/not important items). Here is user quote of familiar sentiment ask "would be really useful is some way to filter or split bundles when reporting". so the problem focus is around surfacing the data within the bundle that is important to user.
In terms of the other items for investigation, such as filtering options, by type (css, js, html, images) – are there questions here or is this something we could explore/investigate further? any other filtering suggestions you think could help users?\
from sync 5/22: