Merge lp://qastaging/~stolowski/unity-scope-home/phone-disable-filters into lp://qastaging/unity-scope-home

Proposed by Paweł Stołowski
Status: Merged
Approved by: Francis Ginther
Approved revision: 183
Merged at revision: 174
Proposed branch: lp://qastaging/~stolowski/unity-scope-home/phone-disable-filters
Merge into: lp://qastaging/unity-scope-home
Diff against target: 954 lines (+519/-154)
13 files modified
configure.ac (+1/-1)
src/platform-info.vala (+14/-11)
src/scope-registry.vala (+2/-1)
src/scope.vala (+18/-6)
src/search-util.vala (+0/-11)
tests/fake-server/samples/remote-scopes-minimal.txt (+1/-0)
tests/unit/Makefile.am (+14/-3)
tests/unit/data/unity/scopes/masterscope_a.scope (+2/-2)
tests/unit/data/unity/scopes/masterscope_b.scope (+2/-2)
tests/unit/data/unity/scopes/more_suggestions.scope (+17/-0)
tests/unit/data/unity/scopes/reference.scope (+33/-0)
tests/unit/test-home-scope.vala (+221/-117)
tests/unit/test-utils.vala (+194/-0)
To merge this branch: bzr merge lp://qastaging/~stolowski/unity-scope-home/phone-disable-filters
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michal Hruby (community) Approve
Review via email: mp+187021@code.qastaging.launchpad.net

Commit message

Disable filter updates if phone factor is not 'desktop'.

Description of the change

Disable filter updates if phone factor is not 'desktop' (i.e. currently displayed categores are not reflected in the filters of Home view). This is required because UI in Unity 8 support single selection filters only (any selection made by the user will narrow results to single category in Home).

In addition, sort scope registry by scope id to give more sensible default order on the phone, until real category sorting works there.

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Could we see some tests for this? Not updating the filters seems a bit scary, does changing the query still reset them etc? Those things should be ensured by a test.

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

> Could we see some tests for this? Not updating the filters seems a bit scary,
> does changing the query still reset them etc? Those things should be ensured
> by a test.

Right, that was a bug; fixed.

As much as I'd love to add a test for it, I don't see a way to do it with a reasonable amount of effort due to the number of prerequisites or mocks needed.

The point of this change is to disable updates of filters in the UI from the backend (which only Home Scope does). The logic that sets scopes to query from SSS recommendations, always-search scopes or default view stays.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

222 + echo $(nodist_test_home_scope_SOURCES)

Would be nice to get rid of it :)

418 + Process.close_pid (server_pid);

I think this frees the handle on some systems, yet it's used later in stop(), fortunately it's a noop on linux, anyway, better remove it (or move to destructor to have super-clean code).

519 + var proxy = acquire_test_proxy (HOME_SCOPE_DBUS_NAME, HOME_SCOPE_DBUS_PATH);
520 + var channel_id = open_channel (proxy, ChannelType.GLOBAL, null);
521 +
522 + assert (channel_id != null);

Looks like something that should go into setup() + close_channel() in teardown().

80 + string? form_factor = scope_search.search_context.search_metadata.form_factor;

Micro-optimisation - turn this into unowned string.

I know this was a hard fight, but it really opens doors to have more thorough testing of the entire home-scope codebase... Well done! :)

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

+1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Autolanding failure caused by catching the archive in the middle of an update (hash sum mismatch). Re-approved.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: