Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Vis Builder] Add app filter and query persistence without using state container #3100
[Vis Builder] Add app filter and query persistence without using state container #3100
Changes from 12 commits
7925b9f
bd6e6ba
def62ca
797856e
16667ad
053c0df
6f25bfd
d001a7b
400a226
0cf3695
6552ab5
8595a42
2ae8dfe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this new feature be documented in the previous doc you created about persistence management? We also may need updates to API docs of the data plugin, because we're exposing a new public method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added documentation about this in the plugin persistence readme,
docs/plugins/data_persistence.md
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this manually entered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is manually entered as i did not find a mechanism to auto generate the api doc. Are you aware of any mechanism that does that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why cant we setup
connectStorageToQueryState
to also persist global state? is there a limitation? The way i was thinking of these two functions is that the only difference betweenconnectStorageToQueryState
andconnectToQueryState
is that one uses state containers to talk to url storage and the other uses url storage directly. Tomorrow, should we decide to move away from state containers,connectStorageToQueryState
can replace that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be possible and i will need to look more into that. The only complications i can think of right now is that, for
connectStorageToQueryState
, it actually sets up a two way listener between those state managers in data plugins and the state container, while inconnectStorageToQueryState
, it's only a one way listener from the url storage listening on the changes in data plugin state managers. And for global data persistence, i think it might be necessary to set up the two way listener and some additional logics because we want to also listen to the container for the purpose of persisting global data even when we navigate to another previously inactive plugin.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens in the case where
connectStorageToQueryState
fails for some reason? It doesn't look like we have any explicit error handling. Does visbuilder still work as expected without the query state connection?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I added a simple try catch wrap to the function. I also tested if connectStorageToQueryState fails for some reason, the persistence won't work, but vis builder still work as expected.