-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add url parameter which open a specific details tab right away #32152
Add url parameter which open a specific details tab right away #32152
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32152 +/- ##
============================================
- Coverage 63.9% 63.9% -0.01%
- Complexity 18547 18548 +1
============================================
Files 1169 1169
Lines 69730 69732 +2
Branches 1267 1267
============================================
+ Hits 44559 44560 +1
- Misses 24802 24803 +1
Partials 369 369
Continue to review full report at Codecov.
|
apps/files/js/app.js
Outdated
@@ -87,6 +87,7 @@ | |||
fileActions: fileActions, | |||
allowLegacyActions: true, | |||
scrollTo: urlParams.scrollto, | |||
details: urlParams.details, |
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.
I suggest a more precise name for the option key like "detailTabId".
and the URL param could be "detail"
apps/files/js/filelist.js
Outdated
@@ -2519,10 +2518,14 @@ | |||
this.$el.find('.mask').remove(); | |||
this.$table.removeClass('hidden'); | |||
}, | |||
scrollTo:function(file) { | |||
scrollTo:function(file, detailsTab) { |
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.
see, here you called it detailsTab
... call it detailsTabId
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.
Looks fine, as discussed.
After renaming the vars you can move on to unit tests. Good luck 😄
f1fab2a
to
e97c96a
Compare
Teach me, master |
argh, seems we don't have tests for scrollto either. one idea is to add a new group of tests (in
|
It looks like it wants a webUI acceptance test. |
@PVince81 @phil-davis I'm lost .... ;-) @PVince81 js test or web acceptance test? I see more value in web acceptance tests for this. |
I can make a webUI acceptance test. I will look this evening. I am doing a presentation on BDD and automated testing at a Pokhara developers meetup on Saturday, so implementing this will be a good little example that I can use. You guys decide on the query parameter naming first (=requirements)! |
fine by me, let's do the web UI acceptance test then |
Assigned self to add webUI automated test. |
e97c96a
to
a5ed65a
Compare
webUI tests have been added to test direct browsing to the comments, share and versions tabs of a file in the top-level directory, and in a sub-folder. They pass locally for me, hopefully CI likes them. @individual-it please review. |
$this->featureContext->getCurrentUser(), $this->getCurrentFolderFilePath() | ||
); | ||
$this->visitPath( | ||
$this->featureContext->getBaseUrl() . '/index.php/apps/files/?dir=' . $folderName . '&fileid=' . $fileId . '&details=' . $tabName |
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.
- a pretty long line
- this can be put in the pageObject
/index.php/apps/files/
is already in there
What does not work is trying to browse directly to open the share or comments tab of a folder:
where 2147506251 is the file id of a folder that is in the top The UI redirects to open the folder. But manually in the UI I can click "..." "Details" or "Sharing" for a folder and share the folder or make comments about the folder. What is the requirement? |
*/ | ||
public function isDetailsPanelVisible($tabName) { | ||
try { | ||
$visible = $this->findById($tabName)->isVisible(); |
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.
you have to check here if findById()
returns null
because that line might explode with calling isVisible() on null
I need to have a look at this ..... THX for testing! |
@DeepDiver1975 if browsing directly to a folder's sharing details tab is a requirement, then I can easily add test scenarios for that that fail - and you can make it pass! |
I don't need it for my initial requirement - I need this only to work on files. |
Well - if the file id of a folder is in the url the folder itself is opened - opening any tab does not really work with this respect. Notjhing to do from my pov |
As long as it is not a requirement, then no problem that you can't open the sharing details of a folder directly by URL. I have some timing issue in the tests - mostly they fail on drone, probably because it does not wait long enough for the preview to get rendered in the details pane. And one of the checks in the test scenarios is that the preview is there. I will look at that... |
e75a467
to
a941a44
Compare
@individual-it please review webUI acceptance tests again. |
182127e
to
5b9c682
Compare
5b9c682
to
058eaa3
Compare
acceptance tests look fine 👍 |
@PVince81 ready for your review again... |
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.
👍
objections in backporting? Once we make wopi work with oc10 we will need this ... |
raised documentation ticket: https://github.com/owncloud/documentation/issues/4331 |
@DeepDiver1975 please backport, it's a nice addition |
Backport |
This fixes #265 and relates to owncloud/core#32152. It details the ability to open one of three file sidebars (versions, comments, and shares) by using a permalink.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This adds a url parameter to the files app which will open the details view and a specified tab for the given file in the scrollto parameter
Motivation and Context
We need to open the share tab via url directly. Needed by the office online integration
How Has This Been Tested?
Manually
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: