code.pyret.org icon indicating copy to clipboard operation
code.pyret.org copied to clipboard

table is not overlayed by grey layer when hovering over an error message

Open sorawee opened this issue 9 years ago • 8 comments

screen shot 2016-08-17 at 01 13 17

It seems as if all tables are focused when hovering over an error message.

sorawee avatar Aug 17 '16 08:08 sorawee

@sorawee , given that the grey layer is no longer present, OK to close?

schanzer avatar Mar 31 '18 13:03 schanzer

Huh? The gray layer still is present, when you mouseover stack frames in our stack trace. Here's a tiny program that demonstrates the point:

tbl = table: x, y
  row: 1, 2
  row: 2, 3
end

tbl

fun oops(n):
  if n == 0: tbl
  else: n + oops(n - 1)
  end
end

oops(3)

Run it, expand the stack trace, and mouseover the trace.

blerner avatar Mar 31 '18 14:03 blerner

Ooof - sorry, total brainfart on my end.

schanzer avatar Mar 31 '18 16:03 schanzer

This is still an issue on the latest merge, as of 8/11/2020.

blerner avatar Aug 11 '20 19:08 blerner

Let's address this in #332 #329

blerner avatar Aug 13 '20 04:08 blerner

Question: what is the desired behavior here for repl output that is not text? For text output, it appears the strategy is to change the background color to gray to reduce the contrast with the darker gray text. (It appears like, but is not the actual case, that a shadow is placed over the content. Instead, it's just that the background color is changed.)

As an example of a case where this happens other than tables, here is an image that uses white and a bright color, which clearly stands out and destroys the illusion of the shadow: image

An imperfect, but I think better, solution, is to add a rule so that all repl output has reduced opacity in this state: image

I'll submit a PR so folks can merge that if it's an improvement.

asolove avatar Jan 21 '24 02:01 asolove

I like this. Conceptually, I think of it as three z-index layers: all the program and repl content, the gray "deemphasizing" later, and the topmost error message.

blerner avatar Jan 21 '24 02:01 blerner

Whoa. This whole time I thought there was just a partially transparent masking DIV, and the problem was just janky z-indexing! That's a nice fix to a 7 year old issue!

schanzer avatar Jan 21 '24 02:01 schanzer