Skip to content

Make callout block component dismissible (optionally) #3126

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

Closed
nlhkabu opened this issue Mar 3, 2018 · 12 comments
Closed

Make callout block component dismissible (optionally) #3126

nlhkabu opened this issue Mar 3, 2018 · 12 comments
Assignees
Labels
good first issue This issue is ideal for first-time contributors! javascript requires change to JavaScript files usability UX/UI design, user experience, user interface

Comments

@nlhkabu
Copy link
Contributor

nlhkabu commented Mar 3, 2018

Right now, we have 2 notification bars at the top of PyPI.io

It would be nice to allow the users to dismiss these notifications, and remember that they've been dismissed.

If someone would be willing to make a PR with a simple 'close' link, I can style the button :)


Good First Issue: This issue is good for first time contributors. If you've already contributed to Warehouse, please work on another issue without this label instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide. If you are working on this issue and have questions, please feel free to ask them here, #pypa-dev on Freenode, or the pypa-dev mailing list.

@nlhkabu
Copy link
Contributor Author

nlhkabu commented Mar 3, 2018

@di - I feel like I should apply the 'good first issue' label here, but I'm not sure about the complexity of adding a cookie, etc. Can you please confirm? Thx

@nlhkabu nlhkabu added UX/UI design, user experience, user interface usability javascript requires change to JavaScript files labels Mar 3, 2018
@di
Copy link
Member

di commented Mar 3, 2018

Yep, I think this could be done pretty easily on the frontend with a Stimulus.js controller and Document.cookie.

@di di added the good first issue This issue is ideal for first-time contributors! label Mar 3, 2018
@nlhkabu nlhkabu changed the title Make notification bar component dismissable Make notification bar + callout block components dismissable (optionally) Mar 7, 2018
@nlhkabu
Copy link
Contributor Author

nlhkabu commented Mar 7, 2018

I should be more specific here - we don't necessarily want to make all of the notification-bars dismiss-able - just the option to dismiss them in some cases.

In the same way, it would be nice for users to be able to remove documentation information boxes (callout-block component) and for PyPI to remember this preference, e.g.

screenshot from 2018-03-07 07-09-39

Again, we don't want to make all callout-blocks dismiss-able - just in some cases :)

@di
Copy link
Member

di commented Mar 7, 2018

So, ideally, we could add a "dismissable" controller that would hide the target element, which we could reuse for pretty much anything.

@nlhkabu
Copy link
Contributor Author

nlhkabu commented Mar 7, 2018

I can make a PR with the appropriate CSS styles if someone else can provide the JS :)

@brainwane brainwane added this to the Cool but not urgent milestone Mar 8, 2018
@brainwane
Copy link
Contributor

@aalmazan now that cryvate's started working again on that other issue, would you like to try this one?

aalmazan added a commit to aalmazan/warehouse that referenced this issue Mar 9, 2018
@aalmazan
Copy link
Contributor

aalmazan commented Mar 9, 2018

@brainwane Sure thing. Submitted a partial PR with a quick question in #3202 .

aalmazan added a commit to aalmazan/warehouse that referenced this issue Mar 17, 2018
aalmazan added a commit to aalmazan/warehouse that referenced this issue Mar 20, 2018
@nlhkabu nlhkabu changed the title Make notification bar + callout block components dismissable (optionally) Make notification bar + callout block components dismissible (optionally) Mar 22, 2018
@nlhkabu nlhkabu changed the title Make notification bar + callout block components dismissible (optionally) Make callout block component dismissible (optionally) Mar 22, 2018
@nlhkabu
Copy link
Contributor Author

nlhkabu commented Mar 22, 2018

Notification bars are now dismissible, thanks to #3202
This issue now only relates to the callout-block component, which we'd also like the user to be able to dismiss :)

@brainwane
Copy link
Contributor

Is #3361 a duplicate of this?

@di
Copy link
Member

di commented Mar 22, 2018

No, the callout blocks are the things that look like this:

screen shot 2018-03-22 at 12 34 05 pm

@di
Copy link
Member

di commented May 15, 2018

@99 is working on this!

@ewjoachim
Copy link
Contributor

I see this ticket is linked to a merged PR. Should we close it or is it still applicable ?

@di di closed this as completed May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is ideal for first-time contributors! javascript requires change to JavaScript files usability UX/UI design, user experience, user interface
Projects
None yet
Development

No branches or pull requests

6 participants