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

configurable header and primary borders #2413

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

nthangeniphumudzo
Copy link
Contributor

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.

parentPanel={panelPosition === 'parent'}
hideCollapseContent={hideCollapseContent}
hideWhenEmpty={hideWhenEmpty}
isSettingPanel={!model?.componentName}
Copy link
Contributor

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

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