Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24975] Windows: SearchBar should show No Results text if there are no results in a search

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-11-16T01:46:26.000+0000
Affected Version/sRelease 6.1.1
Fix Version/sRelease 7.0.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-07-18T09:46:09.000+0000
Updated2017-11-16T01:46:41.000+0000

Description

According to the UWP Design and Pattern guidelines for AutoSuggestBox, when there are no results shown there should be a single result shown saying 'No Results' (or something similar), currently we do not display anything, while that behaviour is different to our Android implementation (not sure on iOS), we should adhere to the platforms guidelines https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/auto-suggest-box (see Do's and Don'ts)
var _window = Ti.UI.createWindow({ backgroundColor: 'green' });
var searchBar = Ti.UI.createSearchBar();
var data = [];

for (var i = 0; i < 25; i++) {
    data.push({ title: Row ${i} });
}
var tableView = Ti.UI.createTableView({
    search: searchBar,
    data: data
});
_window.add(tableView);
_window.open()

Comments

  1. Ewan Harris 2017-07-18

    I think there are two different paths to this that we need to consider * Developer has the SearchBar tied to a TableView or ListView and user submits the query ** We need to append a row that lists No Results for <search> or No Results (see the app search on Windows 10 Mobile for this) - maybe this is tied to whether they use * User is searching in the SearchBar for something with no results ** We need to display No Results for <search> or No Results in the SearchBar results section (see the search in the Settings app on desktop or mobile)
  2. Ewan Harris 2017-07-18

    It also just occurred to me that if we do this in source ourselves it would more than likely be completely lacking support i18n, maybe we could add a Windows only property (and i18n property) to allow a user specify the text to be shown to a user when there are no results from the search?
  3. Kota Iguchi 2017-08-22

    https://github.com/appcelerator/titanium_mobile_windows/pull/1081
  4. Abir Mukherjee 2017-11-16

    Passed FR! Using this environment: Node Version: 8.9.1 NPM Version: 5.5.1 Windows OS 10.0.14393 Appc CLI: 7.0.0-master.13 Appc CLI NPM: 4.2.11-2 Titanium SDK version: 7.0.0.v20171115153702 Appcelerator Studio vers 4.10.0 Windows Phone 10.0.15063

JSON Source