Merge lp:~brandontschaefer/unity/fix-711199 into lp:unity
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2012-03-13 |
| Approved revision: | 1915 |
| Merged at revision: | 2093 |
| Proposed branch: | lp:~brandontschaefer/unity/fix-711199 |
| Merge into: | lp:unity |
| Diff against target: |
300 lines (+147/-6) 5 files modified
plugins/unityshell/src/DashView.cpp (+36/-5) plugins/unityshell/src/DashView.h (+3/-0) plugins/unityshell/src/LensView.cpp (+58/-1) plugins/unityshell/src/LensView.h (+5/-0) tests/autopilot/autopilot/tests/test_dash.py (+45/-0) |
| To merge this branch: | bzr merge lp:~brandontschaefer/unity/fix-711199 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | Approve on 2012-03-13 | ||
| Alex Launi (community) | Approve on 2012-03-07 | ||
| Michal Hruby (community) | Approve on 2012-03-05 | ||
| Marco Trevisan (Treviño) | Approve on 2012-03-04 | ||
| Brandon Schaefer (community) | Approve on 2012-03-02 | ||
|
Review via email:
|
|||
Description of the Change
= Problem description =
If no results are returned from a lens there is no message informing the user so.
= The fix =
In DashView:
shown.
A default message is used if the lens doesn't provide one.
There is also a timer that waits for 150ms then hides the
message, if the search is taking a while.
= Test coverage =
There is an autopilot test for this now!
| Brandon Schaefer (brandontschaefer) wrote : | # |
| Tim Penhey (thumper) wrote : | # |
Why check for
if (active_
at the start of DashView:
Small style issue, no space before (hints).
plese use:
nux::color::White
instead of:
nux::
Instead of using += on a std::string, use a string stream.
#include <sstream>
std::stringstream sout;
sout << "<span size='larger' weight='bold'>";
//...
sout << g_variant_
//...
sout << "Sorry, there is nothing that matches your search.";
//...
sout << "</span>";
LOG_DEBUG(logger) << "The no-result-hint is: " << sout.str();
no_results_
How does the normal results view get shown again?
| Brandon Schaefer (brandontschaefer) wrote : | # |
I was checking active_
Fixed style problems (there were other style errors; now fixed!), now using nux::color::White, and now markup uses sstream!
As for the normal results view, it is still getting shown how it normally does. The no-result-message is apart of the same layout so when the results == 0 the layout is empty. Then I change the layouts ContentDistribution to nux::MAJOR_
| Michal Hruby (mhr3) wrote : | # |
89 + markup << g_variant_
Values in the Hints map are instances of unity::
93 + markup << "Sorry, there is nothing that matches your search.";
This needs to be marked for translation - just use _("Sorry, ...")
| Michal Hruby (mhr3) wrote : | # |
Also there could be an issue with hiding the message - currently it's only shown or hidden when the SearchFinishes, which means that this can happen:
If you're searching with a lens/scope that is really slow and is adding results one by one and finishes in let's say 5seconds, you can end up seeing the "Sorry, ..." message for the entire 5 seconds while it's searching and just then the message will disappear.
A solution to this would be to hide the message as soon as the search starts, but that again brings an issue that the search might finish in 10ms with no results, and the message will flicker. A proper solution will probably have to use a timer similar to what the search bar spinner is doing (it starts spinning after ~150ms after the search starts).
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
I also guess you can easily write an autopilot test to check this. Just add a a value for no_results_active_ to the introspection wrapper, and check it with the AP suite ;)
| Michal Hruby (mhr3) wrote : | # |
| Michal Hruby (mhr3) wrote : | # |
84 + g_source_
100 + g_source_
You should set the id to 0 after these calls.
| Brandon Schaefer (brandontschaefer) wrote : | # |
@Michal opps, I fixed that but forgot to push those changes...like a month ago haha.
- 1907. By Brandon Schaefer on 2012-03-03
-
trunk
- 1908. By Brandon Schaefer on 2012-03-03
-
* Added an autopilot test and removed the manual onew
- 1909. By Brandon Schaefer on 2012-03-03
-
* Sleep added after kb.type()
- 1910. By Brandon Schaefer on 2012-03-03
-
* Split the autopilot test
- 1911. By Brandon Schaefer on 2012-03-03
-
Mixed names up
| Marco Trevisan (Treviño) (3v1n0) wrote : | # |
Tests are good, maybe instead of just searching for 'a' you could make it look for a real default application, so it will also indirectly test that lens is working :)
- 1912. By Brandon Schaefer on 2012-03-04
-
*Changed autopilot search string
- 1913. By Brandon Schaefer on 2012-03-05
-
merged trunk
| Michal Hruby (mhr3) wrote : | # |
There is still one/two rare corner cases where the message could be displayed while also results are, but that can be solved in a later merge. Approve from me.
- 1914. By Brandon Schaefer on 2012-03-08
-
merge trunk
- 1915. By Brandon Schaefer on 2012-03-09
-
Removed comments added by me...


Need to not use a work around for the start up problem. Looking into removing the call in LensView: bazaar. launchpad. net/~unity- team/unity/ trunk/view/ head:/plugins/ unityshell/ src/LensView. cpp#L350
http://
Removing that if statement which calls Search("") and OnSearchFinished is getting emitted with 0 results for ALL lenses, even though they have them. So far testing shows this code can be removed, but want to do more testing by killing the lenses and restarting them.