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

Create use_cookie and use_indexed_db Hooks #857

Closed
Archmonger opened this issue Dec 20, 2022 · 3 comments
Closed

Create use_cookie and use_indexed_db Hooks #857

Archmonger opened this issue Dec 20, 2022 · 3 comments
Labels
priority-3-low May be resolved one any timeline. type-feature About new capabilities

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Dec 20, 2022

Current Situation

Currently, there is no convenient way of storing/retrieving purely client sided data.

Proposed Actions

After we migrate use_query to core, it makes a lot of sense to add a use_cookie hook and use_indexed_db hook.

This might require expanding the IDOM framework to allow hooks to execute JavaScript. So perhaps these hooks are reliant on a use_script hook?

The use_script hook may mean we want to create a FIFO "script processor" on the client side, and then have some method of reporting them back to the server (perhaps this is related?).

@Archmonger Archmonger added type-feature About new capabilities priority-3-low May be resolved one any timeline. labels Dec 20, 2022
@Archmonger Archmonger added this to the 2.0 milestone Dec 20, 2022
@rmorshea
Copy link
Collaborator

rmorshea commented Dec 20, 2022

This seems to describe a need for third party libraries to subscribe to, and send messages over, the websocket both on the server and the client. This simply isn't possible now and would require a rewrite of the messaging protocol the server and client use now (of which there really isn't one). I mention a similar need briefly in this comment.

While defining scripts in the form of a hook is probably more convenient and React-like. I think you can probably get away with using the script element since it will re-execute if the script source changes. So long as you aren't saving any auth information you should be fine (see #828 for when you shouldn't set cookies with auth info via JS).

@Archmonger
Copy link
Contributor Author

Archmonger commented Dec 20, 2022

the script element is definitely not appropriate for complex tasks such as read/write/modify the client side indexed_db.

@Archmonger Archmonger modified the milestones: Luxury, Essential Jan 29, 2023
@rmorshea rmorshea removed this from the Essential milestone Feb 21, 2023
@Archmonger
Copy link
Contributor Author

Closing this in favor of #894

@Archmonger Archmonger closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low May be resolved one any timeline. type-feature About new capabilities
Projects
None yet
Development

No branches or pull requests

2 participants