Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion src/components/JsonSchemaViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const JsonSchemaViewerComponent: React.FC<JsonSchemaProps & ErrorBoundaryForward
<ChildStack
childNodes={jsonSchemaTreeRoot.children}
currentNestingLevel={-1}
className={cn(className, 'JsonSchemaViewer')}
className={cn(className, 'JsonSchemaViewer', 'sl-mr-5')}
/>
</JSVOptionsContextProvider>
</MosaicProvider>
Expand Down
9 changes: 5 additions & 4 deletions src/components/SchemaRow/SchemaRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ export const SchemaRow: React.FunctionComponent<SchemaRowProps> = ({ schemaNode,
...(!isBrokenRef && nestingLevel === 0
? {
position: 'relative',
left: -1 * SCHEMA_ROW_OFFSET,
}
: {
left: CARET_ICON_BOX_DIMENSION * -1 + SCHEMA_ROW_OFFSET / -2,
left: CARET_ICON_BOX_DIMENSION * -1 - SCHEMA_ROW_OFFSET,
}),
}}
size={CARET_ICON_SIZE}
/>
) : null}

<div className="sl-flex sl-items-center sl-text-base sl-flex-1 sl-truncate">
<div className="sl-flex sl-items-center sl-text-base sl-flex-1">
{schemaNode.subpath.length > 0 && shouldShowPropertyName(schemaNode) && (
<div className="sl-mr-2 sl-font-mono sl-font-bold">{last(schemaNode.subpath)}</div>
)}
Expand All @@ -110,7 +111,7 @@ export const SchemaRow: React.FunctionComponent<SchemaRowProps> = ({ schemaNode,
) : null}

{schemaNode.subpath.length > 1 && schemaNode.subpath[0] === 'patternProperties' ? (
<div className="sl-ml-2 sl-truncate sl-text-muted">(pattern property)</div>
<div className="sl-ml-2 sl-text-muted">(pattern property)</div>
) : null}
{choices.length > 1 && (
<Select
Expand All @@ -136,7 +137,7 @@ export const SchemaRow: React.FunctionComponent<SchemaRowProps> = ({ schemaNode,
</div>

{typeof description === 'string' && description.length > 0 && (
<div className="sl-flex sl-flex-1 sl-my-2 sl-py-px sl-truncate">
<div className="sl-flex sl-flex-1 sl-my-2 sl-py-px">
<Description value={description} />
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/Description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

export const Description: React.FunctionComponent<{ value: string }> = ({ value }) => (
// TODO (JJ): Add mosaic popover showing full description in MarkdownViewer
<div className="sl-truncate sl-w-full sl-text-muted" title={value}>
<div className="sl-w-full sl-text-muted" title={value}>
{value}
</div>
);