- Issue created by @adamzimmermann
- Merge request !87Draft: Add workspace diff functionality prototype. β (Open) created by adamzimmermann
- π·π΄Romania amateescu
We already have this functionality as an optional integration with the Diff module. It's provided as a
View changes
operation for each entity on the workspace overview page: https://git.drupalcode.org/project/wse/-/blob/2.0.x/wse.module?ref_type=...Was that not working well enough for your use case?
- πΊπΈUnited States adamzimmermann
That's a great question. I forget all of the context around the original request from the editorial staff, but I believe it was centered around the idea of not wanting to have to click that button for each node when a workspace might contain changes from dozens of entities. Let me see if someone still on the project can chime in here with more information.
- πΊπΈUnited States adamzimmermann
I heard back from the editorial team:
"...a large part of the appeal of workspaces for us is launching/closing a competition, where we have to make many edits to many nodes around the site. Currently that's done manually on individual nodes in succession. With this we can do it all at once and be able to identify exactly what was done where all at once/in one view."
- π·π΄Romania amateescu
That's an interesting use case and I agree it makes sense to provide a way to view all differences in a single screen :) Here's a few points on the approach:
- I'm not sure this needs to be on a separate screen, the table at the top duplicates the one from the main "manage workspace" screen, but it's a bit less user-friendly in my opinion (entity type and bundle machine names instead of labels, no pagination, etc.)
- I agree with this integration being in a sub-module, the main WSE module feels pretty crowded these daysWith that said, how would you feel about these changes:
- move the inline diffs into the main "manage workspace" screen, and insert them in the table rows of each changed entity
- add awse_diff.settings
config to specify a "Show changes inline" boolean (FALSE by default), which would toggle between the current Diff integration from the main module (an entity operation) and this new "all in one place" view
- move the current Diff integration from the main module towse_diff
, and provide an upgrade function which installs the new sub-module if the Diff module is also enabled on the site - πΊπΈUnited States adamzimmermann
Those changes make sense to me. I'll see if I can find some time to take a swing at this in the next several weeks and report back with any questions.
- Status changed to Needs work
22 days ago 6:29pm 17 February 2025 - πΊπΈUnited States adamzimmermann
@amateescu
The refactoring of all diff related functionality to the new wse_diff module is going to larger than I hoped, and it will cause us to repeat more code than I would like too. I'm sure we could abstract it somehow to keep it DRY, but that just adds more complexity.
Should that effort be a separate issue? Keeping that refactor separate would have my vote after seeing what it entails.
Thoughts?
I'll keep going for now and push up my work sometime this week.
- πΊπΈUnited States adamzimmermann
adamzimmermann β changed the visibility of the branch 3493448-2-allow-viewing-of to hidden.
- πΊπΈUnited States adamzimmermann
This has all of the changes we discussed for the refactor, but some questions arose during that process. So it's ready for some initial review with the new approach, but I'm sure it will need additional revisions.