Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[editor] JSON Renderer for Model Settings #757

Merged
merged 1 commit into from
Jan 5, 2024
Merged

[editor] JSON Renderer for Model Settings #757

merged 1 commit into from
Jan 5, 2024

Conversation

rholinshead
Copy link
Contributor

@rholinshead rholinshead commented Jan 4, 2024

[editor] JSON Renderer for Model Settings

Set up the JSON Editor for model settings, allowing toggling between the schema-backed UI if the schema is available or defaulting to the JSON editor if no schema is available.

No Schema, JSONEditor Only:

Screenshot 2024-01-04 at 4 46 29 PM

With Schema, Toggle Between:

Screen.Recording.2024-01-04.at.4.50.30.PM.mov

{schema && (
<Flex justify="flex-end">
<Tooltip label="Toggle JSON editor" withArrow>
<ActionIcon onClick={() => setIsRawJSON((curr) => !curr)}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toggle boi!

onChange={(val) =>
onUpdateModelSettings(val as Record<string, unknown>)
}
// schema={schema} TODO: Add schema after fixing z-index issue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's z-index issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-01-05 at 10 48 37 AM

The editor tooltips have lower z-index than the surrounding elements so they're hidden. Just need to look into it and bump it

Copy link
Contributor

@rossdanlm rossdanlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I think this looks good

@rholinshead rholinshead merged commit fd8c5c9 into main Jan 5, 2024
3 checks passed
rholinshead added a commit that referenced this pull request Jan 5, 2024
)

# [editor][easy] Remove Unused ModelSettingsConfigRenderer Component

Component unused (as of
#757) and can be removed.

## Testing:
- loaded the editor settings without issue
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.

2 participants