-
Notifications
You must be signed in to change notification settings - Fork 25
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
Review ui.elements.modal #1100
Review ui.elements.modal #1100
Conversation
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.
Request for change ✍️
After popping out a style into a modal and then closing the style, you have to select another style before being allowed to pop out or see the style again.
I think expected behaviour would be that the legend is returned to the layers panel.
Screen.Recording.2024-02-01.at.09.47.29.mov
@RobAndrewHurst The issue with close method should be fixed now. |
Lekker! |
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.
The fix has put back the modal after closing it.
But if you have multiple modals open from different styles it seems to break.
Screen.Recording.2024-02-01.at.11.29.45.mov
@RobAndrewHurst Changing the theme will now remove the closest modal to the legend. |
Very nice! Thanks @dbauszus-glx working well! |
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.
@dbauszus-glx
📃 Please can you write this all up in the Config Docs before I can review it in detail, as I'm not quite sure of all the options to test!
❓I applied just this to layer.style
"allowModal": true,
.
This added the popout modal button but the modal was added with a close button. Is this the expected behaviour and close is by default true?
@simon-leech The behaviour is still likely to change as we still need to review how legends should work. This PR should only be concerned with the modal element itself. |
@dbauszus-glx Noticed a little bug. If you add a modal to a style - hit pop out for the modal, then close the modal, then collapse the style - the modal button remains on top of the style element rather than being closed with the style. |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
The allowModal option has been removed. |
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.
@dbauszus-glx Thanks for removing allowModal
- much cleaner!
Tested this out and working for me :)
Modal must not have close button if not defined in constructor.
Modal must not have header if not defined in constructor.
Modal must not have inline styles if not defined in constructor.
Modal should take size from content.
Modal should be movable within the context of the parent.
A target in which the modal will be positioned absolute must be defined.
A header is optional. Can be provided as string or html element.
Close is optional. A close button will be displayed in the top right corner.
Default position is top: 0, left: 0.
Content must be provided to calculate the offset width and height.
With the
contained:true
flag the modal bounds can not be shifted outside the target bounds.With the
containedCentre:true
flag the centre of the modal can not be shifted outside the target bounds.