lp:~knitzsche/scope-aggregator/fixes-fallback-bug-1599948

Created by Kyle Nitzsche and last modified
Get this branch:
bzr branch lp:~knitzsche/scope-aggregator/fixes-fallback-bug-1599948
Only Kyle Nitzsche can upload to this branch. If you are Kyle Nitzsche please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Kyle Nitzsche
Project:
scope-aggregator
Status:
Merged

Recent revisions

170. By Kyle Nitzsche

When testing photos scope I found an issue that this commit fixes.

Please review. The key change is line 1192.

DETAILS

The issue I noticed when testing this MP in photos-scope is that the art for
Douban LOGIN result did not display in photos agg scope.

I found that the fallback code (check_result_fallbacks()) was not called
for Duoban in the login case.

The general case I found is: For scopes that are declared in child_scopes.json
using the "scope" key, the check_results_callbacks() method was not called.

(Please note that fallbacks code/feature is only currently implemented
for scopes that use a renderer defined in common_templates.)

Teseting. Modify photos scope child_scopes.json to only this for Duoban:

        "scope": {
            "_category_title": "My Douban Photos",
            "id": "com.canonical.scopes.douban_doubanalbum",
            "local_id": "douban",
            "result_category_id_to_common_template": [
              {
                "result_category_id": "login",
                "common_template": "not_logged_in"
              }
            ],
            "renderer_common_id": "normal_renderer"
        }

This ^ means:
 * if Douban result category is "login": use common_template "not logged_in".
    This template uses a fallback:
            "id": "not_logged_in",
            "fallbacks":
            [
                {
                    "key": "mascot",
                    "fields":
                    [
                        {"field": "mascot"},
                        {"field": "art"}
                    ]
                }
            ],
    [...]
    Result is that Douban's login result which provides "art" is converted to
    "mascot".
* A result with any other category uses "normal_renderer". This does not use a
  fallback and expects the result to contain 'art".

169. By Kyle Nitzsche

fixes the fallback mechanism through which the aggregator scope
can attempt to find, for example, art in other result fields, for
example mascot, or emblem. There was an exception when a result
did not contain the primary field because in some cases the code
tried to access a field that did not exists.

168. By Kyle Nitzsche

fix fallback mechanism that all

167. By Kyle Nitzsche

clear setting_cardinalities vector before loading declarations into it
just to be sure.

166. By Kyle Nitzsche

remove reference to icond dir in cmake

165. By Gary.Wang

1.compile time optimization for string(QStringLiteral).
2.load the various json files once aggregator scope startup.
3.specify 'const' keyword for some variable in some cases.
4.pass by reference instead of by value if possible.
5.don't allocated memory(make_shared) based on local variable to avoid copy constructor.
6 remove duplicate obj creation.
7.fix invalid pointer for us::Category::SCPtr when look_up is called.
8.remove redundant files.

164. By Kyle Nitzsche

scope-agg projects no longer require a separate hints child scope to
provide quick start help or to provide the no netork of the no location
message. All scopes rebasing on 4.8 must change their hints.json file
since the structure is now chagned.

See 4.8-rebase-local-hints-README.md for complete details.

163. By Kyle Nitzsche

merge branch with many changes:
* in handle_child_scope_results(), check if the query is still
  valid. If not, then return.
* do not save ptrs to categories. Instead, use from shell if already registered, else register and then use it from shell.
* feature testing with some new parts and some fixes

162. By Kyle Nitzsche

release 4.6: strip binary per 1570568

161. By Gary.Wang

1.Fix duplicated scope ids issue(lp:1554411) which blocks child scopes search)
2.Fix compiler warning

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:scope-aggregator
This branch contains Public information 
Everyone can see this information.

Subscribers