Repository navigation
Highlight detection result data with MicroLighter - #157
Merged
Merged
Conversation
API Specification - Non-breaking changesNo changelog changes |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #157 +/- ##
=============================================
+ Coverage 64.55% 64.70% +0.14%
Complexity 1269 1269
=============================================
Files 167 167
Lines 3939 3941 +2
=============================================
+ Hits 2543 2550 +7
+ Misses 1396 1391 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to ticket
TODO: no ticket linked yet — please add before review.
Description
Highlight the JSON in the "Data" field of the detection result detail page with MicroLighter, instead of EasyAdmin's code editor field.
<micro-lighter language="json" controls="copy" line-numbers>from themicrolighternpm package (MIT, about 2 kB gzipped), registered inassets/admin.jswith the GitHub theme. It highlights with the CSS Custom Highlight API, so it adds no markup per token, and it gives the field line numbers and a Copy button.ea-light-scheme/ea-dark-schemeon<body>) rather than the OS setting itslight-dark()colours use.import(./grammars/${language}.js)relative to the bundle, which Vite leaves as is. Reprise'scopyoption ships the 40 grammar files unhashed inpublic/build/grammars/; onlyjson.jsis fetched.code_highlight.html.twigtemplate with alanguagecustom option, so it can be reused for other code.DetectionResult::getPrettyData()now encodes withJSON_UNESCAPED_SLASHESandJSON_UNESCAPED_UNICODE, so paths and URLs readhttps://github.com/...instead ofhttps:\/\/github.com\/....Screenshots
TODO: light and dark.
Checklist