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

#8238 Unsaved map confirmation zIndex #8680

Conversation

belom88
Copy link
Contributor

@belom88 belom88 commented Oct 11, 2022

Description

Fix zIndex value for unsaved map confirmation dialog.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

#8238

What is the new behavior?
Works as expected

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

Reproducible only on https://qa-mapstore.geosolutionsgroup.com/mapstore/#/

@belom88 belom88 added bug Priority: Low Internal Layout Issue connected to the MS layout labels Oct 11, 2022
@belom88 belom88 requested a review from allyoucanmap October 11, 2022 10:05
@belom88 belom88 self-assigned this Oct 11, 2022
Copy link
Contributor

@allyoucanmap allyoucanmap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is providing a change of z-index to all the sidebar to allow the 'Unsaved changes' to be visible on top of the measurement modal. I would prefer to think this on the other way around and to apply a change to the 'Unsaved changes' ConfirmModal component instead so the Sidebar plugin has not connection to the unsaved modal. My proposal is to add a Portal from the components/misc folder around the unsavedMapModal ConfirModal in this way the modal will be appended on the root and be visible on top:

+ import Portal from '../../components/misc/Portal';

...

+ <Portal>
    <ConfirmModal
        ref="unsavedMapModal"
        show={this.props.displayUnsavedDialog || false}
        onClose={this.props.onCloseUnsavedDialog}
        title={<Message msgId="resources.maps.unsavedMapConfirmTitle" />}
        buttons={[{
            bsStyle: "primary",
            text: <Message msgId="resources.maps.unsavedMapConfirmButtonText" />,
            onClick: this.goHome
        }, {
            text: <Message msgId="resources.maps.unsavedMapCancelButtonText" />,
            onClick: this.props.onCloseUnsavedDialog
        }]}
        fitContent
    >
        <div className="ms-detail-body">
            <Message msgId="resources.maps.unsavedMapConfirmMessage" />
        </div>
    </ConfirmModal>
+ </Portal>

@belom88 belom88 requested a review from allyoucanmap October 27, 2022 14:56
@allyoucanmap
Copy link
Contributor

closed in favor of #8759

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Internal Layout Issue connected to the MS layout Priority: Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants