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

[RFC] Save the state of the filters #480

Open
efernandezleon opened this issue Oct 5, 2022 · 3 comments
Open

[RFC] Save the state of the filters #480

efernandezleon opened this issue Oct 5, 2022 · 3 comments

Comments

@efernandezleon
Copy link

Target Use Case

A very common feature requested by customers in PS is the ability to perform some filters in the map through widgets and save the state of these filters to use them in future sessions. Depending on the customer the use of this functionality can be called as Filters (B6) or Plans (Radarview, XY Italy).

Implementation Proposal

A possible implementation could be to assign a name to the configuration of the filters and store the state in the React Store in a remote component through a specific API. This API should provide the CRUD actions to operate with these entities.

Another possible implementation could be store those filters in the local storage of the browser. The cons here is that you won't share these filters with others users in the app, but the main pro is related to the lack of a specific backend for this.

@padawannn
Copy link
Contributor

Currently, you can save these filters in the local storage and recover them when you load the application with very few lines of code.
On the other hand, if you have an API that can save the filter configuration is really easy to get this information from the current store and load it when you load the application. I don't know if you also want a specific backend API to do this.

@efernandezleon
Copy link
Author

The purpose of this RFC is that CARTO platform can provide a backend to fulfill this feature.

@alasarr
Copy link
Contributor

alasarr commented Oct 22, 2022

I like this feature, it's something @ernesmb has shared with me a couple of times.

I propose to do this in two steps (as we usually do), first in Carto for React, then in Builder.

We need a discussion with @thedae to see what's the best place in our APIs to save this. As it will be available in CARTO for React it cannot be in the mapConfig of Builder.

Blame on use because our maps api is today a layers api...

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

No branches or pull requests

3 participants