Skip to content

SED-4893 improve execution report tab-layout - #1444

Open
neogucky wants to merge 6 commits into
masterfrom
SED-4893-improve-execution-report-tab-layout
Open

SED-4893 improve execution report tab-layout#1444
neogucky wants to merge 6 commits into
masterfrom
SED-4893-improve-execution-report-tab-layout

Conversation

@neogucky

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces various layout and styling improvements across the dashboard, tabs, and execution progress components, including the addition of visual tab dividers and refined spacing. The review feedback suggests merging duplicate SCSS blocks for better maintainability, replacing an 8-digit hex color with a more readable rgba() function, and refactoring duplicated tab-divider rendering logic in the HTML template.

Comment on lines +50 to 76
.mat-mdc-tab-links {
min-width: 100%;
width: max-content;
overflow: visible;
}

.mat-mdc-tab-links {
align-items: flex-end;
margin-left: 0;

> .tab-divider {
display: block;
flex: 0 0 0.2rem;
align-self: center;
height: 1.6rem;
margin-inline: -0.1rem;
background-color: var.$gray-300;
pointer-events: none;
}

> a.mdc-tab--active + .tab-divider,
> .tab-divider:has(+ a.mdc-tab--active),
> a:hover + .tab-divider,
> .tab-divider:has(+ a:hover) {
display: none;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For improved readability and maintainability, you can merge the two separate .mat-mdc-tab-links style blocks into a single one.

    .mat-mdc-tab-links {
      min-width: 100%;
      width: max-content;
      overflow: visible;
      align-items: flex-end;
      margin-left: 0;

      > .tab-divider {
        display: block;
        flex: 0 0 0.2rem;
        align-self: center;
        height: 1.6rem;
        margin-inline: -0.1rem;
        background-color: var.$gray-300;
        pointer-events: none;
      }

      > a.mdc-tab--active + .tab-divider,
      > .tab-divider:has(+ a.mdc-tab--active),
      > a:hover + .tab-divider,
      > .tab-divider:has(+ a:hover) {
        display: none;
      }
    }

}

&:not(.mdc-tab--active):hover {
background-color: #293e5014;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The hardcoded background color #293e5014 uses an 8-digit hex notation which can be less readable and maintainable. Consider using the rgba() function for better clarity, especially since this notation is not as widely supported or understood.

Suggested change
background-color: #293e5014;
background-color: rgba(41, 62, 80, 0.08);

Comment on lines +3 to +6
@for (tab of tabs(); track tab.id; let isFirst = $first) {
@if (!isFirst) {
<span class="tab-divider" aria-hidden="true"></span>
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The logic for adding a .tab-divider is duplicated in both branches of the @if (userRouteLinks()) condition (here and in the @else block starting on line 21). This code duplication can make maintenance harder and more error-prone. Consider refactoring to a single @for loop to avoid repeating the tab and divider rendering logic.

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.

1 participant