Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON diff in chnagelog view can be larger than viewport #183

Closed
1 task done
otbe opened this issue Feb 7, 2022 · 2 comments · Fixed by #195
Closed
1 task done

JSON diff in chnagelog view can be larger than viewport #183

otbe opened this issue Feb 7, 2022 · 2 comments · Fixed by #195
Labels
bug Something isn't working

Comments

@otbe
Copy link
Contributor

otbe commented Feb 7, 2022

Have you read the Contributing Guidelines on issues?

Description

I recently noticed that if you have a longer description somewhere in the JSON schema it will expand the "diff" view infinitely.

Steps to reproduce

Screenshot 2022-02-07 at 19 05 57

Repro: https://github.com/otbe/eventcatalog-playground

Expected behavior

It should wrap the lines at some point I guess

Actual behavior

You have to scroll horizontally a lot :D

Your environment

  • EventCatalog version used: 0.1.14
@otbe otbe added the bug Something isn't working label Feb 7, 2022
@donaldpipowitch
Copy link
Contributor

This is not officially supported by diff2html, see rtfpessoa/diff2html#99. There is a workaround however by applying those styles:

.d2h-code-line, .d2h-code-line-ctn {
  white-space: pre-wrap;
}

Lines will break correctly now and the only limitation is (afaik) that line heights will not by in sync in the side-by-side view. But it will make the diff instantly more readable.

@boyney123, would you be fine with this "workaround"? If yes, I'd create a Merge Request.

@boyney123
Copy link
Owner

Thank you @donaldpipowitch , yeah feel free to make the Merge Request 👍 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants