Brion VIBBER has submitted this change and it was merged.
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/Nearby/NearbyViewController.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
4 files changed, 24 insertions(+), 2 deletions(-)
Approvals:
Brion VIBBER: Looks good to me, approved
diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h
index df8048e..1157740 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 ENABLE_FULL_TEXT_SEARCH NO
+#define ENABLE_WIKIDATA_DESCRIPTIONS NO
+
+
diff --git a/wikipedia/View Controllers/Nearby/NearbyViewController.m
b/wikipedia/View Controllers/Nearby/NearbyViewController.m
index c277bc1..86150c2 100644
--- a/wikipedia/View Controllers/Nearby/NearbyViewController.m
+++ b/wikipedia/View Controllers/Nearby/NearbyViewController.m
@@ -274,7 +274,7 @@
}
// Fetch WikiData short descriptions.
- if (wikiDataIds.count > 0){
+ if ((wikiDataIds.count > 0) && ENABLE_WIKIDATA_DESCRIPTIONS){
(void)[[WikiDataShortDescriptionFetcher alloc]
initAndFetchDescriptionsForIds: wikiDataIds
searchType: SEARCH_TYPE_NEARBY
withManager: [QueuesSingleton sharedInstance].nearbyFetchManager
diff --git a/wikipedia/View Controllers/SearchResults/SearchResultsController.m
b/wikipedia/View Controllers/SearchResults/SearchResultsController.m
index 2788bb7..9776275 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) && 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(!ENABLE_FULL_TEXT_SEARCH) 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..6736242 100644
--- a/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
+++ b/wikipedia/View Controllers/SearchResults/SearchTypeMenu.m
@@ -74,6 +74,16 @@
-(void)didMoveToSuperview
{
+ if (!ENABLE_FULL_TEXT_SEARCH) {
+ //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: merged
Gerrit-Change-Id: I8e6916208bd59efedb5155357a5e363b1058b159
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits