brentd / xray-rails

☠️ A development tool that reveals your UI's bones
MIT License
1.22k stars 79 forks source link

Two partials that lay 1:1 over each other doesn't allow to select the overlaying partial #35

Open jmuheim opened 10 years ago

jmuheim commented 10 years ago

We have a _fields.html.haml partial that is visually laying 1:1 above a _form.html.haml partial (this means they both have exactly the same dimensions and position).

The problem here is that xray-rails doesn't allow to click on the _fields.html.haml partial. Take a look at my screenshot: I'm hovering in the Chrome Inspector over the _fields partial, but it's not visible on the site (it's under _form).

image

I'd would be great if this would be fixed somehow. Thank you.

brentd commented 10 years ago

This is something I've thought a lot about but can't decide on an elegant way to handle. Would love your input. Some ideas:

  1. Click and drag a box to "dismiss" it out of the way of what it obscures
  2. Custom context menu that lists stacked boxes beneath the cursor
  3. "send to back" button
  4. 3d rotation a la Firefox's 3d inspector (looks cool but I've always regarded this as gimmicky)

If you have any other ideas, I'm all ears.

jmuheim commented 10 years ago

I would prefer a dropdown which allows to select the desired partial. The 3d rotation would be a nice gimmick, too, but most of the time the easiest solution is the best one. :wink:

jmuheim commented 10 years ago

Any update on this? Would be really useful, it's bugging me several times per day.

brentd commented 10 years ago

Same as the other issue - this isn't a problem for me yet so I haven't been motivated to address it. Xray's code is somewhat obscure but well commented so I like to think it's accessible - fork away!