-
Notifications
You must be signed in to change notification settings - Fork 324
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
Track if users has dismissed a version warning banner for a given version. #1763
Conversation
thanks for tackling this! My feelings:
|
Same feeling here, just did not had time/skills to do that.
This is why I store the date of dismissal instead of storing (date+1month), so that we (as developers) can refine that later. The date could be treated as a boolean, or we can include a footer to reset or change the duration per user. I'm not attached to a particular logic. I just think it's good to give us the option of ignoring a previous dismissal.
I agree, I think there is basically 3 groups of versions:
The main question is do we want to separate devs from older or treat both same. |
does not seem to show properly on my machine, so I went for the fa-icon. I'm not sure how to make the close button go on the right edge of the page without sending the test of the banner on the left or adding a bunch of intermediate divs (would that be ok ? ) The way the annoucement banner are done is completely different, and is in the Jinja templates. Should the two kind of banner creating logic be unified ? |
I think ideally they would be treated differently (?) but I'm content with either way if one of them is much harder to do.
putting classes
Ideally yes. But that could be another PR. |
Oh, yes, the ms- and me- work great. I haven't added the me-3 to the button as the css inspector says it is ignore/does not apply. I think the "wrong" position of the close button is because the banner use custom margin/padding. I think it probably could use the same css values/classes as the nav bar with Maybe let's leave the for refactor that consolidate the various banners code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Carreau I rebased to remove merge conflict, and pushed a few extra commits to tweak the JS (most notably I changed the timeout from 1 month to 14 days). Commit msgs are fairly descriptive of what else I did.
|
No, |
I fixed the The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setMonth(getMonth() -1) (or setDay(getDay() -14)) works as it does the wrap around and decrement the year (resp Month). But computing the delta was not ok because it's bound in 1-12 (1-31).
Thanks for catching that, I didn't test carefully enough
This picked up conflicts... :-( |
…sion. See pydata#1384 I think we all agree that if a user dismiss the banner it should apply to all pages. One remaining questions is : - does it apply to all versions ? This implement a rough dismiss button and store in local storage which version and **when** the user has dismissed it. I think this is enough informations to refine the logic later with what/when we want to show. This also has a rough implementation of not showing banner for current version for the next month following any banner dismissal. We could do the same for announcement (not implemented here), but also keep a hash of the announcement to re-show on new-announcement, but that's for another PR. CSS/HTML to refine, but I'll need help for that.
07a6379
to
1799382
Compare
Rebased ( and squashed for simplicity) and a few extra changes in second commit, in particular bd-header-version-warning is now an ID as it is supposed to be only one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few last tweaks; if you're happy I think it's time to merge
Ok, let's try. |
…sion. (pydata#1763) See pydata#1384 See pydata#1384 If a user dismiss the banner it should apply to all pages. One remaining questions is : - does it apply to all versions ? This implement a dismiss button and store in local storage which version and when the user has dismissed it. This is enough informations to refine the logic later with what/when we want to show. This also has a rough implementation of not showing banner for current dismissed version for the next 14 days following any banner dismissal. Co-authored-by: Daniel McCloy <[email protected]>
See #1384
If a user dismiss the banner it should apply to all pages.
One remaining questions is :
This implement a dismiss button and store in local storage which version and when the user has dismissed it.
This is enough informations to refine the logic later with what/when we want to show.
This also has a rough implementation of not showing banner for current dismissed version for the next 14 days following any banner dismissal.