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

Added table of content to open layer details in map view. #1661

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

ahmdthr
Copy link

@ahmdthr ahmdthr commented Jan 25, 2024

Resolves #1660
Resolves #1616

A new button to view layer details is added on the map view.

@ridoo
Copy link

ridoo commented Jan 25, 2024

@ahmdthr the PR still is marked as draft .. if this is intended, though, please ignore my comment

@ahmdthr ahmdthr marked this pull request as ready for review January 30, 2024 05:27
@ridoo
Copy link

ridoo commented Mar 7, 2024

@ahmdthr this one would have to be aligned to the latest changes of linked resources

@ridoo
Copy link

ridoo commented Mar 19, 2024

Thanks @ahmdthr

@giohappy the PR is now ready for review on your side

@ridoo ridoo added the enhancement New feature or request label Mar 19, 2024
@giohappy giohappy requested a review from dsuren1 May 6, 2024 12:36
@giohappy
Copy link

giohappy commented May 6, 2024

@ridoo @ahmdthr we're taking a look right now

@dsuren1
Copy link

dsuren1 commented May 7, 2024

@ahmdthr Kindly resolve the conflicts and align the code changes with the latest changes in master. Thanks!

@dsuren1 dsuren1 requested a review from giohappy May 17, 2024 10:28
@gannebamm
Copy link

@giohappy Sorry @ahmdthr was busy with other tasks and we need some additional days to sort out our ressources. Are we to late for lending a helping hand? @dsuren1 already did some changes and requested a review.

@giohappy
Copy link

I've tested the PR locally. The idea is good and it's really useful, but I have a few concerns:

  • every time a layer is selected in the TOC a new API request is sent to obtain the required information to enable (or not) the info button for the layer
  • the information that has been retrieved is not saved, so the same request is sent again every time a layer is selected

I think this could be improved if the following is implemented:

  • The response can be stored, somehow, inside the state of the component. This avoids making the same request for the same layer multiple times
  • But, the real point is: are these calls really needed? We already query both the map and the datasets endpoint when the map is loaded. Much information about datasets is retrieved at that time. Isn't this enough? If more attributes are required we can add them to the response of those requests, instead of making additional calls.

@gannebamm @ahmdthr if you agree I would consider these improvements before merging it. In that case the PR should be marked as Draft for the time being.

Copy link

@giohappy giohappy left a comment

Choose a reason for hiding this comment

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

@gannebamm gannebamm marked this pull request as draft July 25, 2024 13:13
@ahmdthr
Copy link
Author

ahmdthr commented Aug 22, 2024

I've tested the PR locally. The idea is good and it's really useful, but I have a few concerns:

  • every time a layer is selected in the TOC a new API request is sent to obtain the required information to enable (or not) the info button for the layer
  • the information that has been retrieved is not saved, so the same request is sent again every time a layer is selected

I think this could be improved if the following is implemented:

  • The response can be stored, somehow, inside the state of the component. This avoids making the same request for the same layer multiple times
  • But, the real point is: are these calls really needed? We already query both the map and the datasets endpoint when the map is loaded. Much information about datasets is retrieved at that time. Isn't this enough? If more attributes are required we can add them to the response of those requests, instead of making additional calls.

@gannebamm @ahmdthr if you agree I would consider these improvements before merging it. In that case the PR should be marked as Draft for the time being.

@giohappy Thank you very much for your comments. The only reason a new request was being made was because the linked resources were not included in the batch request. Now with recent changes, it is no longer necessary to sent a request to fetch linked resources. I am currently working on it and expect the final version of the PR shortly.

@ahmdthr ahmdthr marked this pull request as ready for review November 7, 2024 09:40
@ahmdthr
Copy link
Author

ahmdthr commented Nov 7, 2024

The info button for layers on the maps page now fetches all data including linked resources with a single call. Additionally, the linked resources are stored in state such that re-fetching is not necessary when re selecting one layer again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request geonode-ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Showing metadata per layer in map No option to view detail of a layer from the map view
5 participants