-
Notifications
You must be signed in to change notification settings - Fork 71
feat(visual diff) diff view to support LOC and MSM file changes in EW #1189
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
Open
ravuthu
wants to merge
15
commits into
main
Choose a base branch
from
ewdiff
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
086c8ab
feat(visual diff) diff view to support LOC and MSM file changes in EW
ravuthu f3cef41
Merge branch 'main' of https://github.com/adobe/da-live into ew-diffview
ravuthu 9546364
match with ew visuals
ravuthu d13636a
match with ew visuals
ravuthu e9a7508
Merge branch 'main' of https://github.com/adobe/da-live into ewdiff
ravuthu 5964f71
ew diff styles updated
ravuthu 3c62f95
merge conflicts resolved
ravuthu dffb74d
undo global dialog changes
ravuthu 0d3d204
Merge conflicts resolved, updated the event listeners with canvas bus
ravuthu b7512d7
review comments addressed
ravuthu 15ee82f
Merge branch 'main' into ewdiff
hannessolo 3567313
Merge branch 'main' of https://github.com/adobe/da-live into ewdiff
ravuthu 980189b
Merge branch 'ewdiff' of https://github.com/adobe/da-live into ewdiff
ravuthu dd35bbb
Merge branch 'main' of https://github.com/adobe/da-live into ewdiff
ravuthu 1172658
review comments addressed
ravuthu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { Plugin } from 'da-y-wrapper'; | ||
| import { checkForLocNodes } from '../../edit/prose/diff/diff-utils.js'; | ||
| import { debounce } from '../../edit/utils/helpers.js'; | ||
|
|
||
| export function createMergeConflictsPlugin(onMergeConflictsChange, hostEl) { | ||
| const debouncedCheck = debounce((view) => { | ||
| onMergeConflictsChange?.(checkForLocNodes(view, hostEl)); | ||
| }, 500); | ||
|
|
||
| return new Plugin({ | ||
| view(editorView) { | ||
| debouncedCheck(editorView); | ||
| return { | ||
| update(view, prevState) { | ||
| if (view.state.doc !== prevState.doc) debouncedCheck(view); | ||
| }, | ||
| }; | ||
| }, | ||
| }); | ||
| } |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| /* stylelint-disable selector-class-pattern */ | ||
|
|
||
| .ew-editor-doc-mount .loc-tabbed-container { | ||
| background: var(--s2-gray-25); | ||
| box-shadow: 0 2px 8px rgb(0 0 0 / 8%); | ||
| border-radius: var(--s2-corner-radius-400); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-tab-content { | ||
| background: var(--s2-gray-25); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn-base { | ||
| border-radius: var(--s2-corner-radius-400); | ||
| height: 28px; | ||
| background: var(--s2-gray-100); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn .switch-btn, | ||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-label { | ||
| padding: 4px 10px; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn .switch-btn { | ||
| cursor: default; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn-base-element { | ||
| font-size: var(--s2-component-s-regular-font-size, 0.875rem); | ||
| font-weight: 600; | ||
|
|
||
| &:focus-visible { | ||
| outline: 2px solid var(--s2-blue-800); | ||
| outline-offset: 2px; | ||
| } | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn .confirm-btn, | ||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-accept, | ||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-delete { | ||
| padding: 0; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn .confirm-btn::before, | ||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-accept::before { | ||
| content: ''; | ||
| display: inline-block; | ||
| width: 16px; | ||
| height: 16px; | ||
| background-color: currentcolor; | ||
| mask: no-repeat center / 16px url('/img/icons/s2-icon-checkmark-20-n.svg'); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-delete::before { | ||
| content: ''; | ||
| display: inline-block; | ||
| width: 16px; | ||
| height: 16px; | ||
| background-color: currentcolor; | ||
| mask: no-repeat center / 16px url('/img/icons/s2-icon-close-20-n.svg'); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn:is(.is-local, .is-upstream, .is-diff) .switch-btn, | ||
| .ew-editor-doc-mount .da-diff-btn-3part:is(.is-local, .is-upstream) .diff-label { | ||
| background: transparent; | ||
| color: var(--s2-gray-800); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn:is(.is-local, .is-upstream, .is-diff) .confirm-btn, | ||
| .ew-editor-doc-mount .da-diff-btn-3part:is(.is-local, .is-upstream) .diff-accept, | ||
| .ew-editor-doc-mount .da-diff-btn-3part:is(.is-local, .is-upstream) .diff-delete { | ||
| background: var(--s2-gray-200); | ||
| color: var(--s2-gray-800); | ||
| border-left: 1px solid var(--s2-gray-300); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn.is-active { | ||
| border-color: var(--s2-gray-900); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn.is-active .switch-btn, | ||
| .ew-editor-doc-mount .da-diff-btn.is-active .confirm-btn { | ||
| background: var(--s2-gray-300); | ||
| color: var(--s2-gray-900); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-diff-btn .confirm-btn:hover, | ||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-accept:hover, | ||
| .ew-editor-doc-mount .da-diff-btn-3part .diff-delete:hover { | ||
| background: var(--s2-gray-300); | ||
| color: var(--s2-gray-900); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-tooltip { | ||
| background: var(--s2-gray-1000); | ||
| color: var(--s2-gray-25); | ||
| font-weight: 500; | ||
| border: none; | ||
| border-radius: var(--s2-corner-radius-400); | ||
| box-shadow: 0 2px 6px rgb(0 0 0 / 15%); | ||
| backdrop-filter: none; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-tooltip::before { | ||
| display: none; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-tooltip::after { | ||
| border-top-color: var(--s2-gray-1000); | ||
| filter: none; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-tab-pane del.diffdel, | ||
| .ew-editor-doc-mount .diff-tab-pane del.diffmod { | ||
| background-color: var(--s2-red-200); | ||
| color: var(--s2-red-900); | ||
| border: none; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-tab-pane ins.diffins, | ||
| .ew-editor-doc-mount .diff-tab-pane ins.diffmod { | ||
| background-color: var(--s2-green-200); | ||
| color: var(--s2-green-900); | ||
| border: none; | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .loc-color-overlay.loc-regional { | ||
| background-color: color-mix(in srgb, var(--s2-green-200) 25%, transparent); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .loc-color-overlay.loc-langstore { | ||
| background-color: color-mix(in srgb, var(--s2-red-200) 25%, transparent); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-bg-local { | ||
| background-color: color-mix(in srgb, var(--s2-green-200) 25%, transparent); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-bg-upstream { | ||
| background-color: color-mix(in srgb, var(--s2-red-200) 25%, transparent); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .diff-bg-diff { | ||
| background-color: color-mix(in srgb, var(--s2-gray-100) 25%, transparent); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-regional-edits-overlay { | ||
| padding: var(--s2-spacing-200); | ||
| background: var(--s2-gray-25); | ||
| box-shadow: 0 2px 8px rgb(0 0 0 / 8%); | ||
| } | ||
|
|
||
| .ew-editor-doc-mount .da-regional-edits-actions { | ||
| gap: var(--s2-spacing-200); | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.