-
Notifications
You must be signed in to change notification settings - Fork 157
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
Fix share expiration date change #3241
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
ce901c6
to
09589c3
Compare
Acceptance tests are missing. @kulmann do you want the QA-team to add tests? |
09589c3
to
ff8fa9e
Compare
@individual-it yes, that would be great, thanks! 👍 |
@kulmann is it alright if I take over this PR to write some test and make CI happy? |
yes, awesome, thanks! |
f6a25d2
to
cf34879
Compare
this test (and one similar) fail because it used to be possible to select an invalid date and then click save the share, but now the invalid dates are greyed out
@kulmann Is that is an expected outcome of your changes? |
cf34879
to
3e4e6ce
Compare
@individual-it @Talank the greyed out invalid dates were like that before. I'm only showing the error alert at the top of the sidebar if the API throws an error on saving. There could be other errors on saving as well, not only expiration date related. But for expiration dates the error is not reproducible anymore, because as we learned yesterday a) saving an unchanged invalid date doesn't throw an error anymore The only edge case I can think of is, that an admin shortens the enforced expiration date period AFTER the user has loaded the UI. In that case the user would be able to select an invalid expiration date and receive the error message. IMHO not worth the effort to write tests for it. The more important test in this case is on the API level, not on the UI level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Talank or @individual-it could you please clarify the comment I added? Other than that nice work! 👍
1f6811d
to
7875993
Compare
7875993
to
d9962c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise LGTM. If tests are completely done then feel free to merge 👍
Description
As pointed out in the linked issue we were not showing errors when saving shares in an invalid state. Instead we were going back to the sidebar panel, leaving the user with the impression that the share was saved successfully. Now we show errors that were raised when saving the share - same style as in the public link editing sidebar panel.
While fixing this I noticed, that the public link editing sidebar panel didn't react properly to forced expiration dates anymore (calendar plugin was not picking up the enforced date and the input field was missing the
(required)
label). So I fixed that as well and applied the same (code) style as in the collaborators editing sidebar panel.Related Issue
Motivation and Context
Saving shares should show errors if any were raised.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: