Repository navigation
Restore support for unmarked bots in dim-bots - #5946
Conversation
56470d5 to
4da7ffd
Compare
| const prSelectors = botNames.map(bot => `.opened-by [title="pull requests opened by ${bot}"]`); | ||
| const prSelectors = []; | ||
| prSelectors.push( | ||
| ...botNames.map(bot => `.opened-by [title*="pull requests opened by ${bot}"]`), |
There was a problem hiding this comment.
I kept it because it was there but I'm not sure where it is used (or not anymore?)
There was a problem hiding this comment.
I presume that the copy was just updated and it can now be replaced instead of extended
4da7ffd to
ff01a4d
Compare
snyk-botdim-bots
There was a problem hiding this comment.
Thanks for the PR!
On a (semi-un-)related note:
As I found myself dealing with bots more often, I've found our UI a bit clunky to work with.
What are your thoughts on this alternative behavior?
- dim and collapse them (same as now)
- un-dim them on hover (50% of what we do now)
- add "Expand bots" text on hover (even just via
.bot:after {content: "expand"}🆕 - expand and undim all bots when clicking on any non-link on a bot line (which would include this fake "expand" link) 🆕
This would keep the bots dimmed until you start interacting with them, at which point the feature is effectively disabled until a reload.
We only need to ensure to update the scroll position after the click (like we do with toggle-all-with-alt)
|
About the new behavior, you propose let me double-check what I'm really doing when I interact with bot's PRs. In any case I would be more than happy to help and contribute :) |
Co-authored-by: Gaëtan Maisse <[email protected]>
If you'd like to try, the easiest way would be something like: function handler (event) {
if (event.delegateTarget.closest('a, button, summary')) {
return
}
document.body.classList.add('rgh-no-mo-dim-bot')
}
delegate(document, 'click', '.rgh-dim-bot', handler, {signal})We don't need to actually add the "Expand bots" label at this point. I tried it and it's a little awkward to position with CSS only. Maybe I'd like a robot icon, but still difficult to make it follow the text color while living in the CSS file as well. |
Issue
Closes #5945
Follow the work done in #5512
Test URLs
Check the PRs opened in: https://github.com/gravitee-io/gravitee-policy-oauth2/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc
If there is no PRs opened by Renovate or Snyk by the time this PR is reviewed please refer to the screenshot below ⬇️
Screenshot
Before

After