Skip to content

Commit 24df124

Browse files
authored
UI improvements (#135)
1 parent 11abe24 commit 24df124

12 files changed

Lines changed: 36 additions & 25 deletions

File tree

‎packages/oc-docs/src/components/DisabledBadge/StyledWrapper.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const StyledWrapper = styled.span`
44
display: inline-flex;
55
align-items: center;
66
flex-shrink: 0;
7-
font-size: 0.6875rem;
7+
font-size: 0.625rem;
88
font-weight: 500;
99
line-height: 1;
1010
white-space: nowrap;

‎packages/oc-docs/src/components/ExecutionContext/AssertList/StyledWrapper.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import styled from '@emotion/styled';
22

33
export const StyledWrapper = styled.div`
44
.assert-item {
5-
padding: 0.5rem 1rem;
5+
display: flex;
6+
flex-direction: column;
7+
justify-content: center;
8+
min-height: 2rem;
9+
padding: 0.345rem 1rem;
610
}
711
.assert-item:not(:first-child) {
812
border-top: 0.0625rem solid var(--oc-border-border0);
@@ -16,7 +20,7 @@ export const StyledWrapper = styled.div`
1620
flex: 1;
1721
min-width: 0;
1822
font-family: var(--font-mono);
19-
font-size: 0.78125rem;
23+
font-size: 0.75rem;
2024
color: var(--text-primary);
2125
}
2226
`;

‎packages/oc-docs/src/components/ExecutionContext/ScopeTag/StyledWrapper.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import styled from '@emotion/styled';
22

33
export const StyledWrapper = styled.span`
44
font-family: var(--font-mono);
5-
font-size: 10.5px;
5+
font-size: 0.625rem;
66
font-weight: 500;
7-
padding: 2px 8px;
7+
padding: 0.125rem 0.5rem;
88
border-radius: var(--oc-radius);
99
flex-shrink: 0;
1010

‎packages/oc-docs/src/components/ExecutionContext/ScriptChain/StyledWrapper.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ export const StyledWrapper = styled.div`
1010
grid-template-columns: min-content 0.875rem minmax(0, 1fr) auto;
1111
align-items: center;
1212
column-gap: 0.5rem;
13-
padding: 0.75rem 1rem;
13+
min-height: 2rem;
14+
padding: 0.375rem 1rem;
1415
}
1516
.step-num {
1617
justify-self: start;
1718
font-family: var(--font-mono);
18-
font-size: 0.71875rem;
19+
font-size: 0.75rem;
1920
color: var(--text-muted);
2021
}
2122
@@ -48,7 +49,7 @@ export const StyledWrapper = styled.div`
4849
@container docs (max-width: 600px) {
4950
.script-line {
5051
gap: 0.5rem;
51-
padding: 0.625rem 0.75rem;
52+
padding: 0.375rem 0.75rem;
5253
}
5354
.script-http-url {
5455
white-space: normal;

‎packages/oc-docs/src/components/ExecutionContext/TestList/StyledWrapper.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ export const StyledWrapper = styled.div`
88
display: flex;
99
align-items: center;
1010
gap: 0.75rem;
11-
padding: 0.6875rem 1rem;
11+
min-height: 2rem;
12+
padding: 0.375rem 1rem;
1213
cursor: pointer;
1314
}
1415
.test-name {
1516
min-width: 0;
1617
font-family: var(--font-mono);
17-
font-size: 12.5px;
18+
font-size: 0.75rem;
1819
color: var(--text-primary);
1920
overflow: hidden;
2021
text-overflow: ellipsis;

‎packages/oc-docs/src/components/UnsupportedRequest/UnsupportedRequest.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ export const UnsupportedRequest: React.FC<UnsupportedRequestProps> = ({
8282
{titleVariant === 'label' ? (
8383
<TitleLabel className='mt-3' testId="unsupported-request-title">{name}</TitleLabel>
8484
) : (
85-
<Heading size="md" style={{ marginTop: '0.875rem' }} testId="unsupported-request-title">
85+
<Heading size="md" style={{ marginTop: '0.25rem' }} testId="unsupported-request-title">
8686
{name}
8787
</Heading>
8888
)}
8989

90-
<RequestUrlBar className="mt-2" method={shortName} url={getRequestUrl(item)} />
90+
<RequestUrlBar className="mt-3" method={shortName} url={getRequestUrl(item)} />
9191

9292
{showRequestDocs && (
9393
<ViewMore collapsedHeight='4.5rem' testId="overview-markdown-view-more">

‎packages/oc-docs/src/pages/Folder/StyledWrapper.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ export const StyledWrapper = styled.div`
4949
5050
.folder-fullwidth {
5151
margin-top: 1.5rem;
52+
color: var(--text-muted);
5253
}
5354
`;

‎packages/oc-docs/src/pages/Request/Request.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ const RequestContent: React.FC<RequestContentProps> = ({
143143
<StyledWrapper className="request" data-testid={testId}>
144144
<Breadcrumb segments={segments} current={name} onSegmentClick={onBreadcrumbClick} testId="request-breadcrumb" />
145145

146-
<Heading size="md" style={{ marginTop: '0.875rem' }} testId="request-title">{name}</Heading>
146+
<Heading size="md" style={{ marginTop: '0.25rem' }} testId="request-title">{name}</Heading>
147147

148-
<RequestUrlBar method={method} url={url} onTry={onTryClick} style={{ marginTop: '0.9375rem' }} />
148+
<RequestUrlBar method={method} url={url} onTry={onTryClick} style={{ marginTop: '0.75rem' }} />
149149

150150
{descHtml && (
151-
<ViewMore collapsedHeight="4.5rem" style={{ marginTop: '0.9375rem' }} testId="request-description">
151+
<ViewMore collapsedHeight="4.5rem" style={{ marginTop: '1.5rem' }} testId="request-description">
152152
<div className="markdown-documentation" dangerouslySetInnerHTML={{ __html: descHtml }} />
153153
</ViewMore>
154154
)}

‎packages/oc-docs/src/runner/utils/tree-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { OpenCollection } from '@opencollection/types';
22
import type { HttpRequest } from '@opencollection/types/requests/http';
33
import type { Item, Folder } from '@opencollection/types/collection/item';
4-
import { getItemType, getItemName, getHttpMethod, getRequestUrl, isFolder, isHttpRequest } from '../../utils/schemaHelpers';
4+
import { getItemName, getHttpMethod, getRequestUrl, isFolder, isHttpRequest } from '../../utils/schemaHelpers';
55

66
/**
77
* Find the path from collection root to a specific item

‎packages/oc-docs/src/ui/MinimalComponents.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const MinimalDataTable: React.FC<MinimalDataTableProps> = ({
1818
data,
1919
title,
2020
columns,
21-
compact = true
2221
}) => {
2322
if (!data || data.length === 0) return null;
2423

0 commit comments

Comments
 (0)