Skip to content

Enhance dataset viewer and saving of layer settings #2054

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

Merged
merged 9 commits into from
May 20, 2025

Conversation

dsuren1
Copy link

@dsuren1 dsuren1 commented May 14, 2025

Description

This PR address the inconsistency loading dataset information on certain pages and enhances the layer settings save functionality

Screenshot

image

@dsuren1 dsuren1 added this to the 5.0.0 milestone May 14, 2025
@dsuren1 dsuren1 requested a review from allyoucanmap May 14, 2025 11:56
@dsuren1 dsuren1 self-assigned this May 14, 2025
@dsuren1 dsuren1 added bug Something isn't working master geonode-ui labels May 14, 2025
@dsuren1 dsuren1 changed the title Enhance saving of dataset layer settings Enhance dataset viewer and saving of layer settings May 14, 2025
@dsuren1 dsuren1 marked this pull request as draft May 15, 2025 14:52
@dsuren1 dsuren1 marked this pull request as ready for review May 16, 2025 05:20
Copy link
Collaborator

@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.

Issue - Restore default dataset style on page change

steps:

  • login and upload a dataset
  • open the dataset
  • edit layer settings and create a new style
  • select the new create style (not the default one)
  • go back to the dataset

Expected:

  • dataset is rendering with the default style

Current:

  • dataset is rendering with the selected style
restore_default_style.mp4

Issue - Save the style name on change default style

steps:

  • login and upload a dataset
  • open the dataset
  • edit layer settings and create a new style
  • select the new create style (not the default one)
  • make the new style the default one (click star button)

Expected:

  • a new request is performed to save the style name also in the layer settings. We need to intercept the default style action and send a parallel request to save the style, so a user does not need to click on the save button for this specific case

Current:

  • the new default style is not updated in geonode until a user click on the save button. A user could not click the save button leading to an inconsistent state
update_default_style.mp4

@allyoucanmap
Copy link
Collaborator

@dsuren1 I think we should exclude completely the style property from the data payload so style will be always undefined and GeoServer will pick always the default

@dsuren1
Copy link
Author

dsuren1 commented May 19, 2025

@allyoucanmap
Issue 1 - We have a similar issue happening in all page when navigating to previous page. We can address it as part of that issue. Kindly let me know if fine

Issue 2 - @giohappy This introduces a modification to our earlier discussion (as part of default style and save pending indicator issue):

  • Selecting a new style and not making it default (default style is reflected upon loading layer setting).
    • When performing a save should we intercept the style and make it default ? @allyoucanmap
  • Selecting a new style and making it default (new style selection is reflected upon loading layer setting)

In either case, style will not be saved to data payload, i.e when layer setting is loaded the default style is always selected

…viewer

* commit '73a073ef6d312baaf10991cc2f4b5f17c5e40b8e':
  Resource page config based on type (GeoNode#2050)
  [create-pull-request] automated change (GeoNode#2066)
  Fix - Actionbar menus are hidden behind the document viewer (GeoNode#2048)
  [create-pull-request] automated change (GeoNode#2065)
  Updated MS submodule to latest stable (GeoNode#2051)
  [create-pull-request] automated change (GeoNode#2064)
  Enhance close open right panel handler (GeoNode#2059)
@dsuren1
Copy link
Author

dsuren1 commented May 19, 2025

@giohappy @allyoucanmap

To streamline the process of saving layer settings—including style configuration—we propose removing the default style selection button (star icon). Instead, when a user saves the layer settings, we will intercept the selected style and perform a GeoServer API call to set it as the default. After that, the rest of the layer settings will be saved as usual.

This approach ensures that GeoNode remains in sync with GeoServer regarding the default style

@allyoucanmap
Copy link
Collaborator

@giohappy @allyoucanmap

To streamline the process of saving layer settings—including style configuration—we propose removing the default style selection button (star icon). Instead, when a user saves the layer settings, we will intercept the selected style and perform a GeoServer API call to set it as the default. After that, the rest of the layer settings will be saved as usual.

This approach ensures that GeoNode remains in sync with GeoServer regarding the default style

@dsuren1 please proceed with this proposed implementation, thanks

@dsuren1 dsuren1 requested a review from allyoucanmap May 20, 2025 10:58
@allyoucanmap allyoucanmap merged commit af62591 into GeoNode:master May 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working geonode-ui master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants