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

Need to Store the Calendar View Toggle Settings Differently #5725

Open
dartajax opened this issue Sep 23, 2024 · 2 comments · May be fixed by ilios/frontend#8214
Open

Need to Store the Calendar View Toggle Settings Differently #5725

dartajax opened this issue Sep 23, 2024 · 2 comments · May be fixed by ilios/frontend#8214
Assignees
Labels

Comments

@dartajax
Copy link
Member

I was logged in as Nicholas Gutierrez and using / testing the new 3 button toolbar for view event options on the calendar. I was getting ready to document this in the user guide.

image

Then I logged out and logged in a student class of 2027 -- I saw the following in WaaG and this is fine since these are legitimate learning activities for this student (student only by the way no instructing, admin, or director stuff).

image

But when the student wants to look at this stuff in the calendar, the following is the resulting view ...

image

... empty as the day is long - literally and incorrect - all of the WaaG activities are missing. I would bet that the browser believes "Admin" in still selected from the previous user who did indeed have Admin activities where this user (student only) does not. That is why the calendar output is empty. We need to clear or reset this stuff back to default if a different user logs in. Same user can retain previous settings (button selection) or not - but a different user needs a reset especially if a student logs in and that three button toolbar does not even apply for them since they are learners only - no toolbar anyway.

@dartajax dartajax added the BUG label Sep 23, 2024
@stopfstedt
Copy link
Member

stopfstedt commented Sep 23, 2024

my two pfennigs on this:

  1. get rid of localStorage. the deal breaker here is shared devices - computer labs etc. instead, the user session could be used instead.

2. the other issue is that there should be no hidden saved state whatsoever.
alternatively, would could make saved state visible. the question here is how - those controls are hidden behind other user selections/controls. so these would have to render expanded by default in case there's a selected role-context detected on page load.
the buttons are not hidden behind other controls, i was wrong on that. but they do not appear if the current user does not have elevated privileges.

in sum, i recommend throwing out the whole idea of saving state here altogether.

@michaelchadwick
Copy link
Contributor

@stopfstedt Just removing the localStorage key would indeed fix this, but lose the setting saving. Not sure it's a big loss, since we don't currently save anything else in LS. Users would know better whether this is a major preference to have remembered or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants