-
Notifications
You must be signed in to change notification settings - Fork 78
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
configurable header and primary borders #2413
base: main
Are you sure you want to change the base?
configurable header and primary borders #2413
Conversation
parentPanel={panelPosition === 'parent'} | ||
hideCollapseContent={hideCollapseContent} | ||
hideWhenEmpty={hideWhenEmpty} | ||
isSettingPanel={!model?.componentName} |
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.
Don't ever do that!
It is completely unclear how the is Setting Panel property is related to Component Name. The configurator can specify Component Name and then your logic will break. You can't make such non-obvious relations!
To determine that the form is in settings mode, you can do the following:
const form = useForm();
...
isSettingPanel={form.formSettings.isSettingsForm}
In addition, it is completely wrong to add a form-specific settings mode to CollapsiblePanel, since this is a common component and should not be associated with the Form Designer in any way.
The correct solution would be to add some property, for example, Default Header Border or something, which will set the default header type.
Or сustomHeaderBorder with the ability to specify a specific style
2ffd917
to
cf772eb
Compare
Hi @AlexStepantsov . This PR addressing the issue raised here. I have ensured that the parent panel(outer) has a border-top with primary-color and the subsequent children to have a border-left with primary color. Finally I have added the custom Header option to allow user flexibility if the don't like a default header's layout.