Page 1 of 1
Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Tue Jun 27, 2023 2:51 am
by dreifsnider
Hello,
We've received feedback from our Web Author users that they are unable to delete table rows and columns when tracked changes is enabled. I've been able to replicate this and see the following error dialog:
image.png
Is this by design, and if so, is there a way to change this behavior to enable our users to be able to delete table rows and columns and capture it as a tracked change?
Additionally, are there any other restrictions when tracked changes is enabled?
Thank you!
Daniel
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Tue Jun 27, 2023 10:10 am
by mihaela
Hello,
Indeed, the delete row operation is not executed when the change tracking is activated. This is the default behavior and it can be changed.
The DeleteRowOperation that is used when a row is deleted has an argument called changeTrackingBehavior, having the following possible values (the default is Auto):
image.png
So, in case you use a custom framework you should change this arguments value to "Allow".
In case you use a built-in framework you should first extend this framework and then change the value of "changeTrackingBehavior" argument.
Please let us know if you need to provide more details for one of the cases above.
Best Regards,
Mihaela
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Fri Jun 30, 2023 3:00 am
by dreifsnider
Hi Mihaela,
Thank for you the details! I was able to modify the changeTrackingBehavior argument to Allow for the delete.table.row operation and it now works as expected.
However, it seems that the delete.table.column operation does not have a changeTrackingBehavior argument, but Web Author still prevents a user from deleting a table column when tracked changes it turned on. Is there a way to also enable this for the delete.table.column operation?
image.png
image.png
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Fri Jun 30, 2023 11:46 am
by mihaela
Hello,
There is no similar argument for the delete column operation.
The problem is that the layout of the table may become broken if the cells are deleted with track changes.
What you can do is create your own delete column operation (maybe extend the default one) that turns off the track changes [1] [2] [3] before deleting the column (and then restores the track changes state).
[1]
https://www.oxygenxml.com/InstData/Edit ... gChanges()
[2]
https://www.oxygenxml.com/InstData/Edit ... kChanges()
[3]
https://www.oxygenxml.com/InstData/Edit ... ntroller()
Best regards,
Mihaela
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Tue Nov 05, 2024 4:15 am
by jimrubin
Hi Mihaela,
Thanks for explaining this design. Could you tell us the exact class we are extending and method we are overriding.
thanks,
Jim
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Tue Nov 05, 2024 2:03 pm
by mihaela
Hello,
I found a simple way that you can use to allow delete column with track changes:
- you can extend
ro.sync.ecss.extensions.commons.table.operations.cals.DeleteColumnOperation (I see this in your screeshot so it seems that this is what you are using ) and implement getArguments() to expose "changeTrackingBehavior" argument:
Code: Select all
/**
* @see ro.sync.ecss.extensions.api.AuthorOperation#getArguments()
*/
@Override
public ArgumentDescriptor[] getArguments() {
return new ArgumentDescriptor[] {
CHANGE_TRACKING_BEHAVIOR_ARGUMENT
};
}
- then, when you use this operation in the UI, set its value to "Allow".
I will add an issue in our internal issues tracking system to allow setting "changeTrackingBehavior" also for the default operation.
Best Regards,
Mihaela
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Thu Nov 07, 2024 10:51 pm
by jimrubin
Thanks for sending this Mihaela. We implemented this on our test server. We are testing to see if we have any complex tables that get corrupted if tracked changes is on when a column is deleted.
Re: Unable to Delete Table Rows and Columns with Tracked Changes
Posted: Fri Nov 08, 2024 12:03 pm
by cosminef
Hello,
Thank you for testing this on your end. Could you please keep us updated on your testing results, particularly if you encounter any issues with complex tables when tracked changes is enabled and a column is deleted?
Best,
Cosmin