Open jeramysoucy opened 11 months ago
Pinging @elastic/kibana-security (Team:Security)
Hi team, do you have any ETA for this work? We depend on it in order to launch sharing dashboards across spaces in 8.12, thanks! https://github.com/elastic/kibana/issues/167959#issuecomment-1791296434
@teresaalvarezsoler It is not currently assigned to a sprint/iteration. We have a planning snyc tomorrow and I will bring this up.
cc: @legrego
@teresaalvarezsoler the platform already supports this functionality via the behaviorContext: 'outside-space'
configuration setting that @jeramysoucy outlined in the description.
If I understand this issue correctly (@jeramysoucy keep me honest), we are looking to improve the UX to make it more intuitive. Functionally, there shouldn't be anything preventing consumers from using this existing configuration property, and they'll benefit from the UX improvement when it lands.
we are looking to improve the UX to make it more intuitive. Functionally, there shouldn't be anything preventing consumers from using this existing configuration property, and they'll benefit from the UX improvement when it lands.
That's correct. You could use the ShareToSpaceFlyout
with behaviorContext
of 'outside-space', and this would provide the desired functionality. This issue addresses making this the default behavior under Stack Management -> Saved Objects
, and improving the UX with better messaging, etc.
That's correct. You could use the
ShareToSpaceFlyout
withbehaviorContext
of 'outside-space', and this would provide the desired functionality. This issue addresses making this the default behavior underStack Management -> Saved Objects
, and improving the UX with better messaging, etc.
Thanks for clarifying. However, even with behaviorContext: 'outside-space'
, I'm still seeing the active space disabled.
However, I think I've narrowed it down to https://github.com/elastic/kibana/blob/main/x-pack/plugins/spaces/public/share_saved_objects_to_space/components/selectable_spaces_control.tsx#L272-L278. This function appears to be called regardless of the behaviorContext
. So it always disables the active space. Is this check superfluous or should it be modified to check the behaviorContext
?
@nickpeihl Interesting. Following the chain, behaviorContext
is used to set enableSpaceAgnosticBehavior
, which is passed down to ShareToSpaceForm
and then ShareModeControl
and finally to SelectableSpacesControl
, which is what is used to set (or not) the activeSpaceId
. Somewhere along the line, there must be a issue. Where are you setting behaviorContext
to 'outside-space'?
@nickpeihl I think the only example is in the ML SO list, which appears to have the expected behavior.
@jeramysoucy I'm setting the behaviorContext
here. https://github.com/elastic/kibana/pull/170359/files#diff-60851e27573386d5d4d9668ef0c26a8555d937abeb110047c661a1a946bfab4eR60-R70
The SelectableSpacesControl
calls the getAdditionalProps
function and uses that to disable the active space in the flyout.
I'll review how ML handles this to see if there's something obvious that I am missing. 👀
Ah, nevermind. I figured out what I did wrong. I was not passing the behaviorContext
to the right component. Sorry for the noise.
Kibana version: <= 8.11.0
Description: On the saved objects management screen, it is currently not possible to un-share a saved object from the current space. This is a result of the share flyout when the
behaviorContext
property is set to 'within-space'.Steps to reproduce:
Expected behavior: A user with adequate privileges should be able to remove the current space from an object, as long as the object exists in at least one other space. The behavior of the flyout should simply enforce a minimum of one selected space, and should notify the user that the saved object must exist in at least one space when no spaces are selected. This is very close to the behavior of the flyout when the
behaviorContext
property is set to 'outside-space', however, this mode does not provide any in-line feedback as to why the changes cannot be applied when no spaces are selected. This can be observed in the machine learning jobs screen.