bucklescript-tea icon indicating copy to clipboard operation
bucklescript-tea copied to clipboard

CSS fixes to improve the debugger

Open pbiggar opened this issue 5 years ago • 4 comments

To make the debugger useful in our app, we added this CSS. It doesn't make it completely usable, but it's an improvement.

#debug {
  min-height: 20px;
  z-index: 100;
  position: absolute;
  bottom: 0;
  right: 0;
  max-height: 500px;
  max-width: 500px;
  overflow: scroll;
}
#debug nav {
  max-width: 50%;
}
#debug nav .history span.details {
  width: 25px;
}
#debug nav .history span.message {
  width: calc(100% - 75px);
}
#debug nav .history span.index {
  width: 30px;
  clear: both;
}

pbiggar avatar May 23 '19 17:05 pbiggar

Hmm, it was originally designed to be themed however the app wanted so it was left fairly basic, however setting up something a bit more useful would be nice! Do you want to do a PR? :-)

OvermindDL1 avatar May 24 '19 16:05 OvermindDL1

I'd think either just documenting it at the simpliest, or perhaps adding the above as a basic css mixin function that can be called so the user can add it to their own CSS handlers (and thus override it) would be best. Adding it directly to the debug view itself would make it pretty impossible to override then so not sure that should be done (and in fact any CSS on it should probably be pulled out, hmmm...).

OvermindDL1 avatar May 24 '19 16:05 OvermindDL1

For us, it wasn't a theming problem, it was that the debugger was unusable (important parts weren't clickable because the display was much to large, off screen, or covered/invisible. We had a direct port from Elm, and the Elm debugger didn't have any of these issues. Directionally, we may want to copy the Elm Debugger HTML/CSS to make this better.

pbiggar avatar May 26 '19 20:05 pbiggar

Ah yeah that can indeed happen. ^.^;

Hmm, so a basic CSS mixin perhaps...

OvermindDL1 avatar May 28 '19 14:05 OvermindDL1