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

replace Session Storage and Local Storage drivers with Web Storage driver #203

Closed
1 task done
thecotne opened this issue Apr 17, 2023 · 5 comments · Fixed by #530
Closed
1 task done

replace Session Storage and Local Storage drivers with Web Storage driver #203

thecotne opened this issue Apr 17, 2023 · 5 comments · Fixed by #530
Labels
good first issue Good for newcomers

Comments

@thecotne
Copy link

thecotne commented Apr 17, 2023

Describe the feature

session and locale storage is really same kind of storage so it does not make sense to have two separate drivers for them

see

it's also one interface in typescript for both objects

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented Apr 17, 2023

You are right. PR welcome to introduce a single new driver. We can reexport it as local/session storage for ease of use and bw compatibility.

@thecotne
Copy link
Author

@pi0 i am confused #530 does not seem to be related to this issue

#530 is some minor refactoring reusing one driver in another

this issue is feature request for new driver

@pi0
Copy link
Member

pi0 commented Dec 19, 2024

The term "web" storage is less known and might be confusing in unstorage drivers contrxt since we list browser specific drivers in a page (+indexdb and cookie in future) ++ unstorage interface itself is loosly based on same interface.

With refactor, localstorage driver is basically same but only a more known name.

If you have any ideas for another name that is more clear we can do it in v2.

@thecotne
Copy link
Author

idk what would be more clear to you. i am just confused why you said i should open PR and then did not review it...

if you did not like term "Web Storage" why not say it? or should i have picked up a hint from you starting your comment with "You are right. PR welcome" as "i don't have time for this"?

should we open issue in MDN repo to inform them that term "Web Storage" is confusing to web developers?

@pi0
Copy link
Member

pi0 commented Dec 20, 2024

Thanks again for your time ❤️ , sorry the review just got delayed and some changes stalled in there, otherwise, I would have commented or applied to refactor on yours... The main idea of refactoring them to one impl was the main point for me to ease maintenance.

Web Storage abstraction term in the context of MDN docs and standards is totally fine but as an unstorage driver name could be confusing IMO + the fact that abstracted driver is not usable, only available Web Storage instances (localStorage or sessionStorage) are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
3 participants