Code Hotspots - MVC/V1
Given issues identified with the performance and data structure, let's pare down/change the MVC of Code Hotspots further, so that we can release in 12.4.
- Have the tree-map, created by @blabuschagne based on https://echarts.apache.org/examples/en/editor.html?c=treemap-drill-down only with 1 level of data, i.e. files. We won't be using the drill-down functionality, yet since we will only send
files
, which is 1 level of hierarchy to the front-end. The reason we are making this decision is because:
- We cannot surface more than 500 files for FE without degrading performance. Currently e-charts needs all files at once, i.e. there are no separate calls we can make on each drill-down
- We cannot calculate the colors of folder based on 500 files, since this can give misleading information. For example, folder1 can have 500 worse codehotposts than folder 2, but folder 1 doesn't have any of the top 500 files, so it appears as no code hotspot folder.
-
No date picker, this is scheduled for 12.5 - #14971 (closed)
-
Specs:
- The size of each square is the byte size of the file
- The color is the number of commits during a 30 day period, the more the commits, the more red a rectangle is. We will assume the minimum number of commits is 0, so the tree-map will be mostly red
-
We will not have a 30-day rolling period, but rather cumulative aggregation of commits until we release the date picker in 12.5. This means, we start with 0 data on deployment and each day, there will be more data - not going to be useful to customers for at least a couple of weeks.
-
We will add a new param to the endpoint, so the client can choose how many files to return with a max set in the backend (agreed that this is 100 as default, but can be changed). @blabuschagne, how did you actually imagine this given we don't have a spec?
-
Users will see a tooltip on hover containing Number of commits and the full file name, which they can click on to get to the file they are interested in
-
Permissions stay as per agreement in the product issue, quoted above
-
Feature flag stays as per agreement in the product issue, quoted above
Note: We reached some of these conclusions on a recorded call just prior to this issue being created.