Skip to content

Commit

Permalink
refactor: remove unnecessary styles
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Aug 16, 2024
1 parent 92c06cf commit 77156c9
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,83 +4,3 @@
height: 28px;
margin-top: var(--g-spacing-2);
}

.tree-view {
margin-top: var(--g-spacing-2);
}
.tree-view__container {
height: 100%;
width: 100%;
overflow-y: auto;
contain: strict;
}

.tree-view__total-size-wrapper {
width: 100%;
position: relative;
}

.tree-view__visible-window {
position: absolute;
top: 0;
left: 0;
width: 100%;
}

.tree-view__item {
--g-text-subheader-1-font-size: 18px;
--g-text-subheader-1-line-height: 22px;
--g-text-subheader-font-weight: normal;

--g-text-body-1-font-size: 18px;
--g-text-body-1-line-height: 22px;
--g-text-body-font-weight: normal;

padding: 4px 0;
font-size: 18px;

user-select: none;
}

.tree-view__item svg {
flex-shrink: 0;
}

.tree-view__item > div > div {
align-items: start !important;
}

.tree-item--current {
background: #a28aff !important;
color: #fff;
}

.tree-item--current:hover {
background: #af9aff !important;
}

.tree-item--current svg {
color: #fff;
}

.tree-item--browser {
padding-left: 8px;
}

.tree-item--error {
background: var(--g-color-private-red-100);
color: var(--g-color-private-red-600-solid);
}

.tree-item--error:hover {
background: var(--g-color-private-red-50) !important;
}

.tree-item--error svg {
color: var(--g-color-private-red-600-solid);
}


.tree-view :global(.g-text_ellipsis) {
white-space: normal;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.tree-view {
margin-top: var(--g-spacing-2);
}

.tree-view :global(.g-text_ellipsis) {
white-space: normal;
}

.tree-view__container {
height: 100%;
width: 100%;
overflow-y: auto;
contain: strict;
}

.tree-view__total-size-wrapper {
width: 100%;
position: relative;
}

.tree-view__visible-window {
position: absolute;
top: 0;
left: 0;
width: 100%;
}

.tree-view__item {
--g-text-subheader-1-font-size: 18px;
--g-text-subheader-1-line-height: 22px;
--g-text-subheader-font-weight: normal;

--g-text-body-1-font-size: 18px;
--g-text-body-1-line-height: 22px;
--g-text-body-font-weight: normal;

padding: 4px 0;
font-size: 18px;

user-select: none;
}

.tree-view__item svg {
flex-shrink: 0;
}

.tree-view__item > div > div {
align-items: start !important;
}

.tree-view__item--current {
background: #a28aff !important;
color: #fff;
}

.tree-view__item--current:hover {
background: #af9aff !important;
}

.tree-view__item--current svg {
color: #fff;
}

.tree-view__item--browser {
padding-left: 8px;
}

.tree-view__item--error {
background: var(--g-color-private-red-100);
color: var(--g-color-private-red-600-solid);
}

.tree-view__item--error:hover {
background: var(--g-color-private-red-50) !important;
}


.tree-view__item--error svg {
color: var(--g-color-private-red-600-solid);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {useNavigate, useParams} from 'react-router-dom';
import {bindActionCreators} from 'redux';

import * as actions from '@/static/modules/actions';
import styles from '@/static/new-ui/features/suites/components/SuitesPage/index.module.css';
import {
TreeViewBrowserData,
TreeViewItem,
Expand All @@ -26,6 +25,7 @@ import {
getTreeViewExpandedById,
getTreeViewItems
} from '@/static/new-ui/features/suites/components/SuitesTreeView/selectors';
import styles from './index.module.css';

interface SuitesTreeViewProps {
treeViewItems: TreeViewItem<TreeViewSuiteData | TreeViewBrowserData>[];
Expand Down Expand Up @@ -109,12 +109,12 @@ function SuitesTreeViewInternal(props: SuitesTreeViewProps): ReactNode {
const item = list.structure.itemsById[virtualRow.key];
const classes = [styles['tree-view__item']];
if (item.fullTitle === props.currentSuiteId) {
classes.push(styles['tree-item--current']);
classes.push(styles['tree-view__item--current']);
} else if ((item.status === 'fail' || item.status === 'error') && item.type === TreeViewItemType.Browser) {
classes.push(styles['tree-item--error']);
classes.push(styles['tree-view__item--error']);
}
if (item.type === TreeViewItemType.Browser) {
classes.push(styles['tree-item--browser']);
classes.push(styles['tree-view__item--browser']);
}

return <Box
Expand Down
41 changes: 0 additions & 41 deletions lib/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1056,47 +1056,6 @@ a:active {
line-height: var(--g-text-subheader-3-line-height);
}

.controls {
display: flex;
flex-direction: column;
margin: var(--g-spacing-2);
}
.controls-row {
align-items: center;
display: flex;
height: 28px;
margin-top: var(--g-spacing-2);
}
.controls-row:first-child {
margin-top: 0;
}

.controls-row__heading {
margin-right: auto;
}

.controls-row > * {
margin-left: var(--g-spacing-2);
}

.controls-row > *:first-child {
margin-left: 0;
}

.status-switcher__option {
align-items: center;
display: flex;
justify-content: center;
}

.status-switcher__option > *:first-child {
margin-right: 2px;
}

.g-radio-button__option-text {
margin: 0 4px !important;
}

.icon-fail {
color: var(--g-color-private-red-600-solid);
}
Expand Down

0 comments on commit 77156c9

Please sign in to comment.