Re: [w3ctag/design-reviews] Storage Buckets API (#562)

Thanks for the feedback @kenchris, @hober  & @torgo!

> We are not a fan of APIs with openOrCreate - it could simply be called open or have a "create: true" as part of options, but we think auto creation is fine.

Sounds good, we can update this to `open` and auto create the Storage Bucket. (https://github.com/WICG/storage-buckets/issues/26)

> All storage buckets have a name and also a title (metadata) you can set. You can go into settings and see a descriptive name. You run into issues of a11y, i18n and generally user agents have been reluctant to expose author-provided strings in security UI like that.

Sounds good, thanks for pointing this out! (https://github.com/WICG/storage-buckets/issues/27)

> Now a fan of the name of persist. It is unclear what it does and it is unclear if it modifies the object. Our naming advice would suggest a simpler name - like "save". Depends on what persist does.

Sorry for the confusion here. Our intent (which I should probably more explicitly point this out in the explainer) was to adopt the [`StorageManager.persisted()`](https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persisted)/[`StorageManager.persist()`](https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist) feature and keep the naming consistent for user created Storage Buckets. `StorageManager.persist()` is a feature on the existing default [bucket](https://storage.spec.whatwg.org/#buckets) and the thought was to keep this feature for user created Storage Buckets as well. 

> Regarding durability concept - durability relax/strict - is the UA free to delete things things? But even in strict if the UA is under storage pressure it's gonna get rid of your stuff. So - don't like APIs that imply to the author that this is durable.

Sorry for the confusion here as well. This is specifically meant to be durability in the face of power failures and was named to be consistent with durability in [IDBTransaction](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction). But we realize this naming here isn't the most clear... would you have any suggestions for better naming for this option in terms of power failure?

> setExpires -- doesn't it make sense to call it setExpirationTime? setExpires sounds like a boolean.

Would this just be for the setter, or would you expect the getter also be `expirationTime()` as well? We wanted to keep `expires()` consistent with [Cookie Store API](https://wicg.github.io/cookie-store/#dom-cookieinit-expires), therefore we thought `setExpires` would be a good matching setter. But I can see how it may sound like a `boolean` as well.

Thank you!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/562#issuecomment-744735626

Received on Monday, 14 December 2020 21:57:27 UTC