Fixes to share list view panel after expiration refactor#36847
Fixes to share list view panel after expiration refactor#36847
Conversation
17e401d to
69e66a5
Compare
Codecov Report
@@ Coverage Diff @@
## master #36847 +/- ##
============================================
+ Coverage 64.17% 64.70% +0.53%
Complexity 19130 19130
============================================
Files 1270 1270
Lines 74819 74868 +49
Branches 1327 1329 +2
============================================
+ Hits 48012 48447 +435
+ Misses 26416 26030 -386
Partials 391 391
Continue to review full report at Codecov.
|
|
The "notify by email" button is now only displayed when the share-actions-dropdown is opened. Previously it was always shown. With it closed, the "notify by email" button is not seen: With it open, the "notify by email" button is seen: The acceptance tests were failing, e.g.: That change in behaviour needs a change to the acceptance tests so that they open the ShareActionsDropdown before trying to click the "notify by email" button. I pushed a commit for that. What do others think about this change in behaviour? (Maybe it is OK/good) (other stuff seems to work well) |
|
@mrow4a @phil-davis I like this behavior. @pmaier1 Please give us your opinion. |
|
@micbar @phil-davis yes, I thought that this was intended that everything with shareOption should be hidden - currently @phil-davis which acceptance tests are failing, all seems passing? |
I also like the behavior of the PR
|
|
@davitol are you running richdocuments from PR owncloud/richdocuments#313 |
|
@davitol I have no idea why this is possible. I never seen any problems with hovering - in this code there is nothing related to hovering. I will try to reproduce, might be indeed related to secure view app not aware of expiration |
@phil-davis You were right, with that branch It does not happen. Thanks for the hints |
|
@davitol Could you confirm that the sharing bug with secure view is fixed in the PR 303 in richdocuments? |
|
phil-davis
left a comment
There was a problem hiding this comment.
works for me
a JS person needs to review the code
Thanks guys 👍, I agree. What I see in #36847 (comment) looks good now. If that sharing bug is fixed as well, perfect 👌 |
|
Should it be possible to have active secure view + can share option enable at the same time?
Current behavior => It is not possible to have enabled at the same time secure view + can share option. @pmaier1 If we agree about this behavior then the bug is fixed |
There was an issue with discussion about that somewhere! It was decided that a resource shared as "Secure View" is not allowed to be re-shared. If someone can find the link, then post it. |
|
PVince81
left a comment
There was a problem hiding this comment.
some dubious logic to be confirmed
core/js/sharedialogshareelistview.js
Outdated
| // use mutation observer to ensure that if sharewithlist changes | ||
| // proper share details are toggled | ||
| var shareWithList = this; | ||
| if(_.isUndefined(self._toggleMutationObserver)) { |
There was a problem hiding this comment.
this block doesn't seem to be related at all with the shareWithList, maybe can move it outside ? or do we need to first make sure that there's at least one element ? if yes, you could have used .at(0) for that instead of the loop
seems the whole logic here can only work if there's only a single shareWithList element, else stuff would overwrite itself here.
for readability, this each() handler should be moved out
core/js/sharedialogshareelistview.js
Outdated
| this.$el.find('li').each(function() { | ||
| var $li = $(this); | ||
| var shareId = $li.data('share-id'); | ||
| if (!_.isUndefined(view._currentlyToggled[shareId])) { |
There was a problem hiding this comment.
this check disregards whether view._currentlyToggled[sharedId] is true or false as it only checks whether the value is defined ("false" counts as defined) and would always set it to true, is that intended ?
There was a problem hiding this comment.
good point, clarified the logic
16cb9fb to
656617d
Compare
|
@davitol @phil-davis @micbar @pmaier1 I solved both issues in core, preserving compatibility with already released versions of richdocuments/onlyoffice. It would be however good that customers update their onlyoffice/richdocuments apps just to be on a safe side for the future in case some other field gets added. |
|
Acceptance test fails: https://drone.owncloud.com/owncloud/core/23054/90/15 https://drone.owncloud.com/owncloud/core/23054/89/15 It looks like the "notify by email" button has changed its behaviour again. I will look. |
60db761 to
1e516e6
Compare
|
I pushed my acceptance tests commit back on this PR. It got lost. IMO that will allow CI to pass. |
|
@phil-davis sorry I probably force pushed to branch and deleted a commit by mistake. Missed message that you pushed something |
|
https://drone.owncloud.com/owncloud/core/23057/30/6 |
| this.$el.find('li').each(function() { | ||
| var $li = $(this); | ||
| var shareId = $li.data('share-id'); | ||
| if (!_.isUndefined(view._currentlyToggled[shareId]) && view._currentlyToggled[shareId] === true) { |
There was a problem hiding this comment.
!isUndefined is now redundant because undefined is not strictly equal to true.
but ok to keep



This PR targets two problems listed in #36735: