umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.42k stars 2.67k forks source link

v14.3-rc - umb-code-block displays json flat #17152

Open KevinJump opened 1 hour ago

KevinJump commented 1 hour ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

v14.3.0-rc

Bug summary

When using the component to display a json snippet, the snippit is now displayed flat. because of a change from pre to pre-line in the styles.

Specifics

The commit ( https://github.com/umbraco/Umbraco.CMS.Backoffice/commit/68c8956ecc6b6d47248efdf64b16c072aba1fd31 ) changes the white-space styling of the code-block's pre value from pre to pre-line and this means the white space used when indenting JSON is no longer shown,.

v14.2 image

v14.3. image

in these examples code is.

<umb-code-block language="JSON" .copy=${true}
    >${JSON.stringify(keyJson, null, 1)}</umb-code-block
>

Steps to reproduce

add a <umb-code-block> to a component with some stringyfied json in it. (as above).

Expected result / actual result

would be ideal if it was indented - or if there was a way to override the white-space style via an attribute on the component?

github-actions[bot] commented 1 hour ago

Hi there @KevinJump!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face: