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

Hide UI recap-* UI elements from printed pages #355

Merged

Conversation

arcataroger
Copy link
Contributor

@arcataroger arcataroger commented Jan 7, 2024

This simple CSS tweak should hide all the elements that we add, as long as they start with a CSS class or ID of recap-*. I haven't used the extension enough to be able to tell if this catches everything, but in my casual tests, it hid all the UI elements I could find.

If we discover any that are missed, we should probably just add a .recap-blahblah class to them.

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2024

CLA assistant check
All committers have signed the CLA.

.btn-group .btn+.btn,
.btn-group .btn+.btn-group,
.btn-group .btn-group+.btn,
.btn-group .btn+.btn,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure why these few lines have different line endings than the rest. I think my IDE just auto-trimmed them. Is that OK?

Comment on lines +526 to +530
@media print {
[class^="recap-"], [id^="recap-"] { /* Any class or ID that starts with `recap-` */
display: none;
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual implementation

@arcataroger arcataroger changed the title Hide UI recap-* UI elements from printed pages (Do not merge yet) Hide UI recap-* UI elements from printed pages Jan 7, 2024
@mlissner
Copy link
Member

mlissner commented Jan 8, 2024

Looks OK to me. @ERosendo, yours for careful review.

Thank you @arcataroger!

@mlissner mlissner changed the title (Do not merge yet) Hide UI recap-* UI elements from printed pages Hide UI recap-* UI elements from printed pages Jan 8, 2024
@mlissner
Copy link
Member

mlissner commented Jan 8, 2024

(

@arcataroger, so you know our process, here's what will happen next:

  • I gave it a once over. Sometimes I know the code well enough to merge things and I do.
  • In this case, I don't feel confident, so I put it on a staff member's project board, in their Main Backlog column.
  • That column is prioritized, and you're currently the second from the top, meaning that he'll do it next, probably.
  • After his review, if he's happy, he'll merge, and we can decide to do a release (or not).

)

@ERosendo ERosendo self-assigned this Jan 8, 2024
@arcataroger
Copy link
Contributor Author

(

@arcataroger, so you know our process, here's what will happen next:

  • I gave it a once over. Sometimes I know the code well enough to merge things and I do.
  • In this case, I don't feel confident, so I put it on a staff member's project board, in their Main Backlog column.
  • That column is prioritized, and you're currently the second from the top, meaning that he'll do it next, probably.
  • After his review, if he's happy, he'll merge, and we can decide to do a release (or not).

)

Sounds good! No rush at all. I'll take a look at the other issues as time permits, but feel free to suggest some too?

Copy link
Contributor

@ERosendo ERosendo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good and the CSS selector patterns effectively match all extension-injected UI elements.

This summary outlines which CSS classes are targeted by the selectors and the corresponding UI elements they affect:

CSS Selector CSS Class UI Element
[class^="recap-"] recap-email-banner Banners to let users know about recap.email
recap-email-banner-full
recap-banner Banner with a link to create a Docket Alert
Banner with a link to view the Docket on CL
"Get this document for free" banner on the download page
Warning about combined PDFs
Warning about sealed document
recap-inline [R] icons on docket reports(district/appellate)
recap-inline-appellate
[id^="recap-"] recap-action-button The recap button in appellate and district courts

@mlissner mlissner merged commit 858c06a into freelawproject:main Jan 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants