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
160 changes: 80 additions & 80 deletions src/__tests__/__snapshots__/index.spec.tsx.snap

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions src/__tests__/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>array of objects</span></div>
</div>
</div>
Expand All @@ -268,7 +268,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>array of objects</span></div>
</div>
</div>
Expand All @@ -281,7 +281,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; left: -23.5px\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; left: -27px\\" role=\\"button\\"></div>
<div>
<div>foo</div>
<span>array of objects</span>
Expand Down Expand Up @@ -311,7 +311,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>array of objects</span></div>
</div>
</div>
Expand All @@ -324,7 +324,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; left: -23.5px\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; left: -27px\\" role=\\"button\\"></div>
<div>
<div>foo</div>
<span>array of objects</span>
Expand All @@ -340,7 +340,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; left: -23.5px\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; left: -27px\\" role=\\"button\\"></div>
<div>
<div>bar</div>
<span>object</span>
Expand Down Expand Up @@ -406,7 +406,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>array of objects</span></div>
</div>
</div>
Expand All @@ -431,7 +431,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>array of objects</span></div>
</div>
</div>
Expand Down Expand Up @@ -460,7 +460,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; left: -23.5px\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; left: -27px\\" role=\\"button\\"></div>
<div>
<div>foo</div>
<span>array of objects</span>
Expand Down Expand Up @@ -490,7 +490,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>array of objects</span></div>
</div>
</div>
Expand Down Expand Up @@ -519,7 +519,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; left: -23.5px\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; left: -27px\\" role=\\"button\\"></div>
<div>
<div>foo</div>
<span>array of objects</span>
Expand Down Expand Up @@ -629,7 +629,7 @@ describe('Expanded depth', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; position: relative\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; position: relative; left: -7px\\" role=\\"button\\"></div>
<div><span>object</span></div>
</div>
</div>
Expand Down Expand Up @@ -712,7 +712,7 @@ describe('$ref resolving', () => {
<div>
<div>
<div>
<div style=\\"width: 20px; height: 20px; left: -23.5px\\" role=\\"button\\"></div>
<div style=\\"width: 20px; height: 20px; left: -27px\\" role=\\"button\\"></div>
<div><span>$ref(#/foo)[]</span></div>
</div>
</div>
Expand Down
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>
);
Loading