wincowgerDEV / OpenSpecy-shiny

This is a companion repo that holds the code for www.openspecy.org website and shiny application. The Open Specy package repo https://github.com/wincowgerDEV/OpenSpecy-package
Creative Commons Attribution 4.0 International
2 stars 1 forks source link

User Experience Improvement and Persistent Data Storage #3

Open wincowgerDEV opened 3 years ago

wincowgerDEV commented 3 years ago

Working on getting the user experience fine-tuned so that when the user changes a selection and closes the app and reopens it they will default to the previous selection. This should save folks time and make them more likely to want to share data and give them some peace of mind that their metadata is backed up when using the app in offline mode.

zsteinmetz commented 3 years ago

Great idea! Wouldn't this be something that could be best achieved with cookies? See https://book.javascript-for-r.com/shiny-cookies.html

Browser fingerprinting might be to error-prone for user identification, for example when using browsers like Brave that rotate fingerprints.

wincowgerDEV commented 3 years ago

Good point! I agree that browser fingerprinting probably won't work as well as cookies. I'll look into adding the cookies. That will give us more control over how the ID is structured too. We will need to make this cookie in such a way that it works on offline and online modes so it's a little complicated. Still trying to wrap my head around it. It could be good to add a login option which might make the implementation easier. But then it slows down the user experience because they have to login each time or we make it optional and then they decide not to use the feature and we waste time developing it. If we go the cookie route I this we need to store all the libraries on Open Specy instead of having them pulled from the web so that it will work in offline mode.

Just some rambling for now. Win

On Tue, Mar 30, 2021, 1:41 AM Zacharias Steinmetz @.***> wrote:

Great idea! Wouldn't this be something that could be best achieved with cookies? See https://book.javascript-for-r.com/shiny-cookies.html

Browser fingerprinting might be to error-prone for user identification, for example when using browsers like Brave that rotate fingerprints.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/wincowgerDEV/OpenSpecy/issues/45#issuecomment-810034670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMUJU5HMOB2MDUPDHG37QTTGGFDTANCNFSM42A6NILA .

zsteinmetz commented 3 years ago

We will need to make this cookie in such a way that it works on offline and online modes so it's a little complicated.

The config package makes it easy to distinguish between environments, i.e. a local install and shinyapps.io. We already use it for different library paths and sharing presets. We could use it also to switch between a cookie-based approach and R CONFIG variables or a local .rds file.

It could be good to add a login option which might make the implementation easier.

I'd say that one major advantage of Open Specy in its current stage is ease of use without any barriers like a login option. Adding a login option will also call for secure storage of credentials. So the potential benefits should really offset that extra effort.

If we go the cookie route I this we need to store all the libraries on Open Specy instead of having them pulled from the web so that it will work in offline mode.

Why do you think that this will be necessary? Wouldn't it be sufficient for now to just store the input parameters like smoothers and whether Raman or FTIR spectra were selected for analysis the last time? This won't require any library present.

wincowgerDEV commented 3 years ago

Agreed! Finally figured out how to make the cookie. I think that is the right route to go to keep the UX clean. We can work on the config after I get the if else options working correctly. I don't know what I was thinking on that last item lol. You are right.

wincowgerDEV commented 3 years ago

Backing off of the cookies now. They took me two days to get pretty much no where, haha. The more I think about it the more I realize that cookies and hashing aren't really the ultimate answer for user consistency. We need a login option. Then there can also be a guest option. If cookies get deleted the user id disappears. The only way to avoid those kinds of problems is with a login.

wincowgerDEV commented 3 years ago
  • [x] Reorganize folders in dropbox to have user id as the folder name and all data for the user within them. For this I ended up settling with hashing the session as a unique id for organizing the folders and linking the activity data.
wincowgerDEV commented 3 years ago

@zsteinmetz the app is now online at https://wincowger.shinyapps.io/OSTEST/

The data uploaded and form data are going to: https://www.dropbox.com/sh/imt709rmnjjgr4c/AACiipcBAcMGpILjeTc3L1NLa?dl=0

I can share some info about the mongo db setup too if you are interested in that workflow. I feel like we are almost ready for the primetime that is going to ensue on the website once our paper gets published. Wooho!

wincowgerDEV commented 3 years ago

Scratch that, getting an error because the shinyEventLogger isn't recognized to push to shinyapps.io even though it is on github.

wincowgerDEV commented 3 years ago

Here again, it lives!!! working now. Just needed to add the library to the UI argument.

wincowgerDEV commented 3 years ago
  • [ ] Return most recent user selection when they open up the app.

We have what we need to make this happen but I don't think it will be formally added until we get the login option working.

I think we are done with this project for now. Also went ahead and updated all the UI to make it look nicer.

zsteinmetz commented 3 years ago

Thanks for that, @wincowgerDEV!

wincowgerDEV commented 1 year ago

13 now has support for the last part.