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

[full-ci] Search and filter #5415

Merged
merged 2 commits into from
Jul 29, 2021
Merged

[full-ci] Search and filter #5415

merged 2 commits into from
Jul 29, 2021

Conversation

fschade
Copy link
Contributor

@fschade fschade commented Jun 29, 2021

Description

as described in issue #5419 we reworked how searching and or filtering files is working.
It's important to differentiate between filtering and searching.

Filtering

this option 'search current folder' filters the current folder for the given term, it is inplace and has no dedicated search result page. It just mutates the current view and displays the filtered result from current folder. It previews the results under the search input.

It has a simple query language but will adopt ios-app dictionary in a later step (separate PR).

Searching

searching 'search all files' at the moment is only available if the backend is oc10 and uses the owcloud-sdk under the hood.
It also previews the results while typing. The results will be displayed in a dedicated search result page and includes all matching files.

Architecture

as mentioned the search now is an app on it own. The decision to extract it was made from the requirement that other apps (third party or core apps) needed the ability to register/inject own searches into the global available search or the search can be replaced entirely.

Following cases are valid:

  • a app want to only search for its own entities (a account search for example)
  • a preview of a result entity has different look and feel // parameters (folder name and path vs account name and role)
  • some searches have real results others only want to mutate the current view with the search term (filter for example)

The given implementation makes all of this possible by implementing the SearchProvider interface and register it to the search application.

To make all of this work applications needed a way to communicate between each other.
To mention just a few following concepts where introduced:

on top of this this introduces the use of typescript decorators and ship a first decorator in the web-pkg (debounce).

All this is not breaking and backward compatible. It works with filtering and does not affect vuex.

Related Issue

Motivation and Context

we needed search and filter similar to github.

How Has This Been Tested?

  • manual oc10 (docker)
  • manual ocis (docker, local)

Screenshots (if appropriate):

Search (oc10)

Bildschirmfoto 2021-06-30 um 12 38 32

Bildschirmfoto 2021-06-30 um 12 39 48

Filter (oc10 and ocis)

Bildschirmfoto 2021-06-30 um 12 38 07

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Document how to implement a search (interfaces and components)
  • Write more tests
  • Align layout
  • Todo comments
  • Use correct types

@update-docs
Copy link

update-docs bot commented Jun 29, 2021

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.

@ownclouders
Copy link
Contributor

Results for oCISSharingBasic https://drone.owncloud.com/owncloud/web/16968/47/1
The following scenarios passed on retry:

  • webUIRestrictSharing/restrictSharing.feature:49

@ownclouders
Copy link
Contributor

Results for oC10XGAPortrait1 https://drone.owncloud.com/owncloud/web/16968/40/1
💥 The acceptance tests pipeline failed. The build has been cancelled.

@ownclouders
Copy link
Contributor

Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/16972/62/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFilesSearch-search-feature-27.png

webUIFilesSearch-search-feature-27.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@fschade fschade mentioned this pull request Jun 30, 2021
8 tasks
@fschade fschade marked this pull request as ready for review July 1, 2021 10:56
@ownclouders
Copy link
Contributor

Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/17001/62/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFilesSearch-search-feature-27.png

webUIFilesSearch-search-feature-27.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@ownclouders
Copy link
Contributor

Results for oCISSharingBasic https://drone.owncloud.com/owncloud/web/17004/47/1
The following scenarios passed on retry:

  • webUIRestrictSharing/restrictSharing.feature:49

@ownclouders
Copy link
Contributor

Results for oC10XGAPortrait1 https://drone.owncloud.com/owncloud/web/17004/40/1
💥 The acceptance tests pipeline failed. The build has been cancelled.

@ownclouders
Copy link
Contributor

Results for oC10Files1 https://drone.owncloud.com/owncloud/web/17012/10/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFiles-options-feature-14.png

webUIFiles-options-feature-14.png

webUIFiles-options-feature-21.png

webUIFiles-options-feature-21.png

webUIFiles-options-feature-31.png

webUIFiles-options-feature-31.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@ownclouders
Copy link
Contributor

Results for oCISSharingBasic https://drone.owncloud.com/owncloud/web/17013/47/1
The following scenarios passed on retry:

  • webUIRestrictSharing/restrictSharing.feature:49

@ownclouders
Copy link
Contributor

Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/17013/62/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFilesSearch-search-feature-27.png

webUIFilesSearch-search-feature-27.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@ownclouders
Copy link
Contributor

Results for oCISSharingBasic https://drone.owncloud.com/owncloud/web/17024/47/1
The following scenarios passed on retry:

  • webUIRestrictSharing/restrictSharing.feature:49

@ownclouders
Copy link
Contributor

Results for oC10Files1 https://drone.owncloud.com/owncloud/web/17024/10/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFiles-options-feature-14.png

webUIFiles-options-feature-14.png

webUIFiles-options-feature-21.png

webUIFiles-options-feature-21.png

webUIFiles-options-feature-31.png

webUIFiles-options-feature-31.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

What exactly, apart from a rebase, is needed to get this PR done? Are the open tasks accurate? Or can we keep it simpler and merge this ASAP, taking care of e.g. documentation in a separate PR?

changelog/unreleased/enhancement-add-custom-search-service Outdated Show resolved Hide resolved
@fschade
Copy link
Contributor Author

fschade commented Jul 26, 2021

What exactly, apart from a rebase, is needed to get this PR done? Are the open tasks accurate? Or can we keep it simpler and merge this ASAP, taking care of e.g. documentation in a separate PR?

We need to work on the mobile view, then we’re good to go.

@pascalwengerter pascalwengerter changed the title [DRAFT] Search and filter Search and filter Jul 26, 2021
@ownclouders
Copy link
Contributor

Results for oC10SharingInternalUsersSharingIndicator https://drone.owncloud.com/owncloud/web/17699/27/1
The following scenarios passed on retry:

  • webUISharingInternalUsersSharingIndicator/shareWithUsers.feature:154

@ownclouders
Copy link
Contributor

Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/17699/64/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFilesSearch-search-feature-27.png

webUIFilesSearch-search-feature-27.png

💥 The acceptance tests pipeline failed. The build has been cancelled.

@pascalwengerter pascalwengerter changed the title Search and filter [full-ci] Search and filter Jul 27, 2021
@ownclouders
Copy link
Contributor

Results for oCISFiles1 https://drone.owncloud.com/owncloud/web/17701/51/1

💥 Visual regression tests failed. Please find the screenshots inside ...

Diff Image:

topBar.png
Actual Image:

topBar.png
Comparing Against:

topBar.png

@ownclouders
Copy link
Contributor

Results for oC10Files1 https://drone.owncloud.com/owncloud/web/17701/11/1

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFiles-options-feature-21.png

webUIFiles-options-feature-21.png

webUIFiles-options-feature-31.png

webUIFiles-options-feature-31.png

webUIFiles-options-feature-7.png

webUIFiles-options-feature-7.png

@ownclouders
Copy link
Contributor

Results for oC10Files2 https://drone.owncloud.com/owncloud/web/17701/12/1

💥 Visual regression tests failed. Please find the screenshots inside ...

Diff Image:

topBar.png
Actual Image:

topBar.png
Comparing Against:

topBar.png

💥 The acceptance tests failed. Please find the screenshots inside ...

webUIFilesDetails-fileDetails-feature-107.png

webUIFilesDetails-fileDetails-feature-107.png

webUIFilesDetails-fileDetails-feature-124.png

webUIFilesDetails-fileDetails-feature-124.png

webUIFilesDetails-fileDetails-feature-74.png

webUIFilesDetails-fileDetails-feature-74.png

webUIFilesDetails-fileDetails-feature-90.png

webUIFilesDetails-fileDetails-feature-90.png

webUIFilesList-fileList-feature-15.png

webUIFilesList-fileList-feature-15.png

webUIFilesSearch-search-feature-129.png

webUIFilesSearch-search-feature-129.png

webUIFilesSearch-search-feature-139.png

webUIFilesSearch-search-feature-139.png

webUIFilesSearch-search-feature-145.png

webUIFilesSearch-search-feature-145.png

webUIFilesSearch-search-feature-173.png

webUIFilesSearch-search-feature-173.png

webUIFilesSearch-search-feature-38.png

webUIFilesSearch-search-feature-38.png

webUIFilesSearch-search-feature-50.png

webUIFilesSearch-search-feature-50.png

@ownclouders
Copy link
Contributor

Results for oC10SharingInternalGroupsSharingIndicator https://drone.owncloud.com/owncloud/web/17730/23/1
The following scenarios passed on retry:

  • webUISharingInternalGroupsToRootSharingIndicator/shareWithGroups.feature:104

packages/web-app-files/src/index.js Outdated Show resolved Hide resolved
packages/web-pkg/src/event/bus.ts Show resolved Hide resolved
packages/web-runtime/tests/unit/components/TopBar.spec.js Outdated Show resolved Hide resolved
packages/web-pkg/src/event/bus.spec.ts Outdated Show resolved Hide resolved
packages/web-pkg/src/decorator/debounce.spec.ts Outdated Show resolved Hide resolved
packages/web-pkg/src/event/bus.spec.ts Outdated Show resolved Hide resolved
packages/web-pkg/src/instance/index.spec.ts Outdated Show resolved Hide resolved
packages/web-app-search/src/views/List.vue Outdated Show resolved Hide resolved
packages/web-app-search/src/index.ts Outdated Show resolved Hide resolved
@fschade fschade force-pushed the search branch 2 times, most recently from 46101c8 to 7039fb4 Compare July 28, 2021 16:50
@ownclouders
Copy link
Contributor

Results for oC10SharingInternalUsersSharingIndicator https://drone.owncloud.com/owncloud/web/17759/27/1
The following scenarios passed on retry:

  • webUISharingInternalUsersSharingIndicator/shareWithUsers.feature:154

@ownclouders
Copy link
Contributor

Results for oC10SharingInternalUsers https://drone.owncloud.com/owncloud/web/17759/24/1
The following scenarios passed on retry:

  • webUISharingInternalUsersShareWithPage/shareWithUsers.feature:91

introduce search for files app in oc10
introduce filtering files app in oc10 and ocis
introduce ability to inject searches with preview for third party applications
remove searchBar from runtime
add searchBar portal to runtime
introduce eventBus
introduce typescript decorators
implement debounce decorator
add dedicated selenium docker image which is able to render indic fonts
update oc10 test docker entrypoint to work with oc10 10.8
@kulmann kulmann mentioned this pull request Jul 29, 2021
20 tasks
@sonarcloud
Copy link

sonarcloud bot commented Jul 29, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

72.5% 72.5% Coverage
0.0% 0.0% Duplication

@ownclouders
Copy link
Contributor

Results for oC10SharingInternalGroupsSharingIndicator https://drone.owncloud.com/owncloud/web/17787/23/1
The following scenarios passed on retry:

  • webUISharingInternalGroupsToRootSharingIndicator/shareWithGroups.feature:104

@ownclouders
Copy link
Contributor

Results for oC10SharingInternalUsersSharingIndicator https://drone.owncloud.com/owncloud/web/17787/27/1
The following scenarios passed on retry:

  • webUISharingInternalUsersToRootSharingIndicator/shareWithUsers.feature:98

Copy link
Contributor

@pascalwengerter pascalwengerter left a comment

Choose a reason for hiding this comment

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

Happy to merge once CI is 🟢

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Awesome work! ❤️

@pascalwengerter pascalwengerter merged commit 21d4d32 into master Jul 29, 2021
@delete-merged-branch delete-merged-branch bot deleted the search branch July 29, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants