Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static-html: Re-design the project table(s) #8640

Merged
merged 4 commits into from May 15, 2024

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented May 10, 2024

The issue summary tables have been improved recently by [1], to show exactly one issue per row and to adhere to the excluded state. This change now improves the issues view in the project tables in several ways which also improves consistency in terms of the issue views with the summary tables.

Please see the individual commits for the details and the screenshots below.

[1] #8593

Part of: #7921.

Before

  • excluded project:
    Screenshot from 2024-05-13 09-51-10
  • included project:
    Screenshot from 2024-05-13 09-51-36

After

  • excluded project:
    Screenshot from 2024-05-13 09-54-00
  • included project:
    Screenshot from 2024-05-13 09-54-17

@fviernau fviernau requested a review from a team as a code owner May 10, 2024 15:05
@fviernau fviernau marked this pull request as draft May 10, 2024 15:05
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.92%. Comparing base (ddd4497) to head (ca0a010).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #8640   +/-   ##
=========================================
  Coverage     67.92%   67.92%           
  Complexity     1005     1005           
=========================================
  Files           244      244           
  Lines          7772     7772           
  Branches        876      876           
=========================================
  Hits           5279     5279           
  Misses         2110     2110           
  Partials        383      383           
Flag Coverage Δ
funTest-docker 66.04% <ø> (ø)
test 37.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fviernau fviernau force-pushed the static-html-project-table-redesign branch 4 times, most recently from 76a9d8c to 3536b79 Compare May 15, 2024 14:35
@fviernau fviernau marked this pull request as ready for review May 15, 2024 14:35
@@ -445,14 +445,17 @@ class StaticHtmlReporter : Reporter {
}

tbody {
table.rows.forEachIndexed { rowIndex, row ->
projectRow(table.id.toCoordinates(), rowIndex + 1, row)
for (i in 0..<table.rows.size) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be simplified to repeat(table.rows.size) { index ->.

@@ -389,83 +389,79 @@ class StaticHtmlReporter : Reporter {
private fun DIV.projectTable(table: ProjectTable) {
val excludedClass = "excluded".takeIf { table.isExcluded() }.orEmpty()

h2 {
div("project $excludedClass") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message:

  • "One dedicated column for each, open and resolved / excluded issues." -> "One dedicated column for each open, resolved, and excluded issues."
  • Typo in "vizually" -> "visually".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there's a typo in "resolvedm,".

Copy link
Member Author

@fviernau fviernau May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, sorry.

This removes the need to pass the project ID separately, and also
simplifies an upcoming change.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Improve the readability in the caller. While at it, simplify the caller
a bit.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
Improve the readability in the caller. While at it, simplify the caller
a bit.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau force-pushed the static-html-project-table-redesign branch from 3536b79 to 127ba64 Compare May 15, 2024 15:29
@fviernau fviernau requested a review from sschuberth May 15, 2024 15:29
Previously, the project table view had the following aspects which
are changed in this commit:

1. One dedicated column for each, analyzer and scanner issues.
2. The color and background color of each row is derived from the
   worst severity issue contained in that row. For example,
   if a row contains a hint and an error, the entire row shows in red,
   which is the color associated with an error.
3. If the entire project is excluded, the view looks the same, except
   for the opacity which is reduced a bit.

This is changed as follows:

1. One dedicated column for each open, resolved, and excluded issues.
2. The issue view is limited to just the issue columns, whereas each
   issue is shown in a color indicating its severity or state. The
   colors are gray (excluded), green (resolved), red (error), yellow
   (warning) and blue (hint). So, the state of an issue no more affects
   the color of the entire row.
3. If the entire project is excluded, the opacity is still used to
   indicate that. However, the opacity of the issue columns is not
   affected anymore, because this looks nicer and the issues now
   properly indicate their exclusion anyway.
4. In order to visually establish a border between the issues, the view
   of the issue is changed to a card-view.

Note: It is now possile to quickly grasp the open issues for each
project in order of the severity, due to the use of the dedicated
column for open issues. Furthermore, it is easy to add the ability
of showing also the advisor issues (in an upcoming change) without
the need to add another (advisor issues) column.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
@fviernau fviernau force-pushed the static-html-project-table-redesign branch from 127ba64 to ca0a010 Compare May 15, 2024 17:30
@fviernau fviernau enabled auto-merge (rebase) May 15, 2024 17:30
@fviernau fviernau merged commit 71f1eb8 into main May 15, 2024
20 checks passed
@fviernau fviernau deleted the static-html-project-table-redesign branch May 15, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants