question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hide successful checks by default in PRs

See original GitHub issue

Description

Currently PRs look like this, which makes it difficult to see what failed exactly:

Screen Shot

What if we hid the passing ones if any are failing?

Screen Shot 1

Drawbacks

  • In this mode, you can’t see which tests actually succeeded
  • Modifying this active widget could be difficult, but maybe a smart use of element-observer could make it easy enough
  • This feature could be implemented in CSS only with :has, but then it would be difficult to “show all” (maybe via :not(:focus-within)?)

Similar requests

Example URLs

https://github.com/fregante/content-scripts-register-polyfill/pull/58

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
fregantecommented, Jul 27, 2022

That selector actually pushes successful checks to the bottom, so running checks and failed checks will still be at the top, interleaved. We can use this order:

  1. failed (because you want to see and address them as soon as possible)
  2. running (because more checks can fail soon)
  3. successful/skipped
2reactions
fregantecommented, Jul 27, 2022

Here’s a CSS-only feature with :has():

/* Hide successful statuses only if any failed #5856 */
.merge-status-list:has(.octicon-x) .merge-status-item:has(.octicon-check) {
	display: none !important;
}
Screen Shot

And here’s another version that probably solves every single problem at once (except “sort by name”)

/* Dim successful checks and bring failed checks to the top (unless everything is successful) #5856 */
.merge-status-list:has(.octicon-x) .merge-status-item:has(.octicon-check) {
	opacity: 0.5;
	order: 1
}

.merge-status-list:has(.octicon-x) {
	display: flex;
	flex-direction: column;
}
Screen Shot 2

I don’t particularly care that this is “Safari-only” at the moment because Chrome will follow soon and Firefox will follow eventually. Feels like a good win for 8 lines of inert code 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filter by "Draft PRs only" in PR list · Issue #1900 - GitHub
Therefore, I wonder if it makes sense to hide them by default. 1
Read more >
Checks for merging pull requests | Bitbucket Data Center and ...
The default merge checks that come with Bitbucket are: All reviewers approve - requires all reviewers to approve a pull request before merging....
Read more >
Pull Request - Do not hide status of checks
I would like to suggest that you show all the checks (successful, failed and in-progress) in the summary overview. It is far quicker...
Read more >
Git branch policies and settings - Azure Repos - Microsoft Learn
A branch that has required policies configured can't be deleted, and requires pull requests (PRs) for all changes.
Read more >
Github Pull Request Checks - Stack Overflow
Users set up required status checks on the repository so that merging a pull request is blocked if a specific status isn't success...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found