Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/layout-engine/painters/dom/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ const TRACK_CHANGE_BASE_CLASS: Record<TrackedChangeKind, string> = {
delete: 'track-delete-dec',
format: 'track-format-dec',
};
const TRACK_CHANGE_FOCUSED_CLASS = 'track-change-focused';

const TRACK_CHANGE_MODIFIER_CLASS: Record<TrackedChangeKind, Record<TrackedChangesMode, string | undefined>> = {
insert: {
Expand Down Expand Up @@ -5537,6 +5538,9 @@ export class DomPainter {
if (meta.date) {
elem.dataset.trackChangeDate = meta.date;
}
if (this.activeCommentId && meta.id === this.activeCommentId) {
elem.classList.add(TRACK_CHANGE_FOCUSED_CLASS);
Comment thread
artem-harbour marked this conversation as resolved.
}
}

/**
Expand Down
8 changes: 8 additions & 0 deletions packages/layout-engine/painters/dom/src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ const TRACK_CHANGE_STYLES = `
.superdoc-layout .track-format-dec.highlighted {
border-bottom: 2px solid gold;
}

.superdoc-layout .track-insert-dec.highlighted.track-change-focused {
border-width: 2px;
}

.superdoc-layout .track-delete-dec.highlighted.track-change-focused {
border-width: 2px;
}
`;

/**
Expand Down
Loading