-
Notifications
You must be signed in to change notification settings - Fork 38
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
[WIP] Refactor layout #116
base: master
Are you sure you want to change the base?
Conversation
92f4165
to
61de15a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change in general!
Some things I noticed:
- This looks rather empty, maybe we should add text here like "Panel"?
- Left panel:
- As we currently need the panel to do any editing it should be open by default
- Don't show the icons when closed as clicking them does nothing. Alternatively they should also open the drawer.
- The ui schema icon is very misleading
- The vertical scrollbar on the left panel is cut off at top and bottom
- When forcing the editor into a horizontal scroll, for example by using a horizontal layout with many controls an additional vertical scrollbar for the whole JSON Forms editor appears. This was not the case in the old editor.
- There should be a title for each panel category
Also:
- Not part of this PR but the Angular preview doesn't show anything when ui schema is empty
- We should remove commented code
@@ -22,7 +22,7 @@ export const App = () => ( | |||
schemaService={schemaService} | |||
schemaProviders={defaultSchemaProviders} | |||
schemaDecorators={defaultSchemaDecorators} | |||
editorTabs={[ | |||
previewTabs={[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good find
<ListItem | ||
button | ||
onClick={() => handleTabChange(0)} | ||
selected={selectedTab === 0} | ||
> | ||
<ListItemIcon data-cy='palette-tab'> | ||
<BallotIcon /> | ||
</ListItemIcon> | ||
</ListItem> | ||
<ListItem | ||
button | ||
onClick={() => handleTabChange(1)} | ||
selected={selectedTab === 1} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can encapsulate the index handling into a reusable component, similar to the other panels?
<Tabs value={selectedTab} onChange={handleTabChange}> | ||
{previewTabs | ||
? previewTabs.map((tab) => ( | ||
<Tab key={`tab-${tab.name}`} label={tab.name} /> | ||
)) | ||
: null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these ternaries? Isn't the map
enough?
width: theme.spacing(7) + 1, | ||
maxWidth: theme.spacing(7) + 1, | ||
[theme.breakpoints.up('sm')]: { | ||
width: theme.spacing(9) + 1, | ||
maxWidth: theme.spacing(9) + 1, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the +1
?
@@ -19,6 +19,7 @@ import { useExportSchema, useExportUiSchema } from '../../../core/util/hooks'; | |||
import { previewOptions } from './options'; | |||
|
|||
export const ReactMaterialPreview: React.FC = () => { | |||
console.log('IM RENDERER'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤪
2486fb5
to
73186af
Compare
Some feedback, solely based on the Preview without looking at the code. Looking at it with the eyes of a first time user:
Of course all of these are optional however I think they would improve the user experience. I think as a long as the inline editing is not 100% perfect we should keep the palette (so probably for a very long time) and polish it accordingly too. |
Hmm using the editor for a while: The properties view is too inaccessible. We should maybe permanently show it in some way. For example when I want to modify a label I created inline I have to open the palette and switch to it. This is way too cumbersome. Just an idea: Maybe merge it with the Layout/Control page, e.g. always show it on 50% height? When we additionally remove the schema/ui schema entries then there is only this single palette panel left. Then drag and dropping in an element would require no further clicks to edit its properties. |
Before I drop off even more "complains", I like the idea to make the editor more approachable to users :) Improvement ideas:
Please let me know when there is an update, I would like to review again |
Thank you for the feedback.
I would first fix issues in group 2. In the meantime I would love to hear which solution for group 3 you would prefer and whether creating follow up issues from group 1 is fine with you. |
+1 on how to proceed with groups 2 and 1. For group 3 a property view in the panel is good enough for now imho. |
73186af
to
62a7d8d
Compare
Group 2 issues should be fixed. |
- allow to modify scope of controls - allow to modify label if controls - allow to modify label of groups - allow to modify label of labels
6372950
to
722dbc5
Compare
Why do you need the palette with the inline editing available? |
I personally feel the palette is more approachable to new users because I can see my options right away, but I might be wrong. |
No description provided.