Skip to content

Implement a hiding mechanism for sticky banners #3064

Description

@pradyunsg

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").

Activity

  1. added
    infraCore infrastructure for building and rendering PEPs
    on Mar 20, 2023
  2. CAM-Gerlach commented on Mar 20, 2023

    @CAM-Gerlach
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    infraCore infrastructure for building and rendering PEPs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions