Skip to content

v3 #108

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

Merged
merged 25 commits into from
Jul 10, 2020
Merged

v3 #108

merged 25 commits into from
Jul 10, 2020

Conversation

andrewbranch
Copy link
Owner

Closes #28,
closes #51,
closes #62,
aaand closes #96.

Didn’t get all the docs and extra fancy features in I was hoping for, but I don’t want to make @janosh wait any longer. Thanks again @janosh for contributing an awesome feature! It looks great in the README:

image

andrewbranch and others added 25 commits May 11, 2020 16:56
Add gutters, line number option
* fix typo in CONTRIBUTING.md

* fix formatting error preventing tests in src/utils.js

* wip: diff line transformer draft implementation

* add diff line transformer integration test

* diffLineTransformer return new v3 gutterCells prop

* readme fix typo

* pick default red/green colors for diff line highlighting

* fix diffLineTransformer.schemaExtension,  avoid mutating input params

* don't require diff lines to start with +/-

* Update tests, fix type errors

* Remove postfix space requirement

Co-authored-by: Andrew Branch <[email protected]>
Add GraphQL testing infrastructure
…kground color (#106)

* Detect dark themes by luminance

* Fix dependencies

* Update README

* Update MIGRATING

* Add test, adjust light default color

* Ignore report.html

* Don’t cache in GraphQL tests
@andrewbranch andrewbranch merged commit 4ce88a1 into master Jul 10, 2020
@janosh
Copy link
Contributor

janosh commented Jul 10, 2020

@andrewbranch That's very kind of you! Honestly no need to rush v3 on my account though. 😄

On the other hand, this way we have some nice v3 minor releases to look forward to. 🚀

@janosh
Copy link
Contributor

janosh commented Jul 10, 2020

Just tried out v3 on my blog. For some reason, all the empty lines are gone. Currently investigating.

v3 v2
v3 v2

@janosh
Copy link
Contributor

janosh commented Jul 10, 2020

Ah, so the empty lines are there. They just have 0 height. If I toggle off

.grvsc-code {
    display: table;
}

they revert back to their former height.


### Line highlighting is visible without custom CSS.

Previously, the default line highlight background color was `transparent`, which meant a color had to be set with a CSS variable by the user. The reason for this limitation was that there is no sensible default that works for both light themes and dark themes, as a light highlight would be invisible on white, and a dark highlight would be invisible on black. As of v3, the plugin the luminance of each theme’s background color and selects a translucent white or translucent black highlight color as a default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing verb here: "...the plugin the luminance of ..."

@andrewbranch
Copy link
Owner Author

Oops, good catches! I’ll get a patch out momentarily. (display: table is necessary for gutters)

@andrewbranch andrewbranch deleted the v3 branch July 11, 2020 00:55
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

Successfully merging this pull request may close these issues.

v3 Tracking Issue Combine syntax highlighting and diff highlighting Make line highlighting work without custom CSS Option to show line numbers
2 participants