day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
634 stars 68 forks source link

Broken Code formatting in Events tab. #270

Closed mike-thompson-day8 closed 1 year ago

mike-thompson-day8 commented 4 years ago

This change to HTML styles broke the code formatting at the top of the Events tab.
https://github.com/day8/re-frame-10x/commit/40e7e7da18c9cc3b755d0247f5b41a754c4e0a07

After this change, the code shown (at the top of the events tab) never had newlines, and was always string onto one line.

Gregg8 commented 4 years ago

Some background:

There have been three related styling commits this year:

Originally, 10x only really targeted Chrome and this was work to make it display better in other browsers, but specifically MS Edge, which unfortunately is the browser used in Microsoft 365 JS Add-ins.

Icons (which are svg) did not display at all in Edge and so it was determined this was because the reset CSS was not working and so these were the changes made.

As it happens, the third commit caused the unwanted effect of removing all newlines from the displayed event code in the Events tab.

On looking into this, it's the [:pre] that is responsible for adding the newlines and the new reset CSS messes with this, so we need to target the styling of that, but making sure nothing else breaks.

Additional TODO: Currently, the svg arrows display as a grey button under Edge so need to look into that as well...

image

Gregg8 commented 4 years ago

Did a quick fix to get the newlines going again: https://github.com/day8/re-frame-10x/commit/8de832980c7aab9553d07c4443794c02b6636d1e

Need to spend more time to get the right method of resetting the CSS

MawiraIke commented 2 years ago

Looks like this issue is fixed as of version 1.2.7? The code in events tab has newlines now and, arrows are working in MS edge.

MS Edge: MS Edge arrows

Code formating in events tab: events-code

superstructor commented 2 years ago

@Gregg8 please confirm ?

kimo-k commented 1 year ago

Appears to be fixed since dad02ff85793119f6ccfeeb9df328cfe91ec6354