Skip to content

Conversation

@BelfordZ
Copy link
Contributor

@BelfordZ BelfordZ commented May 23, 2023

Motivation and Context

fixes #221

Description

This pr will render a SchemaRow when you've chosen a combiner subschema that is a simple type

How Has This Been Tested?

Manually via storybook

Screenshot(s)/recordings(s)

Before:
image

After:
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

@marbemac
Copy link
Contributor

Ditto my comment in #224 - @P0lip @mnaumanali94 any chance ya'll could take a look at this in the near future? Thank you!

@P0lip
Copy link
Contributor

P0lip commented May 25, 2023

commit 55087a54f70fc1f7b599712495cccfae76bb0f26
Author: Jakub Rożek <jakub@stoplight.io>
Date:   Thu May 25 16:42:26 2023 +0200

    style: prettier

diff --git a/src/components/SchemaRow/TopLevelSchemaRow.tsx b/src/components/SchemaRow/TopLevelSchemaRow.tsx
index 2f18da6..7a58eba 100644
--- a/src/components/SchemaRow/TopLevelSchemaRow.tsx
+++ b/src/components/SchemaRow/TopLevelSchemaRow.tsx
@@ -88,11 +88,9 @@ export const TopLevelSchemaRow = ({
             currentNestingLevel={nestingLevel}
             parentNodeId={nodeId}
           />
-        ) : combiner ? <SchemaRow
-                         schemaNode={selectedChoice.type}
-                         nestingLevel={nestingLevel} /> : null
-
-        }
+        ) : combiner ? (
+          <SchemaRow schemaNode={selectedChoice.type} nestingLevel={nestingLevel} />
+        ) : null}
       </>
     );
   }

could you apply the following change? This is for prettier to pass.

Alternatively, I can push it myself if you allow pushes from maintainers.

@BelfordZ
Copy link
Contributor Author

updated! thanks for taking a look @P0lip & @marbemac !

@P0lip P0lip merged commit a375845 into stoplightio:master May 30, 2023
P0lip pushed a commit that referenced this pull request May 30, 2023
…222)

* fix: combiners with differing types render nothing for some children

* fix: prettier updates
P0lip pushed a commit that referenced this pull request May 30, 2023
…222)

* fix: combiners with differing types render nothing for some children

* fix: prettier updates
@BelfordZ
Copy link
Contributor Author

Thank you <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

using oneOf object or boolean doesn't render the boolean

3 participants