[]
        
(Showing Draft Content)

Collaboration Editing Status

When multiple users edit the same worksheet simultaneously, conflicts may arise—such as one user’s changes being overwritten or hidden due to another user’s actions (e.g., row deletions, column sort).

The Collaboration Editing Status feature, provided by the spread-sheets-collaboration-addon package, tracks real-time editing states to prevent unexpected results. When conflict operations (e.g., row addition, column hide) affect the current user’s editing state, it updates the editing state and ensures proper UI display.

type=note

This feature is built-in and does not require the use of any interface methods.

Status Types

  • Deleted: The cell being edited is already removed.

  • cell references(Hidden), like A1(Hidden): The rows or columns containing the editing cell are already hidden.

  • cell references, like A1: The cell being edited is affected by other conflict operations.

Conflict Operations

The Collaboration Editing Status feature supports handling the following conflict operations:

  • Add/Delete rows or columns

  • Hide rows/columns (including filters)

  • Sort (including filters)

  • Adjust row height/column width, which may cause the editor and cell positions to differ

Editing Effects

When editing is completed,

  • Deleted State: the editor’s value is not written to the cell.

  • Other States: the editor’s value is written to the cell indicated in the tooltip.

Adding/Deleting Rows or Columns

When your currently edited cell is impacted by another user's row/column deletion or addition (which alters the cell's position), the Collaboration Editing Status feature will visually indicate this change - either by marking the cell as Deleted or by displaying its updated cell reference (e.g., G1, H55).

In the figure below, user SpreadJS2 is editing cell B8, while user SpreadJS1 deletes column B. It can be seen that a Deleted indicator appears on cell B8 of SpreadJS2, and the edited content is not written to the cell after editing is completed.

delete

In another scenario, user SpreadJS2 is editing cell B8, and user SpreadJS1 adds a new row above row 8. It can be observed that a B9 indicator appears on cell B8 of SpreadJS2, and the edited content is written to cell B9 after editing is completed.

add

Hiding Rows/Columns

When your currently edited cell is impacted by another user's row/column hide, the Collaboration Editing Status feature will visually indicate this change - marking the cell as cell references(Hidden), like A1(Hidden).

User SpreadJS2 is editing cell B8 when user SpreadJS1 hides row 8. As a result, SpreadJS2 sees a B9 (Hidden) indicator on the edited cell.

hide

Following the previous step, perform the unhide operation. It can be observed that the content edited by SpreadJS2 is written into cell B8.

unhide

Sorting

When your currently edited cell is impacted by another user's sort(which alters the cell's position), the Collaboration Editing Status feature will visually indicate this change - marking the cell as cell references (e.g., G1, H55).

While user SpreadJS2 is editing cell B8, user SpreadJS1 sorts column B in ascending order (A-Z). As a result, SpreadJS2 sees a B10 indicator on the edited cell, and the final input is written to cell B10 after editing.

sort

Adjusting Row Height/Column Width

Adjusting the row height or column width within the viewport may cause the cell position and editor position to differ.

When your currently edited cell is impacted by another user's adjust, the Collaboration Editing Status feature will visually indicate this change - marking the cell as cell references (e.g., G1, H55).

User SpreadJS2 is editing cell B8, while user SpreadJS1 adjusts the height of row 5. It can be seen that a B8 indicator appears on the cell B8 of SpreadJS2, and the edited content is written into cell B8 after the editing is completed.

resize

State Reversion

Deleted State

If a cell is deleted and then re-added, the "deleted" state will not be reversed. This is because the system cannot determine whether the newly added cell is identical to the previously deleted one in terms of content, format, etc.

undo-delete

type=note

When the cell being edited is deleted and subsequently re-added, its content will remain the same as before editing

Other States

If the action that causes a state change is undone, the state will revert accordingly.

For example, SpreadJS2 is editing a cell and SpreadJS1 hides the row containing that cell, SpreadJS2's view of the cell's state will change to "hidden".

hide

Then, SpreadJS1 undoes the hide action, SpreadJS2's view of the cell's hidden state will be removed, and the tooltip will be updated accordingly.

undo-hide