volto icon indicating copy to clipboard operation
volto copied to clipboard

Sharing is broken

Open ksuess opened this issue 1 year ago • 1 comments

To Reproduce

  • create content
  • try to share it with a group
  • no groups shown to share with

Versions Volto 16

Plugs are breaking the sharing. I think https://github.com/plone/volto/pull/3372 should be reverted or fixed.

BTW Why does this view need to have plugs? IMHO if a customization of the sharing view is need, then shadow. It's an edge case, isn't it? The introduction of plugs here in sharing needs to be discussed. At least it should work correctly with any change.

/cc @JeffersonBledsoe

ksuess avatar Aug 07 '22 11:08 ksuess

@ksuess The Pluggable, if used correctly, shouldn't break functionality. I found that I sometimes need to specify the Plug dependencies. Like this: https://github.com/plone/volto/blob/3b9ebdfa9ca6d6c18f844b496fee2011e6d43463/src/components/manage/Blocks/Block/QuantaEditBlockWrapper.jsx#L95-L99

tiberiuichim avatar Aug 07 '22 16:08 tiberiuichim

Hi @ksuess. Apologies for the delay, I've been off-grid for a week. Is there any reason Plugs couldn't be used here if they were to be fixed? Aside from the increased initial time to load the page, I don't see any downsides (although I haven't tried Plugs with Javascript disabled yet)?

With regards to it being broken, I'll look into it this week and get a fix ASAP! I should have checked the tests were covering all the cases before getting #3372 merged.

JeffersonBledsoe avatar Aug 16 '22 16:08 JeffersonBledsoe

Just looking at this now. Looks like the Plugs aren't re-rendering on-search. Adding the dependencies prop (didn't realise this existed, thanks!) as suggested resolved it. I've added a test and fix in #3579. Does this resolve the problem you were having with groups too @ksuess?

I didn't realise that Pluggables were client-side only. While the Sharing page prior to the pluggables change still required JS, it would be nice to be able to provide a server-side experience for this too, and the plugs is a step away from that direction. Would be happy to discuss whether to keep the plugs!

JeffersonBledsoe avatar Aug 23 '22 00:08 JeffersonBledsoe