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

Expose currently active file list though OCA.Files.App #17536

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Oct 14, 2019

Expose the currently active file list though OCA.Files.App to allow interaction with the current file list. Right now only OCA.Files.App.fileList (which is the same as window.FileList) are exposed but they always point to the all files list.

apps/files/js/app.js Outdated Show resolved Hide resolved
apps/files/js/app.js Outdated Show resolved Hide resolved
@faily-bot
Copy link

faily-bot bot commented Aug 25, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 32313: failure

acceptance-app-files

  • tests/acceptance/features/app-files.feature:262
Show full log
  Scenario: unmarking a file as favorite causes the file list to be sorted again                          # /drone/src/tests/acceptance/features/app-files.feature:262
    Given I am logged in                                                                                  # LoginPageContext::iAmLoggedIn()
    And I create a new folder named "A name alphabetically lower than welcome.txt"                        # FileListContext::iCreateANewFolderNamed()
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()
    And I close the details view                                                                          # FilesAppContext::iCloseTheDetailsView()
    And I see that the details view is closed                                                             # FilesAppContext::iSeeThatTheDetailsViewIsClosed()
    And I mark "welcome.txt" as favorite                                                                  # FileListContext::iMarkAsFavorite()
    And I see that "welcome.txt" is marked as favorite                                                    # FileListContext::iSeeThatIsMarkedAsFavorite()
    And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()
    When I unmark "welcome.txt" as favorite                                                               # FileListContext::iUnmarkAsFavorite()
    Then I see that "welcome.txt" is not marked as favorite                                               # FileListContext::iSeeThatIsNotMarkedAsFavorite()
      Not favorited state icon for file welcome.txt in file list could not be found after 100 seconds (NoSuchElementException)
    And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list # FileListContext::iSeeThatPrecedesInTheFileList()

@skjnldsv
Copy link
Member

For what do you need this?
I'm cautious to add new specific 'apis' to files as this will make it harder to migrate everything to vue

@juliusknorr
Copy link
Member Author

For what do you need this?

This would allow to trigger updates of the file list from apps even if it is not the All files view that is used. E.g. when a file is saved in Collabora we trigger a reload of the filelist in the background so that the view is updated once closed.

I'm cautious to add new specific 'apis' to files as this will make it harder to migrate everything to vue

Yes, this is only an intermediate step and will require apps that use it to adjust when the files app is being migrated. However those apps already rely heavily on the FileList object so those would need to be migrated anyways then.

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 26, 2020
@skjnldsv skjnldsv merged commit cb2695d into master Aug 26, 2020
@skjnldsv skjnldsv deleted the enh/noid/expose-current-filelist branch August 26, 2020 09:57
@rullzer rullzer mentioned this pull request Aug 26, 2020
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants