Skip to content

Disable dim-bots entirely (for the current load) after interacting with a PR #5993

Closed

Description

@fregante

Extracted from #5946 (review)

cc @gaetanmaisse


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)


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions