Skip to content

Commit

Permalink
fix: fix review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Oct 8, 2024
1 parent 877b277 commit 895a1cb
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 18 deletions.
2 changes: 0 additions & 2 deletions lib/static/new-ui/components/Card/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
position: relative;
}

.card {}

.wrapper {
overflow: hidden;
box-shadow: rgb(255, 255, 255) 0 0 0 0, rgba(9, 9, 11, 0.05) 0 0 0 1px, rgba(0, 0, 0, 0.05) 0 1px 2px 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/static/new-ui/components/Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface CardProps {

export function Card(props: CardProps): React.ReactNode {
return <div className={styles.wrapper}>
<div className={classNames(styles.commonCard, styles.card, props.className)}>
<div className={classNames(styles.commonCard, props.className)}>
{props.children}
</div>
</div>;
Expand Down
6 changes: 3 additions & 3 deletions lib/static/new-ui/components/SuiteTitle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function SuiteTitle(props: SuiteTitlePropsInternal): ReactNode {
{item}
{index !== suitePath.length - 1 &&
<div className={styles.separator}>
<ChevronRight height={11}/>
<ChevronRight height={12}/>
<span className={styles.invisibleSpace}>&nbsp;</span>
</div>}
</div>
Expand All @@ -50,9 +50,9 @@ export function SuiteTitle(props: SuiteTitlePropsInternal): ReactNode {
</div>
<div className={styles.paginationContainer}>
<span className={styles.counter}>{props.index === -1 ? '–' : props.index + 1}/{props.totalItems}</span>
<Button view={'flat'} disabled={props.index === -1 || props.index === 0} onClick={props.onPrevious}><Icon
<Button view={'flat'} disabled={props.index <= 0} onClick={props.onPrevious}><Icon
data={ChevronUp}/></Button>
<Button view={'flat'} disabled={props.index === -1 || props.index === props.totalItems - 1} onClick={props.onNext}><Icon
<Button view={'flat'} disabled={props.index < 0 || props.index === props.totalItems - 1} onClick={props.onNext}><Icon
data={ChevronDown}/></Button>
</div>
</div>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

.card__title {
margin-bottom: 8px !important;
margin-bottom: 8px;
padding-top: 20px;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ export const getTreeViewItems = createSelector(
return null;
}

const children: TreeViewItem<TreeViewSuiteData | TreeViewBrowserData>[] = [];
let children: TreeViewItem<TreeViewSuiteData | TreeViewBrowserData>[] = [];
if (hasBrowsers(suiteData)) {
children.push(...suiteData.browserIds
children = suiteData.browserIds
.map((browserId) => formatBrowser(browsers[browserId], data))
.filter(Boolean) as TreeViewItem<TreeViewBrowserData>[]);
.filter(Boolean) as TreeViewItem<TreeViewBrowserData>[];
}
if (hasSuites(suiteData)) {
children.push(...suiteData.suiteIds
children = suiteData.suiteIds
.map((suiteId) => formatSuite(suites[suiteId], data))
.filter(Boolean) as TreeViewItem<TreeViewSuiteData | TreeViewBrowserData>[]);
.filter(Boolean) as TreeViewItem<TreeViewSuiteData | TreeViewBrowserData>[];
}

return {data, children};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
}

.card__title {
margin-bottom: 8px !important;
margin-bottom: 8px;
padding-top: 20px;
}
2 changes: 1 addition & 1 deletion lib/static/new-ui/types/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface ResultEntityCommon {
history?: TestStepCompressed[];
error?: TestError;
suitePath: string[];
/** @node Browser Name/ID, e.g. `chrome-desktop` */
/** @note Browser Name/ID, e.g. `chrome-desktop` */
name: string;
}

Expand Down
8 changes: 4 additions & 4 deletions lib/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -923,36 +923,36 @@ a:active {
}

/* Gravity UI Font Styles */
h1, h2, h3, h4, h5, h6 {
margin: 0;
}

.text-display-1 {
font-family: Jost, sans-serif;
font-weight: 500;
font-size: 24px;
line-height: 28px;
margin: 0;
}

.text-display-2 {
font-family: Jost, sans-serif;
font-weight: 500;
font-size: 18px;
line-height: 24px;
margin: 0;
}

.text-display-3 {
font-family: Jost, sans-serif;
font-weight: 500;
font-size: var(--g-text-display-3-font-size);
line-height: var(--g-text-display-3-line-height);
margin: 0;
}

.text-header-1 {
font-family: Jost, sans-serif;
font-weight: 500;
font-size: var(--g-text-header-1-font-size);
line-height: var(--g-text-header-1-line-height);
margin: 0;
}

.text-subheader-1 {
Expand Down

0 comments on commit 895a1cb

Please sign in to comment.