Skip to content

Commit

Permalink
docs: mention context menu and tree map in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredsteyer committed Oct 15, 2024
1 parent 5d7327b commit 794e9c7
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,21 @@ The Team Alignment Analysis shows whether your team structure and module/domain

A Hotspot is a complex file with that was previously changed quite often and hence comes with a higher risk for bugs.

![Hotspots](./docs/hotspots.png)
![Hotspots](./docs/hotspots-treemap.png)

For each region, Detective calculates a hotspot score which is the product of the amount of changes and the complexity. You can see it as an sort index. Please keep in mind that this score is local to your analysis and hence cannot be compared with scores resulting from other analyses.

The slider on the top left defines when a region is identified as a hotspot. For instance, 33% defines that each region having 33% or more of the maximum hotspot score is a hotspot. For a better overview, these hotspots are seperated into two equal areas: the lower half is displayed yellow and the upper half is red.

When clicking on an region, the files in this region are displayed:

![Details of a Hotspot](./docs/hotspot-details.png)

## Tree

The tree can be resized horizontally. Also, each entry has a context menu that allows to focus the current entry (making the current entry the root entry) and selecting all children:

![Focus on subfolder and select all children](./docs/context-menu.png)

## Using

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</mat-form-field>

<mat-icon
matTooltip="A Hotspot is a complex file that was previously changed quite often and hence comes with a higher risk for bugs. The calculated hotspot score is the product of the amount of changes and the complexity. You can see it as an sort index and you cannot compare it with other hotspot analyses. The slider on the left defines when a region is identified as a hotspot. For instance, 33% defines that each region having 33% or more of the maximum hotspot score is a hotspot. For a better overview, these hotspots are seperated into two equal areas: the lowever half is displayed yellow and the upper half is red."
matTooltip="A Hotspot is a complex file that was previously changed quite often and hence comes with a higher risk for bugs. The calculated hotspot score is the product of the amount of changes and the complexity. You can see it as an sort index and you cannot compare it with other hotspot analyses. The slider on the left defines when a region is identified as a hotspot. For instance, 33% defines that each region having 33% or more of the maximum hotspot score is a hotspot. For a better overview, these hotspots are seperated into two equal areas: the lower half is displayed yellow and the upper half is red."
matTooltipPosition="above"
class="help-icon-hotspot"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
<button mat-menu-item (click)="selectChildren(node)">
<mat-icon>checklist</mat-icon>
<span>Select the children</span>
<span>Select all children</span>
</button>
</mat-menu>
</mat-tree-node>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export class FilterTreeComponent implements OnInit {
?.addEventListener('mousedown', () => {
trigger.closeMenu();
});
removeFocus();
}

selectChildren(folder: Folder) {
Expand Down Expand Up @@ -199,5 +200,7 @@ export class FilterTreeComponent implements OnInit {
}

function removeFocus() {
(document.activeElement as HTMLElement).blur();
setTimeout(() => {
(document.activeElement as HTMLElement)?.blur();
});
}
Binary file added docs/context-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hotspot-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/hotspots-treemap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 794e9c7

Please sign in to comment.