Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate user/group share actions into single dropdown #36587

Conversation

felixheidecke
Copy link
Contributor

Rework user/group share actions. Concerning https://github.com/owncloud/enterprise/issues/2001

grafik

@felixheidecke
Copy link
Contributor Author

felixheidecke commented Dec 13, 2019

@PVince81 I added the "silent model update" in order to prevent an immediate redraw wich closed the dropdown while changing stuff:
https://github.com/owncloud/core/pull/36587/files#diff-2e1f33af47835fc7dab530c048c95f9aR702

I hope that doesn't collide somewhere else. Tests are fine.

@felixheidecke
Copy link
Contributor Author

I consider allowing the redraw on removing or adding the expiration date, so the little ⏱ immediately appears/disappears.

@phil-davis
Copy link
Contributor

Seems to work nicely with my 15 minutes manual testing.

An unusual sequence that is odd is:

  • enable, enforce and set the default/enforced days to 30 for user shares
  • create a user share - it gets expiry date 30 days from now by default, good
  • change the default/enforced days to 15 for user shares
  • refresh the files page, redisplay the share you created. The expiry date shows as only 15 days in the future. (that might be "a good thing" if it really got reset to that)
  • change the default/enforced days to 30 or more for user shares
  • refresh the files page, redisplay the share you created. The expiry date shows as 30 days in the future. (which is the value that it really has in the server)

So when displaying an existing share, if the share has an expiry date past the current enforced limit, then the displayed expiry date is just the current enforced limit. (which is not a true indication of what is in the server database)

@phil-davis
Copy link
Contributor

The UI tests will need refactoring for the new/changed behaviour here. Without having looked, I guess that it will not just be the Gherkin scenarios, but the placement of UI date elements has changed so xpath... in page objects probably needs sorting out.

@phil-davis
Copy link
Contributor

I added some labels, because I guess QA-team will be helping with adjusting the UI acceptance tests.

@felixheidecke
Copy link
Contributor Author

refresh the files page, redisplay the share you created. The expiry date shows as only 15 days in the future. (that might be "a good thing" if it really got reset to that)

hmmm, I guess that's because the jQuery Datepicker sets a maxDate based on the enforced default expiration. Hmmm...

@phil-davis
Copy link
Contributor

hmmm, I guess that's because the jQuery Datepicker sets a maxDate based on the enforced default expiration. Hmmm...

I don't think it's a big thing - it only happens if the admin has set the default days to be long, then later reduces it.

@dpakach dpakach self-assigned this Dec 16, 2019
@codecov
Copy link

codecov bot commented Dec 16, 2019

Codecov Report

Merging #36587 into feature/user-group-share-expiration will increase coverage by <.01%.
The diff coverage is 72.72%.

Impacted file tree graph

@@                            Coverage Diff                            @@
##             feature/user-group-share-expiration   #36587      +/-   ##
=========================================================================
+ Coverage                                  64.64%   64.65%   +<.01%     
  Complexity                                 19078    19078              
=========================================================================
  Files                                       1269     1269              
  Lines                                      74668    74666       -2     
  Branches                                    1322     1319       -3     
=========================================================================
+ Hits                                       48269    48272       +3     
+ Misses                                     26007    26005       -2     
+ Partials                                     392      389       -3
Flag Coverage Δ Complexity Δ
#javascript 54.08% <72.72%> (+0.05%) 0 <0> (ø) ⬇️
#phpunit 65.82% <ø> (ø) 19078 <ø> (ø) ⬇️
Impacted Files Coverage Δ Complexity Δ
core/js/shareitemmodel.js 80.31% <100%> (+0.05%) 0 <0> (ø) ⬇️
core/js/sharedialogshareelistview.js 73.23% <62.5%> (-0.56%) 0 <0> (ø)
core/js/shareconfigmodel.js 83.67% <0%> (+10.2%) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cac2f2...bd25355. Read the comment docs.

@dpakach
Copy link
Contributor

dpakach commented Dec 16, 2019

@felixheidecke, I just pushed a fix for the CI, Haven't run all the tests but they should be good now.

Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Style

Copy link
Member

@skshetry skshetry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one thing, rest looked good to me. :)

@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/core/22008/81/14

    Then the expiration date input field should be "+30 days" for the group "grp1" in the share dialog                                                                                  # WebUISharingContext::expirationDateShouldBe()
      Failed asserting that '15-01-2020' matches expected 1579083368.

in a few places.
Some problem with the expirationDateShouldBe() comparison code
@dpakach

Comment on lines 484 to 485
//the additional permission disappear again after they are changed
//so we need to open them again and again
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this comment is no longer true?

@phil-davis
Copy link
Contributor

@phil-davis phil-davis self-requested a review December 17, 2019 07:47
}

/**
* open the dropdown for share actions in the sidebar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* open the dropdown for share actions in the sidebar
* close the dropdown for share actions in the sidebar

I will fix this after merging, when I am rebasing the PR to which this gets merged.

@phil-davis
Copy link
Contributor

I will merge this to feature/user-group-share-expiration when CI goes green. Then I will rebase/squash/sort-out the commits in feature/user-group-share-expiration. Then we can do a "final" review there.

@dpakach
Copy link
Contributor

dpakach commented Dec 17, 2019

@phil-davis one test is failing in drone but passing locally, I will try and find what's causing that.

@phil-davis
Copy link
Contributor

@phil-davis one test is failing in drone but passing locally, I will try and find what's causing that.

OK - if you have to push another commit, then you may as well also fix the test at SharingDialog.php line 133

@dpakach
Copy link
Contributor

dpakach commented Dec 17, 2019

@felixheidecke tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature:24 was failing in firefox. Currently we use older version of firefox (58.0). The dropdown doesn't works on that version but works on the recent one ( I tested firefox 71 and it worked). Does the older version needs to be supported?

@phil-davis phil-davis merged commit 47c4ef7 into feature/user-group-share-expiration Dec 17, 2019
@delete-merged-branch delete-merged-branch bot deleted the feature/user-group-share-expiration-consolidation branch December 17, 2019 10:33
@felixheidecke
Copy link
Contributor Author

@felixheidecke tests/acceptance/features/webUIRestrictSharing/restrictReSharing.feature:24 was failing in firefox. Currently, we use older version of firefox (58.0). The dropdown doesn't works on that version but works on the recent one ( I tested firefox 71 and it worked). Does the older version needs to be supported?

@dpakach Looks like @phil-davis decided that it doesn't need to be supported ;-)

@phil-davis
Copy link
Contributor

Yes, we talked about it. We manually tested in the latest Firefox and it works. We do not support every version of Firefox - so it would be "a bit random" to insist on fixing something on Firefox58 and other things might or might not work on Firefox42,57,59,60,61,...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants