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

Viewed button issue + highlight dark theme #460

Closed
tnhu opened this issue Dec 8, 2022 · 3 comments
Closed

Viewed button issue + highlight dark theme #460

tnhu opened this issue Dec 8, 2022 · 3 comments

Comments

@tnhu
Copy link

tnhu commented Dec 8, 2022

Step -1: Before filling an issue check out troubleshooting section

Step 0: Describe your environment

  • OS: Mac 12.6. Chrome 108.0.5359.94 (Official Build) (arm64)
  • diff2html version: 3.4.18
  • Using diff2html directly or using diff2html-ui helper: Both
  • Extra flags: N/A

Step 1: Describe the problem:

  • Viewed button does not work since 3.4.18. It does not collapse file content.
  • Rendering looks weird when using a dark highlightjs theme. Actually it looks weird with light themes as well.

Screen Shot 2022-12-07 at 11 46 59 PM

Steps to reproduce:

  1. Look at example here https://codesandbox.io/s/diff2html-issues-dkur77?file=/src/App.js

Observed Results:

  • Viewed button does not collapse file content
  • Highlightjs themes look weird

Expected Results:

  • Viewed button should collapse file content
  • Highlightjs themes should be rendered nicer

Relevant Code:

Look at https://codesandbox.io/s/diff2html-issues-dkur77?file=/src/App.js to reproduce.

@tnhu
Copy link
Author

tnhu commented Dec 8, 2022

It looks like I made a mistake when importing css:

import "diff2html/bundles/css/diff2html.min.css";
import "highlight.js/styles/dark.css";

Change it to

import "highlight.js/styles/dark.css";
import "diff2html/bundles/css/diff2html.min.css";

Then the theme weird rendering issue goes away, but dark theme is not rendered correctly (it renders kind of light colors only).

Screen Shot 2022-12-07 at 11 47 49 PM

@rtfpessoa
Copy link
Owner

Strange, regarding the view button, everything seems to be working in the demo

I can try to double check with a local version when I am back in the laptop.

@rtfpessoa
Copy link
Owner

Cannot replicate, if you still face the issue please provide a single HTML file where it can be replicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants