Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const StyledWrapper = styled.span`
display: inline-flex;
align-items: center;
flex-shrink: 0;
font-size: 0.6875rem;
font-size: 0.625rem;
font-weight: 500;
line-height: 1;
white-space: nowrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import styled from '@emotion/styled';

export const StyledWrapper = styled.div`
.assert-item {
padding: 0.5rem 1rem;
display: flex;
flex-direction: column;
justify-content: center;
min-height: 2rem;
padding: 0.345rem 1rem;
}
.assert-item:not(:first-child) {
border-top: 0.0625rem solid var(--oc-border-border0);
Expand All @@ -16,7 +20,7 @@ export const StyledWrapper = styled.div`
flex: 1;
min-width: 0;
font-family: var(--font-mono);
font-size: 0.78125rem;
font-size: 0.75rem;
color: var(--text-primary);
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import styled from '@emotion/styled';

export const StyledWrapper = styled.span`
font-family: var(--font-mono);
font-size: 10.5px;
font-size: 0.625rem;
font-weight: 500;
padding: 2px 8px;
padding: 0.125rem 0.5rem;
border-radius: var(--oc-radius);
flex-shrink: 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ export const StyledWrapper = styled.div`
grid-template-columns: min-content 0.875rem minmax(0, 1fr) auto;
align-items: center;
column-gap: 0.5rem;
padding: 0.75rem 1rem;
min-height: 2rem;
padding: 0.375rem 1rem;
}
.step-num {
justify-self: start;
font-family: var(--font-mono);
font-size: 0.71875rem;
font-size: 0.75rem;
color: var(--text-muted);
}

Expand Down Expand Up @@ -48,7 +49,7 @@ export const StyledWrapper = styled.div`
@container docs (max-width: 600px) {
.script-line {
gap: 0.5rem;
padding: 0.625rem 0.75rem;
padding: 0.375rem 0.75rem;
}
.script-http-url {
white-space: normal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ export const StyledWrapper = styled.div`
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.6875rem 1rem;
min-height: 2rem;
padding: 0.375rem 1rem;
cursor: pointer;
}
.test-name {
min-width: 0;
font-family: var(--font-mono);
font-size: 12.5px;
font-size: 0.75rem;
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export const UnsupportedRequest: React.FC<UnsupportedRequestProps> = ({
{titleVariant === 'label' ? (
<TitleLabel className='mt-3' testId="unsupported-request-title">{name}</TitleLabel>
) : (
<Heading size="md" style={{ marginTop: '0.875rem' }} testId="unsupported-request-title">
<Heading size="md" style={{ marginTop: '0.25rem' }} testId="unsupported-request-title">
{name}
</Heading>
)}

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

{showRequestDocs && (
<ViewMore collapsedHeight='4.5rem' testId="overview-markdown-view-more">
Expand Down
1 change: 1 addition & 0 deletions packages/oc-docs/src/pages/Folder/StyledWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ export const StyledWrapper = styled.div`

.folder-fullwidth {
margin-top: 1.5rem;
color: var(--text-muted);
}
`;
6 changes: 3 additions & 3 deletions packages/oc-docs/src/pages/Request/Request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ const RequestContent: React.FC<RequestContentProps> = ({
<StyledWrapper className="request" data-testid={testId}>
<Breadcrumb segments={segments} current={name} onSegmentClick={onBreadcrumbClick} testId="request-breadcrumb" />

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

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

{descHtml && (
<ViewMore collapsedHeight="4.5rem" style={{ marginTop: '0.9375rem' }} testId="request-description">
<ViewMore collapsedHeight="4.5rem" style={{ marginTop: '1.5rem' }} testId="request-description">
<div className="markdown-documentation" dangerouslySetInnerHTML={{ __html: descHtml }} />
</ViewMore>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/oc-docs/src/runner/utils/tree-utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { OpenCollection } from '@opencollection/types';
import type { HttpRequest } from '@opencollection/types/requests/http';
import type { Item, Folder } from '@opencollection/types/collection/item';
import { getItemType, getItemName, getHttpMethod, getRequestUrl, isFolder, isHttpRequest } from '../../utils/schemaHelpers';
import { getItemName, getHttpMethod, getRequestUrl, isFolder, isHttpRequest } from '../../utils/schemaHelpers';

/**
* Find the path from collection root to a specific item
Expand Down
1 change: 0 additions & 1 deletion packages/oc-docs/src/ui/MinimalComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const MinimalDataTable: React.FC<MinimalDataTableProps> = ({
data,
title,
columns,
compact = true
}) => {
if (!data || data.length === 0) return null;

Expand Down
10 changes: 7 additions & 3 deletions packages/oc-docs/src/ui/Table/StyledWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ export const StyledWrapper = styled.div`
.table-empty-message {
margin: 0;
font-family: var(--font-sans);
font-weight: 500;
font-style: italic;
font-size: 0.8125rem;
font-weight: 400;
font-size: var(--oc-font-size-base);
line-height: 1;
letter-spacing: 0;
color: var(--text-secondary);
}

&:has(> .table-empty-message) {
border: none;
}

.table {
width: 100%;
border-collapse: collapse;
Expand Down
11 changes: 6 additions & 5 deletions packages/oc-docs/src/utils/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import type { PropertyRow } from '../components/PropertyTable/PropertyTable';
import type { Auth } from '@opencollection/types/common/auth';
import type { Scripts } from '@opencollection/types/common/scripts';
import type { Variable, SecretVariable, VariableValue, VariableValueType } from '@opencollection/types/common/variables';
import type { Action, ActionSetVariable } from '@opencollection/types/common/actions';
import type { Action, ActionSetVariable, ActionVariableScope } from '@opencollection/types/common/actions';
import type { Description } from '@opencollection/types/common/description';
import {
getRequestAuth,
getItemName,
Expand Down Expand Up @@ -412,16 +413,16 @@ export interface PostResponseVar {
name?: string;
expr?: string;
disabled?: boolean;
scope?: string;
description?: unknown;
scope?: ActionVariableScope;
description?: Description;
}

export interface PostResponseRowInput {
name?: string;
value?: string;
enabled?: boolean;
scope?: string;
description?: unknown;
scope?: ActionVariableScope;
description?: Description;
}

// Shared row-builders. Request items keep vars/actions under `runtime`; collection
Expand Down
Loading