Skip to content

[GEOS-11623] Refactor GSModalWindow to use ModalDialog instead of deprecated ModalWindow#8053

Merged
aaime merged 1 commit intogeoserver:mainfrom
sikeoka:modal
Dec 22, 2024
Merged

[GEOS-11623] Refactor GSModalWindow to use ModalDialog instead of deprecated ModalWindow#8053
aaime merged 1 commit intogeoserver:mainfrom
sikeoka:modal

Conversation

@sikeoka
Copy link
Collaborator

@sikeoka sikeoka commented Nov 21, 2024

GEOS-11623 Powered by Pull Request Badge

This PR refactors GSModalWindow to use ModalDialog instead of ModalWindow which is deprecated in Wicket 9 and removed from Wicket 10 which is required for the Jakarta EE migration. The new modals should be visually very similar to the old modals. Two capabilities of the old modals that have not been ported into the new modals are dragging modals around the screen and resizing modals. They can be future enhancements if anyone really needs that.

The PageCreator interface was removed and everything now sets a Component as the modal content instead of a Page. The only case where this caused issues besides styling issues was with the WPS subprocess builder which required a workaround to get the select2 dropdown working properly. Unused ModalWindow API was removed and resizing-related API was also removed since that isn't currently supported.

This PR includes the changes in #7988 and replaces that PR. If this PR were merged along with #7985 and #7986, the only three remaining CSP violations are inline script usage in the importer extension and elasticsearch and taskmanager community modules. The core GeoServer webapp should be fully functional with the blocking CSP enabled.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

@sikeoka sikeoka marked this pull request as draft November 21, 2024 21:40
@sikeoka sikeoka marked this pull request as ready for review November 21, 2024 22:30
@aaime
Copy link
Member

aaime commented Nov 22, 2024

@DBlasby you might be interested in this one

@sikeoka sikeoka changed the title Refactored GSModalWindow to use ModalDialog instead of deprecated ModalWindow [GEOS-11623] Refactor GSModalWindow to use ModalDialog instead of deprecated ModalWindow Nov 25, 2024
@davidblasby
Copy link
Contributor

I just saw this. There are a lot of changes, I will test it later in the week.

Cheers for doing this!

@aaime
Copy link
Member

aaime commented Dec 16, 2024

Had a quick interactive test... it looks good and seems to work fine. The only limit I see is the lack of resize, I know of installations where long names are used for layers, stores or workspaces, and that will make some dialogs difficult to use, e.g.:

image

The scrolls make it possible to use the page anyways, but here one can decide to see either the layer name, or the workspace name, but not both...

In other cases having just the scrolls is more than adequate instead, e.g. trying to delete a workspace with lots of stores and layers:

image

@aaime
Copy link
Member

aaime commented Dec 17, 2024

We were looking at it during the PSC meeting, the idea is to merge this one and @davidblasby will look into adding ability to resize and move the window. Unless @sikeoka beats him to the punch? 🤣

I'm going to try and do a code review before merge, so far I've only done some interactive testing.

@aaime
Copy link
Member

aaime commented Dec 22, 2024

Overall looking good, thanks @sikeoka

@davidblasby I've opened one ticket for the resizing:

I've also opened two tickets for unrelated issues, pre-existing this work, that I've noticed while interacting with the UI:

On the bright side... editing a subprocess works! Not sure if this is the change the fixed it, or the wicket upgrade... but happy to close this one: https://osgeo-org.atlassian.net/browse/GEOS-7967

@aaime aaime merged commit a5bc843 into geoserver:main Dec 22, 2024
@sikeoka sikeoka deleted the modal branch December 23, 2024 18:00
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.

3 participants