You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in features for the package. It's quite nice to know someone is using it.
So for tracking which ones were closed I was leaning towards doing a hash on the content originally. With that though I am thinking of providing two ways to go about it:
From the package side there will be a default way of just hashing the entire announcement object (text, links and such) then this is what will be used.
The other way is that a user can provide their own hashing function that will return the object that should be hashed, if they want to use a specific value that should go through the md5 hash.
With providing a new storage option on the main config will be alright as it won't be a breaking change.
When you say a dev can set the storage option, is that just a 'local' / 'session' string. Or providing the actual function? I prefer just a text option, the internals can handle browser compat then.
I think only the title / content needs to be hashed. no need for custom hashing function. Even if there's an edge case where admin changes the link, but keeps same title, users won't realize that's changed and will simply close again.
With the other proposal to have content, it would be just content to be hashed :) And it doesn't need to be md5, just something very fast, we don't care about some edge case collisions, this isn't a crypto lib. eg https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0
I prefer just a text option, the internals can handle browser compat then.
Desired UX:
As a user visiting a site, I want to
To make this possible, I propose for h-bar
This behavior could be enabled when passed a
storage
option, which developer can set to either sessionStorage or localStorage.What do you think?
The text was updated successfully, but these errors were encountered: