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

feat: advanced playground UI tweaks #4136

Merged
merged 2 commits into from
Jul 4, 2023
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Jul 4, 2023

About the changes

Final overview with the adjusted spacing and multi select fields
Screenshot 2023-07-04 at 11 21 32

Detailed adjustments below

Left align results table and the form:
Screenshot 2023-07-04 at 11 00 44

Allow 3 pills and then +1/n indicator
Screenshot 2023-07-04 at 11 00 28

Align environments and context fields length
Screenshot 2023-07-04 at 10 59 49

Placeholder for multiple values
Screenshot 2023-07-04 at 10 59 41

Persistent multi selection for projects
Screenshot 2023-07-04 at 10 59 32

Persistent multi selection for environments
Screenshot 2023-07-04 at 10 59 25

Old playground is still usable but we optimize UI for the new playground
Screenshot 2023-07-04 at 11 08 17

Discussion points

@vercel
Copy link

vercel bot commented Jul 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2023 9:34am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2023 9:34am

@@ -260,7 +258,7 @@ export const AdvancedPlayground: VFC<{
sx={theme => ({
width: resultsWidth,
transition: 'width 0.4s ease',
padding: theme.spacing(4, 2),
padding: theme.spacing(4, 4),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

align results table spacing with the form

@@ -196,10 +196,11 @@ export const PlaygroundCodeFieldset: VFC<IPlaygroundCodeFieldsetProps> = ({
onChange={changeContextValue}
options={options}
multiple={isAdvancedPlayground}
sx={{ width: 200, maxWidth: '100%' }}
sx={{ width: 370, maxWidth: '100%' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

align context fields length with environments

sx={{ width: 200, maxWidth: '100%' }}
sx={{ width: 370, maxWidth: '100%' }}
placeholder={
isAdvancedPlayground ? 'value1,value2,value3' : 'value1'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new placeholder hints nudging to use multiple values

<Typography
variant="body2"
color={theme.palette.text.secondary}
color={theme.palette.text.primary}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

since 1,2,3 guidance indicators disappeared we make the text darker

@@ -114,7 +114,7 @@ export const PlaygroundEditor: VFC<IPlaygroundEditorProps> = ({
</StyledEditorHeader>
<CodeMirror
value={context}
height="200px"
height="150px"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

6 lines of JSON is more than enough and it doesn't shift the results table too low on the screen

id="environment"
multiple={isAdvancedPlayground}
options={environmentOptions}
sx={{ width: 200, maxWidth: '100%' }}
sx={{ flex: 1 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

environments and projects are on one line now

marginRight: theme.spacing(0.4),
}));

export const renderOption = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we want to have checkboxes in the multi selection dropdown similar to API tokens for project selection

Copy link
Contributor

@sjaanus sjaanus left a comment

Choose a reason for hiding this comment

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

Other than small linting issues, looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants