fix: activity tracking description (#8268)

* feat: add no_activity flag to control issue activity tracking during partial updates

* refactor: rename no_activity flag to skip_activity for clarity in issue activity tracking

* enhance description input handling with migration update support

* feat: implement skip_activity flag to conditionally log issue updates during partial updates

* refactor: skip-activity

* feat: add migration description update check to conditionally log issue updates

---------

Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
This commit is contained in:
Vipin Chaudhary 2025-12-08 22:18:14 +05:30 committed by GitHub
parent f0bc2bd3bd
commit a9e9cb2983
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 83 additions and 54 deletions

View file

@ -30,6 +30,7 @@ export const createIdsForView = (view: EditorView, options: UniqueIDOptions) =>
});
tr.setMeta("addToHistory", false);
tr.setMeta("uniqueIdOnlyChange", true);
view.dispatch(tr);
};

View file

@ -80,7 +80,11 @@ export const useEditor = (props: TEditorHookProps) => {
onTransaction: () => {
onTransaction?.();
},
onUpdate: ({ editor }) => onChange?.(editor.getJSON(), editor.getHTML()),
onUpdate: ({ editor, transaction }) => {
// Check if this update is only due to migration update
const isMigrationUpdate = transaction?.getMeta("uniqueIdOnlyChange") === true;
onChange?.(editor.getJSON(), editor.getHTML(), { isMigrationUpdate });
},
onDestroy: () => handleEditorReady?.(false),
onFocus: onEditorFocus,
},

View file

@ -160,7 +160,7 @@ export type IEditorProps = {
mentionHandler: TMentionHandler;
onAssetChange?: (assets: TEditorAsset[]) => void;
onEditorFocus?: () => void;
onChange?: (json: object, html: string) => void;
onChange?: (json: object, html: string, { isMigrationUpdate }?: { isMigrationUpdate?: boolean }) => void;
onEnterKeyPress?: (e?: any) => void;
onTransaction?: () => void;
placeholder?: string | ((isFocused: boolean, value: string) => string);