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

allow to dismiss announcement bars #1384

Open
drammock opened this issue Jul 6, 2023 · 8 comments
Open

allow to dismiss announcement bars #1384

drammock opened this issue Jul 6, 2023 · 8 comments
Labels
kind: enhancement New feature or request needs: discussion Needs discussion before an implementation can be made tag: UX Issues or improvements related to user experience

Comments

@drammock
Copy link
Collaborator

drammock commented Jul 6, 2023

#1354 adds a version warning bar in addition to our announcement bar. It would be nice if users could click an X to dismiss the announcements/warnings (they take up quite some space at the top of every page). Not sure how easy it is to persist that setting (or if we even want to do that), seems like options ought to be:

  1. show banner / require clicking X on every page
  2. keep track if banner was dismissed for all pages within that site version
  3. keep track if banner was dismissed for all pages in that URL domain (all docs versions)

I lean toward the simplest (option 1) but I'm open to being convinced otherwise.

@drammock drammock added kind: enhancement New feature or request needs: discussion Needs discussion before an implementation can be made tag: UX Issues or improvements related to user experience labels Jul 6, 2023
@12rambau
Copy link
Collaborator

  1. Big yes
  2. Smaller yes, as persisting the information is not that complicated in the session.
  3. I think it's a bad idea. A simple use case is if you land on documentation from a search result (e.g. pandas) then you could be send to the wrong version. You want to notifiy the user even if it's not the first time he comes to this version by accident.

@trallard
Copy link
Collaborator

trallard commented Jul 13, 2023

+1 on this feature. My preference would be option 3:

  • I feel having the banner close in one single page and then require the user to close it on every page would be a poor user experience
  • As a neurodiverse individual, banners and announcements can be pretty distracting, so having a way to close them is helpful. Again, if I were required to close this banner every time, I would get annoyed.
  • My gut tells me option two would be more challenging than option 3.

Docusaurus follows the approach from option 3. We could also have a look at how they achieve this.

Also, I am pinging @smeragoel in case she has other valuable UX insights.

@smeragoel
Copy link

If we were to do a pro/con of each option, here's how that'd go:

Option 1:

  • Pros: As mentioned, this is simple to implement, and it ensures that users are aware of the announcement or warning each time they visit a page.
  • Cons: Users need to dismiss the banner on every page visit, which could be repetitive and potentially annoying. It may not be the most user-friendly approach, especially for frequent visitors.

Option 2:

  • Pros: More convenience to users, as they won't have to dismiss the banner repeatedly during their visit.
  • Cons: Users will encounter the banner when accessing different versions of the documentation. It may not provide a consistent experience if users switch between versions frequently.

Option 3:

  • Pros: It offers the most persistent dismissal for users, regardless of the specific version they're accessing.
  • Cons: Users who dismiss the banner may not be aware of new announcements or warnings if they switch to a different version. It may lead to missed information or updates if users rely on the persistent dismissal.

I feel that if users work across different versions then it may be more user-friendly to implement Option 2. It would provide a balance between convenience and ensuring users are aware of important information.

But I understand @trallard's point, and in that case, we could introduce Dismiss and Don't Show Again buttons on the banner to leave that choice to the user. Dismiss would emulate the behaviour in Option 2 and Don't Show Again would emulate Option 3.

@12rambau
Copy link
Collaborator

Just to enphasis again why I thing any implementation of 3 is a bad idea with a use case that I did just now on my computer:

  • I'm searching for the tolist method of numpy because I never remember the exact syntax. I searched on google with the following keywords: "numpy", "to_list".
  • Because of my search engine history, because I made a spelling mistake in the method name, maybe also some dark magic from google itself, the first link is v1.17 (https://numpy.org/doc/1.17/reference/generated/numpy.ndarray.tolist.html). Lucky for me there is a banner telling me: "move to v1.25".
  • Hypothesis: you implement a "don't show again button", of course I'll click on it because I don't want to see this stupid banner again. Then I proceed to move to 1.25 and find the information I've been looking for.
  • Now I do a search again with the following keywords: "numpy", "ndarray". And again I'm sent to v1.17. If I've dismissed the banner forever, I have 0 indication that I'm not on latest and 100% chance to think its the correct one.

My point is, I land on PST based documentation searching on google and I'm pretty sure my way of searching is standard. As long as you do this and depending on your search tool/parameter/history people could change version without knowing it, so to me me "don't show again" even if fancy is not adapted to multi-version technical documentation websites.

@trallard
Copy link
Collaborator

trallard commented Jul 17, 2023

I think we might be conflating or confusing banners.

When I think of an announcement banner it can be like the one we have in our docs "Pydata sphinx is an open source project..."

"numpy sprints at scipy" things like that.

I suppose we can allow for these to be dismissed for a version or until these banners are updated so folks do not miss information.

While version warning banners are a different thing (and I think those are still in progress) - but basically tells you "this is not the most up to date version". These make sense not to dismiss them forever.

So my suggestion was more about the former than the latter.

@12rambau
Copy link
Collaborator

My bad there was effectively a confusion. And then yes 3 makes sense because once you know "Pydata sphinx is an open source project" do you really need a reminder on daily basis ? 😄

@lucascolley
Copy link

lucascolley commented Feb 29, 2024

this came up in SciPy with respect to version warning banners. I think option 2 makes most sense. Option 3 makes no sense in this context, and option 1 would probably cause a bit of annoyance.

Carreau added a commit to Carreau/pydata-sphinx-theme that referenced this issue Apr 10, 2024
…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.
Carreau added a commit to Carreau/pydata-sphinx-theme that referenced this issue Apr 10, 2024
…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.
@Carreau
Copy link
Collaborator

Carreau commented Apr 10, 2024

I'm attempting something in #1763 if some of you are interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement New feature or request needs: discussion Needs discussion before an implementation can be made tag: UX Issues or improvements related to user experience
Projects
None yet
Development

No branches or pull requests

6 participants