Repository navigation
fix: show section breaks in version compare - #1764
Open
varunmitra wants to merge 1 commit into
Open
varunmitra wants to merge 1 commit into
varunmitra wants to merge 1 commit into
Conversation
Render added and removed section breaks with labeled, color-coded rules in canvas and shared comparisons, and test that HTML diffs mark them as insertions or deletions.
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
This branch was successfully deployed
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.
Section breaks (
<hr>) were hard to see in version compare in both the classic editor and the canvas Versions panel. An unchanged break showed as a thin, unlabeled line. An added or removed break was wrapped in a small inlineins/delbox, which showed up as a stray pink or green sliver next to a plain line.This PR gives breaks the same "SECTION BREAK" line and label the editor uses, and tints them when they are added or removed.
Description
blocks/shared/version/compare.css(classic editor compare modal):hrwith the editor's grey line and "Section Break" label.ins.diffinsordel.diffdelas a borderless block, green when added and red when removed.blocks/canvas/ew-comparison/ew-canvas-compare.css(canvas compare, inline and split panes): the same rules, using the--s2-*colour variables.test/unit/blocks/shared/version/htmldiff.test.js: two tests asserting that an added<hr>is wrapped ininsand a removed one indel, which the styling depends on.CSS and tests only. No JS behaviour changes.
Related Issue #1205
Motivation and Context
How Has This Been Tested?
Testing
npm run lintpasses.test/unit/blocks/shared/versionunit tests pass.Screenshots (if appropriate):
Types of changes
Checklist: