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

Implement a hiding mechanism for sticky banners #3064

Open
pradyunsg opened this issue Mar 20, 2023 · 1 comment
Open

Implement a hiding mechanism for sticky banners #3064

pradyunsg opened this issue Mar 20, 2023 · 1 comment
Labels
infra Core infrastructure for building and rendering PEPs

Comments

@pradyunsg
Copy link
Member

Maybe once it becomes sticky, it could shrink and show a shorter message?

I think the close button is good-enough as a solution for this TBH, because it's a more respectful way to allow users to hide banners as-and-when they wish to do so.

Originally posted by @pradyunsg in #2992 (comment)

The specific UX might differ from the initial discussion referenced above, based on whether we want to completely hide the banner or just move it to a non-sticky state (avoiding a re-flow of the content on "close").

@pradyunsg pradyunsg added the infra Core infrastructure for building and rendering PEPs label Mar 20, 2023
@CAM-Gerlach
Copy link
Member

just move it to a non-sticky state (avoiding a re-flow of the content on "close").

I would think the latter—it would be simpler to implement, keep it for users to reference if desired, and be consistent with how all other admonitions work.

Perhaps a more interesting question is whether we should save the user clicking off of it to local storage, and if so for how long (session, time limit, or permanent). Users reloading the page for some reason or re-navigating to it within a short time window are likely to be annoyed by having to re-close the banner they've already seen, but may not remember if they visited it a while ago, so perhaps a happy medium would be something like saving it for the length of the user's session (though not sure how that is defined in a mobile browser) and/or ≈29 days. What do others think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Core infrastructure for building and rendering PEPs
Projects
None yet
Development

No branches or pull requests

3 participants
@pradyunsg @CAM-Gerlach and others