code.pyret.org
code.pyret.org copied to clipboard
table is not overlayed by grey layer when hovering over an error message
It seems as if all tables are focused when hovering over an error message.
@sorawee , given that the grey layer is no longer present, OK to close?
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.
Ooof - sorry, total brainfart on my end.
This is still an issue on the latest merge, as of 8/11/2020.
Let's address this in #332 #329
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:
An imperfect, but I think better, solution, is to add a rule so that all repl output has reduced opacity in this state:
I'll submit a PR so folks can merge that if it's an improvement.
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.
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!