Mhurd has uploaded a new change for review.
https://gerrit.wikimedia.org/r/177087
Change subject: Set flags to hide wikidata descriptions and full text search
option.
......................................................................
Set flags to hide wikidata descriptions and full text search option.
Both of these features await some minor refinements before they
are ready for market. In the mean time, we need to push to market
to fix the javascript bridge freezing bug :)
Change-Id: I8e6916208bd59efedb5155357a5e363b1058b159
---
M wikipedia/Defines/Defines.h
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
3 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia
refs/changes/87/177087/1
diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h
index df8048e..03243e3 100644
--- a/wikipedia/Defines/Defines.h
+++ b/wikipedia/Defines/Defines.h
@@ -69,3 +69,12 @@
#define SEARCH_DELAY_PREFIX 0.4
#define SEARCH_DELAY_FULL_TEXT 1.0
+// Temporary flags for hiding full text search interface and wikidata
+// descriptions (in search results) until both are production ready.
+// Full text search interface has a couple UX changes brewing and
+// wikidata awaits api "prop=pageterms" going live so we don't have
+// to do separate non-performant request to get descriptions.
+#define SEARCH_ENABLE_FULL_TEXT NO
+#define SEARCH_ENABLE_WIKIDATA_DESCRIPTIONS NO
+
+
diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index 2788bb7..e5694a8 100644
--- a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
+++ b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
@@ -392,7 +392,7 @@
}
// Fetch WikiData short descriptions.
- if (wikiDataIds.count > 0){
+ if (wikiDataIds.count > 0 &&
SEARCH_ENABLE_WIKIDATA_DESCRIPTIONS){
(void)[[WikiDataShortDescriptionFetcher alloc]
initAndFetchDescriptionsForIds: wikiDataIds
searchType: searchResultFetcher.searchType
withManager: [QueuesSingleton sharedInstance].searchResultsFetchManager
@@ -418,6 +418,9 @@
&&
(searchResultFetcher.searchReason !=
SEARCH_REASON_SEARCH_TYPE_MENU_TAPPED)
){
+
+ if(!SEARCH_ENABLE_FULL_TEXT) return;
+
// Note: the search button is not switched until
"performSearch:" is
// invoked as a result of the
"searchAfterDelay:reason:" call below.
// That way the users can see the "No search results"
message in association
diff --git a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
index 045612f..b67e54a 100644
--- a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
+++ b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
@@ -74,6 +74,16 @@
-(void)didMoveToSuperview
{
+ if (!SEARCH_ENABLE_FULL_TEXT) {
+ //self.backgroundColor = [UIColor clearColor];
+ self.searchType = self.searchType;
+ [self.superview addConstraints:[NSLayoutConstraint
constraintsWithVisualFormat: @"V:[self(1)]"
+
options: 0
+
metrics: nil
+
views: @{@"self": self}]];
+ return;
+ }
+
self.backgroundColor = BACKGROUND_COLOR;
self.searchButtonTitles = [[PaddedLabel alloc] init];
--
To view, visit https://gerrit.wikimedia.org/r/177087
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e6916208bd59efedb5155357a5e363b1058b159
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits