Skip to content

Make the search box filter apps - #13439

Merged
DeepDiver1975 merged 2 commits into
masterfrom
app-filter
Feb 23, 2015
Merged

DeepDiver1975 merged 2 commits into
masterfrom
app-filter

Conversation

@icewind1991

Copy link
Copy Markdown
Contributor

Makes the search box filter apps in the app manager.

searches both name and description and sorts the description matches above the description matches

cc @DeepDiver1975 @jancborchardt @butonic

@LukasReschke

Copy link
Copy Markdown
Contributor

Image is flickering when typing something into the search box – but otherwise works fine 👍

Comment thread settings/js/apps.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe compile this once and cache it?

@jancborchardt

Copy link
Copy Markdown
Contributor

Nice, works well! Just two possible enhancements:

  1. As @LukasReschke mentioned, the app image flickers. Is not breaking but could be improved.
  2. Would be even better to filter all apps instead of only the current view. Prioritized by the currently selected view, but still showing the rest below. That way it’s a modeless search and you are more likely to get what you’re looking for.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Would be even better to filter all apps instead of only the current view. Prioritized by the currently selected view, but still showing the rest below. That way it’s a modeless search and you are more likely to get what you’re looking for.

That would be a bigger change - let's go for this approach - better then nothing ....

.... fix for the flicker is being pushed ...

@DeepDiver1975

Copy link
Copy Markdown
Contributor

failing unit tests are unrelated

@jancborchardt

Copy link
Copy Markdown
Contributor

Can we get the commits squashed please? ;)

@jancborchardt

Copy link
Copy Markdown
Contributor

The »No search result in other places« is not really needed it seems. And squash. Otherwise 👍

@PVince81

Copy link
Copy Markdown
Contributor

Can you add a JS unit test for that "filter" function ? Maybe create a new "appSpec.js" file (and add it to "tests/karma.config.js")

@DeepDiver1975

Copy link
Copy Markdown
Contributor

The »No search result in other places« is not really needed it seems. And squash. Otherwise 👍

both fixed now

@icewind1991 any news on the js unit tests?

@ghost

ghost commented Feb 18, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/9761/
Test PASSed.

@icewind1991

Copy link
Copy Markdown
Contributor Author

any news on the js unit tests?

Had a look at it but there doesn't seem to be any existing tests for the app managment nor does the code seem particular suitable for testing (all static) and I dont have enough experience with js testing to start from scratch

@PVince81

Copy link
Copy Markdown
Contributor

Okay, I'll take a look then.

Just noticed that you had a blast using underscore JS 😄

@PVince81

Copy link
Copy Markdown
Contributor

Note: static classes are easy to test in Javascript. One can use sinon.stub() to stub the static methods.

@PVince81

Copy link
Copy Markdown
Contributor

Done: e144d3a?w=1

I had to move the initialization block into a method and use the "if window.TESTING" hack for now.

@ghost

ghost commented Feb 23, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/9859/
Test PASSed.

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 4062 Issues, 116 Patches

DeepDiver1975 added a commit that referenced this pull request Feb 23, 2015
Make the search box filter apps
@DeepDiver1975
DeepDiver1975 merged commit 66e3211 into master Feb 23, 2015
@DeepDiver1975
DeepDiver1975 deleted the app-filter branch February 23, 2015 20:51
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants