Skip to content

Conversation

@rsrg-zwiama
Copy link
Contributor

when using nested forms for relational values, the form renders on top of the edit window and gets the height of the edit window. Since there is not much content in the base edit window, the window height is small and the form doesn't scale to the form height. With this changes, the overlaying form pushes the window height to the attribute form style height, when the form is shown and removed when form editing is finished.

@manisandro
Copy link
Member

Thanks, could you post a before/after screenshot for better understanding?

@rsrg-zwiama
Copy link
Contributor Author

before image: the nested form gets the size of the attribute form under and must be scrolled or enlarged
image
image after: the attribute form gets the size depending on nested form size. The nested form is shown in full height and no scroll is needed
image

The AttributForm gets a style height, which is removed, when nested form is closed:
<div class="AttributeForm" style="height: 340px;">

What still is an issue: when switching to the second tab, the form doesn't resize and must be scrolled or resized again.
image

@manisandro
Copy link
Member

What if the form is higher than the available vertical space?

@rsrg-zwiama
Copy link
Contributor Author

The attribute form is limited to the container size. So it is maximum the height of the map window. When the max height is reached, the nested form changes to scroll window. I tested this in the desktop browser and the dev tool smartphone simulation.
image

@rsrg-zwiama
Copy link
Contributor Author

Any new here? Is there a chance to use this in the source or have you any suggestions how to scale the nested form?
I updated the branch to the latest changes.

@manisandro
Copy link
Member

I was meaning to try whether I managed to get nested form naturally expand the size of the parent container, but haven't yet found time to do so. Roughly, the idea should be to not set position: absolute on the nested form link-feature-form-container, but rather on the parent form (when a nested form is open), so that the nested form will end up controlling the vertical size of the edit panel.

@rsrg-zwiama
Copy link
Contributor Author

ok I couldn't manage it to naturally expand the nested form without absolute position. But i have a version, where I remove the parent form while child edit is active. This way the form height is flexible and will scroll, when the window is to small or user shrinks it manually. What do you think?

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