GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
86 stars 25 forks source link

Modal Dialog element πŸ–ΌοΈ #1308

Closed RobAndrewHurst closed 2 weeks ago

RobAndrewHurst commented 3 weeks ago

Description

Before going into the PR we need to understand what the Dialog/Modal actually are. Simply put a Dialog is a pop up that appears on the current page. A Modal is the same thing however it is designed to take control over the entire page not allowing the user to interact with other elements until the Modal is closed.

GitHub Issue

Type of Change

How have you tested this?

Test this with any form of modal. Please check for any odd behaviours.

Testing Checklist

Code Quality Checklist

RobAndrewHurst commented 3 weeks ago

Going back into draft as discussed in the meeting to refactor all the elements to use dialog instead of modal.

RobAndrewHurst commented 3 weeks ago

Refactoring has been complete.

The modal.mjs module has been renamed to dialog.mjs. This would also require the helpModal.mjs module to also be renamed to helpDialog.mjs to keep with the naming.

There is no mapp.ui.elements.modal object anymore but mapp.ui.elemets.dialog

modal -> dialog helpModal -> helpDialog

dbauszus-glx commented 2 weeks ago

dialog.close must be executed on close if instance of function.

RobAndrewHurst commented 2 weeks ago

@dbauszus-glx I have added logic that if the dialog is a modal do not use the shiftContained method to ensure the dialog remains in the map container.

RobAndrewHurst commented 2 weeks ago

Going back into draft due to the modal mask being a draggable element.

RobAndrewHurst commented 2 weeks ago

The modal Dialog will now append to the body of the document. The user will not be able to adjust the position of the modal in the window. The close button will always appear on a modal.

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud