[MediaWiki-commits] [Gerrit] update css from live - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/149118 Change subject: update css from live .. update css from live Change-Id: I00cdd1493840109f64bd8c1b15fd5378ac4c963c --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/18/149118/1 diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 67fc7de..72cd4ad 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -283,7 +283,7 @@ } a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); - background-image: url(//bits.wikimedia.org/static-1.24wmf13/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-10T15:10:00Z)!ie; + background-image: url(//bits.wikimedia.org/static-1.24wmf14/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-17T16:45:00Z)!ie; /* We don't need the !ie hack because this old IE uses the fallback already */ background-image: -webkit-linear-gradient(transparent,transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGRlZnM+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNLS45NTgtNC4yNTljLTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2IDAgLjM5NC4xNDMuNzM2LjMzNiAxLjA0OWwtLjA3LjA1NmMtLjM3My0uNTEzLS45NTQtLjg2Ny0xLjYzNi0uODY3LTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2cy45MjIgMi4wNTYgMi4wNTYgMi4wNTZjLjU5NiAwIDEuMTIxLS4yNjUgMS40OTYtLjY3MS0uMDc1LjIxMy0uMTI2LjQzMy0uMTI2LjY3MSAwIDEuMTM0LjkyMiAyLjA1NiAyLjA1NiAyLjA1NnMyLjA1Ni0uOTIyIDIuMDU2LTIuMDU2YzAtLjQ3Ni0uMTg5LS44OTYtLjQ2Mi0xLjI0NS44MTMuMTU4IDEuNjI3LjQ3NyAyLjIyNCAxLjM5OS0uNDQzLS40NDMtLjcyNy0xLjI0OC0uNzI3LTIuMzM2bC0uMzc4LS4wMjguMzUtLjAxNGMwLTEuMDg3LjI3LTEuODkzLjcxMy0yLjMzNi0uNTc1Ljg4OS0xLjM1NCAxLjIxNi0yLjE0IDEuMzg1LjI0My0uMzM3LjQyLS43MjguNDItMS4xNzUgMC0xLjEzNC0uOTIyLTIuMDU2LTIuMDU2LTIuMDU2eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNMC0yLjgyOGwtMi44MjggMi44MjggMi44MjggMi44MjggMi44MjgtMi44MjgtMi44MjgtMi44Mjh6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSJOYU4iLz48L21hcmtlcj48bWFya2VyIG9yaWVudD0iYXV0byIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0xMCAwbDQtNC0xNCA0IDE0IDQtNC00eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PC9kZWZzPjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzA2YyIgZD0iTS41IDMuNTE4aDUuOTgydjUuOTgyaC01Ljk4MnoiLz48cGF0aCBkPSJNNC43NTUtLjE2aDUuMjM0djUuMzlsLTEuNTcxIDEuNTQ0LTEuMzEtMS4zMS0yLjcyNSAyLjcyNS0yLjY4OC0yLjY4OCAyLjgwOC0yLjgwOC0xLjMxLTEuMzF6IiBmaWxsPSIjMDZmIi8+PHBhdGggZD0iTTguOTg0Ljg0NWwuMDIyIDQuODg0LTEuODE3LTEuODE3LTIuODgxIDIuODgxLTEuMjI3LTEuMjI3IDIuODgxLTIuODgxLTEuODUtMS44NTF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+); background-image: linear-gradient(transparent,transparent),
[MediaWiki-commits] [Gerrit] update css from live - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: update css from live .. update css from live Change-Id: I00cdd1493840109f64bd8c1b15fd5378ac4c963c --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 7 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 67fc7de..72cd4ad 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -283,7 +283,7 @@ } a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); - background-image: url(//bits.wikimedia.org/static-1.24wmf13/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-10T15:10:00Z)!ie; + background-image: url(//bits.wikimedia.org/static-1.24wmf14/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-17T16:45:00Z)!ie; /* We don't need the !ie hack because this old IE uses the fallback already */ background-image: -webkit-linear-gradient(transparent,transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGRlZnM+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNLS45NTgtNC4yNTljLTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2IDAgLjM5NC4xNDMuNzM2LjMzNiAxLjA0OWwtLjA3LjA1NmMtLjM3My0uNTEzLS45NTQtLjg2Ny0xLjYzNi0uODY3LTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2cy45MjIgMi4wNTYgMi4wNTYgMi4wNTZjLjU5NiAwIDEuMTIxLS4yNjUgMS40OTYtLjY3MS0uMDc1LjIxMy0uMTI2LjQzMy0uMTI2LjY3MSAwIDEuMTM0LjkyMiAyLjA1NiAyLjA1NiAyLjA1NnMyLjA1Ni0uOTIyIDIuMDU2LTIuMDU2YzAtLjQ3Ni0uMTg5LS44OTYtLjQ2Mi0xLjI0NS44MTMuMTU4IDEuNjI3LjQ3NyAyLjIyNCAxLjM5OS0uNDQzLS40NDMtLjcyNy0xLjI0OC0uNzI3LTIuMzM2bC0uMzc4LS4wMjguMzUtLjAxNGMwLTEuMDg3LjI3LTEuODkzLjcxMy0yLjMzNi0uNTc1Ljg4OS0xLjM1NCAxLjIxNi0yLjE0IDEuMzg1LjI0My0uMzM3LjQyLS43MjguNDItMS4xNzUgMC0xLjEzNC0uOTIyLTIuMDU2LTIuMDU2LTIuMDU2eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNMC0yLjgyOGwtMi44MjggMi44MjggMi44MjggMi44MjggMi44MjgtMi44MjgtMi44MjgtMi44Mjh6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSJOYU4iLz48L21hcmtlcj48bWFya2VyIG9yaWVudD0iYXV0byIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0xMCAwbDQtNC0xNCA0IDE0IDQtNC00eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PC9kZWZzPjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzA2YyIgZD0iTS41IDMuNTE4aDUuOTgydjUuOTgyaC01Ljk4MnoiLz48cGF0aCBkPSJNNC43NTUtLjE2aDUuMjM0djUuMzlsLTEuNTcxIDEuNTQ0LTEuMzEtMS4zMS0yLjcyNSAyLjcyNS0yLjY4OC0yLjY4OCAyLjgwOC0yLjgwOC0xLjMxLTEuMzF6IiBmaWxsPSIjMDZmIi8+PHBhdGggZD0iTTguOTg0Ljg0NWwuMDIyIDQuODg0LTEuODE3LTEuODE3LTIuODgxIDIuODgxLTEuMjI3LTEuMjI3IDIuODgxLTIuODgxLTEuODUtMS44NTF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+); background-image: linear-gradient(transparent,transparent),
[MediaWiki-commits] [Gerrit] Fixing edit eventlogging for abuse filter - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/149125 Change subject: Fixing edit eventlogging for abuse filter .. Fixing edit eventlogging for abuse filter With these fixes, matches behavior on Android I think. :) Change-Id: I4caddbecf92c989f2e74ea6b76a88b29e1b50938 --- M wikipedia/Data/Operations/UploadSectionWikiTextOp.m M wikipedia/EventLogging/EditFunnel.h M wikipedia/EventLogging/EditFunnel.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.h M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 5 files changed, 25 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/25/149125/1 diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m index 1d60265..09b1e44 100644 --- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m +++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m @@ -126,6 +126,7 @@ // Make the verbose warning available from the error. errorDict[@warning] = weakSelf.jsonRetrieved[@edit][@warning]; +errorDict[@code] = abuseFilterCode; // Set error condition so dependent ops don't even start and so the errorBlock below will fire. weakSelf.error = [NSError errorWithDomain:@Upload Wikitext Op code:errorType userInfo:errorDict]; diff --git a/wikipedia/EventLogging/EditFunnel.h b/wikipedia/EventLogging/EditFunnel.h index 4cd3c70..dab7c7d 100644 --- a/wikipedia/EventLogging/EditFunnel.h +++ b/wikipedia/EventLogging/EditFunnel.h @@ -28,11 +28,11 @@ -(void)logSavedRevision:(int)revID; -(void)logCaptchaShown; -(void)logCaptchaFailure; --(void)logAbuseFilterWarning:(NSString *)code; --(void)logAbuseFilterError:(NSString *)code; --(void)logAbuseFilterWarningIgnore:(NSString *)code; --(void)logAbuseFilterWarningBack:(NSString *)code; --(void)logSaveAttempt; // @FIXME USE +-(void)logAbuseFilterWarning:(NSString *)name; +-(void)logAbuseFilterError:(NSString *)name; +-(void)logAbuseFilterWarningIgnore:(NSString *)name; +-(void)logAbuseFilterWarningBack:(NSString *)name; +-(void)logSaveAttempt; -(void)logError:(NSString *)code; @end diff --git a/wikipedia/EventLogging/EditFunnel.m b/wikipedia/EventLogging/EditFunnel.m index 678b47d..911ed50 100644 --- a/wikipedia/EventLogging/EditFunnel.m +++ b/wikipedia/EventLogging/EditFunnel.m @@ -68,31 +68,31 @@ [self log:@{@action: @captchaFailure}]; } -- (void)logAbuseFilterWarning:(NSString *)code +- (void)logAbuseFilterWarning:(NSString *)name { [self log:@{@action: @abuseFilterWarning, -@abuseFilterCode: (code ? code : @)}]; +@abuseFilterName: (name ? name : @)}]; } -- (void)logAbuseFilterError:(NSString *)code +- (void)logAbuseFilterError:(NSString *)name { [self log:@{@action: @abuseFilterError, -@abuseFilterCode: (code ? code : @)}]; +@abuseFilterName: (name ? name : @)}]; } --(void)logAbuseFilterWarningIgnore:(NSString *)code +-(void)logAbuseFilterWarningIgnore:(NSString *)name { [self log:@{@action: @abuseFilterWarningIgnore, -@abuseFilterCode: (code ? code : @)}]; +@abuseFilterName: (name ? name : @)}]; } --(void)logAbuseFilterWarningBack:(NSString *)code +-(void)logAbuseFilterWarningBack:(NSString *)name { [self log:@{@action: @abuseFilterWarningBack, -@abuseFilterCode: (code ? code : @)}]; +@abuseFilterName: (name ? name : @)}]; } --(void)logSaveAttempt // @FIXME WHAT CALLS THIS +-(void)logSaveAttempt { [self log:@{@action: @saveAttempt}]; } diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.h b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.h index 4a606f8..4ba92aa 100644 --- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.h +++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.h @@ -13,6 +13,7 @@ @property (strong, nonatomic) NSManagedObjectID *sectionID; @property (strong, nonatomic) NSString *wikiText; @property (strong, nonatomic) EditFunnel *funnel; +@property (strong, nonatomic) NSString *abuseFilterCode; -(void)reloadCaptchaPushed:(id)sender; diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m index fcd403f..70078aa 100644 --- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m +++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m @@ -117,7 +117,7 @@ [ROOT popViewControllerAnimated:YES];
[MediaWiki-commits] [Gerrit] Fix for back forward buttons logic. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for back forward buttons logic. .. Fix for back forward buttons logic. Change-Id: Ia7bde12a7af2f731d51457a7ba7932763aa6976a --- M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M wikipedia/View Controllers/Navigation/Center/CenterNavController.h M wikipedia/View Controllers/Navigation/Center/CenterNavController.m M wikipedia/View Controllers/WebView/WebViewController.m 4 files changed, 18 insertions(+), 5 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index 2c55fae..b161df6 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -196,7 +196,7 @@ [webVC navigateToPage: history.article.titleObj domain: history.article.domain - discoveryMethod: DISCOVERY_METHOD_SEARCH + discoveryMethod: DISCOVERY_METHOD_BACKFORWARD invalidatingCache: NO]; } } @@ -211,7 +211,7 @@ [webVC navigateToPage: history.article.titleObj domain: history.article.domain - discoveryMethod: DISCOVERY_METHOD_SEARCH + discoveryMethod: DISCOVERY_METHOD_BACKFORWARD invalidatingCache: NO]; } } diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h index f3ab356..a193e96 100644 --- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h +++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h @@ -5,9 +5,10 @@ #include MWPageTitle.h typedef enum { -DISCOVERY_METHOD_SEARCH = 0, -DISCOVERY_METHOD_RANDOM = 1, -DISCOVERY_METHOD_LINK = 2 +DISCOVERY_METHOD_SEARCH, +DISCOVERY_METHOD_RANDOM, +DISCOVERY_METHOD_LINK, +DISCOVERY_METHOD_BACKFORWARD } ArticleDiscoveryMethod; @interface CenterNavController : UINavigationController UINavigationControllerDelegate diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.m b/wikipedia/View Controllers/Navigation/Center/CenterNavController.m index 75f55b5..5e0cd85 100644 --- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.m +++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.m @@ -111,6 +111,9 @@ -(NSString *)getStringForDiscoveryMethod:(ArticleDiscoveryMethod)method { switch (method) { +case DISCOVERY_METHOD_BACKFORWARD: +return @backforward; +break; case DISCOVERY_METHOD_RANDOM: return @random; break; diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index 3b44810..e3f4977 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1259,6 +1259,15 @@ if (articleID) { Article *article = (Article *)[articleDataContext_.mainContext objectWithID:articleID]; + +// Update the history dateVisited timestamp only if the article was NOT loaded +// via back or forward buttons. +if (![discoveryMethod isEqualToString:@backforward]) { +if (article.history.count 0) { // There should only be a single history item. +History *history = [article.history anyObject]; +history.dateVisited = [NSDate date]; +} +} // If article with sections just show them (unless needsRefresh is YES) if (article.section.count 0 !article.needsRefresh.boolValue) { -- To view, visit https://gerrit.wikimedia.org/r/149184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7bde12a7af2f731d51457a7ba7932763aa6976a Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for updating lastVisited date of article being navigated... - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for updating lastVisited date of article being navigated away from. .. Fix for updating lastVisited date of article being navigated away from. Change-Id: Iaade5f0555c032fb83184b58d29c3eec6b5494a0 --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 38 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index e3f4977..1ab10f4 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -100,6 +100,10 @@ @property (nonatomic) BOOL editable; @property (copy) NSString *protectionStatus; +// These are presently only used by updateHistoryDateVisitedForArticleBeingNavigatedFrom method. +@property (strong, nonatomic) NSString *currentTitle; +@property (strong, nonatomic) NSString *currentDomain; + @end #pragma mark Internal variables @@ -1179,6 +1183,29 @@ } } +-(void)updateHistoryDateVisitedForArticleBeingNavigatedFrom +{ +[articleDataContext_.mainContext performBlockAndWait:^(){ +NSManagedObjectID *articleID = +[articleDataContext_.mainContext getArticleIDForTitle: self.currentTitle + domain: self.currentDomain]; +if (articleID) { +Article *article = (Article *)[articleDataContext_.mainContext objectWithID:articleID]; +if (article) { +if (article.history.count 0) { // There should only be a single history item. +History *history = [article.history anyObject]; +history.dateVisited = [NSDate date]; +NSError *error = nil; +[articleDataContext_.mainContext save:error]; +if (error) { +NSLog(@error = %@, error); +} +} +} +} +}]; +} + #pragma mark Article loading ops - (void)navigateToPage: (MWPageTitle *)title @@ -1200,6 +1227,15 @@ if (invalidateCache) [self invalidateCacheForPageTitle:title domain:domain]; self.jumpToFragment = title.fragment; + +// Update the history dateVisited timestamp of the article *presently shown* by the webView +// only if the article to be loaded was NOT loaded via back or forward buttons. The article +// being *navigated to* has its history dateVisited updated later in this method. +if (discoveryMethod != DISCOVERY_METHOD_BACKFORWARD) { +[self updateHistoryDateVisitedForArticleBeingNavigatedFrom]; +} +self.currentTitle = title.text; +self.currentDomain = domain; [self retrieveArticleForPageTitle: title domain: domain @@ -1260,8 +1296,8 @@ if (articleID) { Article *article = (Article *)[articleDataContext_.mainContext objectWithID:articleID]; -// Update the history dateVisited timestamp only if the article was NOT loaded -// via back or forward buttons. +// Update the history dateVisited timestamp of the article to be visited only +// if the article was NOT loaded via back or forward buttons. if (![discoveryMethod isEqualToString:@backforward]) { if (article.history.count 0) { // There should only be a single history item. History *history = [article.history anyObject]; -- To view, visit https://gerrit.wikimedia.org/r/149198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaade5f0555c032fb83184b58d29c3eec6b5494a0 Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the updated method for ReadingActionFunnel (alt event lo... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141274 Change subject: Use the updated method for ReadingActionFunnel (alt event logging) .. Use the updated method for ReadingActionFunnel (alt event logging) Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a --- M wikipedia/Data/Operations/DownloadSectionsOp.m M wikipedia/EventLogging/ReadingActionFunnel.h 2 files changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/74/141274/1 diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m b/wikipedia/Data/Operations/DownloadSectionsOp.m index ff98fde..2d35e3d 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -7,7 +7,7 @@ #import NSURLRequest+DictionaryRequest.h #import NSString+Extras.h #import NSObject+Extras.h - +#import ReadingActionFunnel.h @implementation DownloadSectionsOp @@ -42,6 +42,9 @@ //(if there's more than a single section). params[@sections] = @0; + +ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init]; +params[@appInstallID] = funnel.appInstallID; } self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] diff --git a/wikipedia/EventLogging/ReadingActionFunnel.h b/wikipedia/EventLogging/ReadingActionFunnel.h index fea0c76..c0123ad 100644 --- a/wikipedia/EventLogging/ReadingActionFunnel.h +++ b/wikipedia/EventLogging/ReadingActionFunnel.h @@ -12,6 +12,10 @@ @property NSString *appInstallID; +/** + * Note this method is not actually used; the appInstallID key is instead + * sent with the 'action=mobileview' API request on a fresh page read. + */ -(void)logSomethingHappened; @end -- To view, visit https://gerrit.wikimedia.org/r/141274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update to CSS - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update to CSS .. Update to CSS Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 15 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 89b5850..8ddf0bf 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -94,6 +94,11 @@ -webkit-box-sizing: border-box; box-sizing: border-box; } +div#centralNotice { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} button { border: none; background-color: transparent; diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css index d792df7..cadde49 100644 --- a/wikipedia/assets/preview.css +++ b/wikipedia/assets/preview.css @@ -94,6 +94,11 @@ -webkit-box-sizing: border-box; box-sizing: border-box; } +div#centralNotice { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} button { border: none; background-color: transparent; diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 89b5850..8ddf0bf 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -94,6 +94,11 @@ -webkit-box-sizing: border-box; box-sizing: border-box; } +div#centralNotice { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} button { border: none; background-color: transparent; -- To view, visit https://gerrit.wikimedia.org/r/141270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Automatically run npm install when building the app - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Automatically run npm install when building the app .. Automatically run npm install when building the app Otherwise, grunt will exit with a non-helpful error message. After the first run, npm won't do anything. Also document that nodejs/npm are required to build. Change-Id: Ic3f3039856ec6642b8077912be9fad9a61992ddf --- M README.md M scripts/run-grunt.sh 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 7d56763..704acd6 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Note that due to Apple's restrictions on iOS app installation, to run a custom build on a standard iOS device you must pay for a [developer account with Apple](https://developer.apple.com/devcenter/ios/index.action) and register the device with your account. +You'll also need to install [nodejs](http://nodejs.org/) and npm. # Running tests diff --git a/scripts/run-grunt.sh b/scripts/run-grunt.sh index 01f45a2..be5a9ce 100755 --- a/scripts/run-grunt.sh +++ b/scripts/run-grunt.sh @@ -3,6 +3,7 @@ PATH=${PATH}:/usr/local/bin cd www/ { +npm install grunt } -- To view, visit https://gerrit.wikimedia.org/r/141281 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3f3039856ec6642b8077912be9fad9a61992ddf Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the updated method for ReadingActionFunnel (alt event lo... - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Use the updated method for ReadingActionFunnel (alt event logging) .. Use the updated method for ReadingActionFunnel (alt event logging) Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a --- M wikipedia/Data/Operations/DownloadSectionsOp.m M wikipedia/EventLogging/ReadingActionFunnel.h 2 files changed, 8 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m b/wikipedia/Data/Operations/DownloadSectionsOp.m index ff98fde..2d35e3d 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -7,7 +7,7 @@ #import NSURLRequest+DictionaryRequest.h #import NSString+Extras.h #import NSObject+Extras.h - +#import ReadingActionFunnel.h @implementation DownloadSectionsOp @@ -42,6 +42,9 @@ //(if there's more than a single section). params[@sections] = @0; + +ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init]; +params[@appInstallID] = funnel.appInstallID; } self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] diff --git a/wikipedia/EventLogging/ReadingActionFunnel.h b/wikipedia/EventLogging/ReadingActionFunnel.h index fea0c76..c0123ad 100644 --- a/wikipedia/EventLogging/ReadingActionFunnel.h +++ b/wikipedia/EventLogging/ReadingActionFunnel.h @@ -12,6 +12,10 @@ @property NSString *appInstallID; +/** + * Note this method is not actually used; the appInstallID key is instead + * sent with the 'action=mobileview' API request on a fresh page read. + */ -(void)logSomethingHappened; @end -- To view, visit https://gerrit.wikimedia.org/r/141274 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ec7448ad9d9c6dfcacdb9d9040d4f1195820d0a Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup some integer type conversion warnings - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Cleanup some integer type conversion warnings .. Cleanup some integer type conversion warnings * NSInteger is 'int' on 32-bit and 'long' on 64-bit, so there were some fun warnings about usage in formatting strings where %d was being used when building for 64-bit device * Some warnings about enum types Change-Id: I4bea97dc4b80e44ed63336132100ce4440658e0c --- M wikipedia/Categories/NSString+Extras.m M wikipedia/Categories/NSString+FormattedAttributedString.m M wikipedia/Categories/Section+DisplayHtml.m M wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 6 files changed, 18 insertions(+), 18 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/NSString+Extras.m b/wikipedia/Categories/NSString+Extras.m index 74fc208..c1c5ed0 100644 --- a/wikipedia/Categories/NSString+Extras.m +++ b/wikipedia/Categories/NSString+Extras.m @@ -23,7 +23,7 @@ } uint8_t digest[CC_SHA1_DIGEST_LENGTH]; -CC_SHA1(data.bytes, data.length, digest); +CC_SHA1(data.bytes, (unsigned int)data.length, digest); NSMutableString *output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2]; for (int i = 0; i CC_SHA1_DIGEST_LENGTH; i++) diff --git a/wikipedia/Categories/NSString+FormattedAttributedString.m b/wikipedia/Categories/NSString+FormattedAttributedString.m index cc320ea..6093dd6 100644 --- a/wikipedia/Categories/NSString+FormattedAttributedString.m +++ b/wikipedia/Categories/NSString+FormattedAttributedString.m @@ -15,7 +15,7 @@ for (NSUInteger i = 0; i substitutionStrings.count; i++) { NSRegularExpression *regex = -[NSRegularExpression regularExpressionWithPattern: [NSString stringWithFormat:@\\$%d+, i + 1] +[NSRegularExpression regularExpressionWithPattern: [NSString stringWithFormat:@\\$%lu+, (unsigned long)i + 1] options: 0 error: nil]; NSArray *matches = diff --git a/wikipedia/Categories/Section+DisplayHtml.m b/wikipedia/Categories/Section+DisplayHtml.m index 854963a..318b1e7 100644 --- a/wikipedia/Categories/Section+DisplayHtml.m +++ b/wikipedia/Categories/Section+DisplayHtml.m @@ -13,16 +13,16 @@ return [NSString stringWithFormat:@\ -div id=\section_heading_and_content_block_%d\\ +div id=\section_heading_and_content_block_%ld\\ %@\ -div id=\content_block_%d\\ +div id=\content_block_%ld\\ %@\ /div\ /div\ , - self.sectionId.integerValue, + (long)self.sectionId.integerValue, (isMainPage ? @ : [self getHeaderTag:isMainPage]), - self.sectionId.integerValue, + (long)self.sectionId.integerValue, self.html ]; } @@ -39,17 +39,17 @@ return [NSString stringWithFormat:@\ -h%d class=\section_heading\ data-id=\%d\ id=\%@\\ +h%ld class=\section_heading\ data-id=\%ld\ id=\%@\\ %@\ %@\ -/h%d\ +/h%ld\ , -headingTagSize, -self.sectionId.integerValue, +(long)headingTagSize, +(long)self.sectionId.integerValue, self.anchor, title, pencilAnchor, -headingTagSize +(long)headingTagSize ]; } @@ -78,8 +78,8 @@ -(NSString *)getEditPencilAnchor { return [NSString stringWithFormat: -@a class=\edit_section_button\ data-action=\edit_section\ data-id=\%d\/a, -self.sectionId.integerValue]; +@a class=\edit_section_button\ data-action=\edit_section\ data-id=\%ld\/a, +(long)self.sectionId.integerValue]; } @end diff --git a/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m b/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m index 124c413..9e2862b 100644 --- a/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m +++ b/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m @@ -64,7 +64,7 @@ [invocation invoke]; NSUInteger destNavBarMode; [invocation getReturnValue:destNavBarMode]; -self.navBarMode = destNavBarMode; +self.navBarMode = (NavBarMode)destNavBarMode; } selector = NSSelectorFromString(@navBarStyle); @@ -76,7 +76,7 @@ [invocation invoke]; NSUInteger destNavBarStyle; [invocation getReturnValue:destNavBarStyle]; -self.navBarStyle = destNavBarStyle; +self.navBarStyle = (NavBarStyle)destNavBarStyle; } } diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View
[MediaWiki-commits] [Gerrit] Fix for missing revision ID in save event logging - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141363 Change subject: Fix for missing revision ID in save event logging .. Fix for missing revision ID in save event logging Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613 --- M wikipedia/Data/Operations/UploadSectionWikiTextOp.h M wikipedia/Data/Operations/UploadSectionWikiTextOp.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 3 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/63/141363/1 diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h index 332e7da..4a52b96 100644 --- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h +++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h @@ -24,7 +24,7 @@ summary: (NSString *)summary captchaId: (NSString *)captchaId captchaWord: (NSString *)captchaWord - completionBlock: (void (^)(NSString *))completionBlock + completionBlock: (void (^)(NSDictionary *))completionBlock cancelledBlock: (void (^)(NSError *))cancelledBlock errorBlock: (void (^)(NSError *))errorBlock ; diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m index 2c1d68a..1d60265 100644 --- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m +++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m @@ -16,7 +16,7 @@ summary: (NSString *)summary captchaId: (NSString *)captchaId captchaWord: (NSString *)captchaWord - completionBlock: (void (^)(NSString *))completionBlock + completionBlock: (void (^)(NSDictionary *))completionBlock cancelledBlock: (void (^)(NSError *))cancelledBlock errorBlock: (void (^)(NSError *))errorBlock { @@ -73,7 +73,8 @@ weakSelf.error = [NSError errorWithDomain:@Upload Wikitext Op code:WIKITEXT_UPLOAD_ERROR_SERVER userInfo:errorDict]; } -NSString *result = weakSelf.jsonRetrieved[@edit][@result]; +NSDictionary *resultDict = weakSelf.jsonRetrieved[@edit]; +NSString *result = resultDict[@result]; if (!weakSelf.error !result) { NSMutableDictionary *errorDict = [@{} mutableCopy]; @@ -142,7 +143,7 @@ return; } -completionBlock(result); +completionBlock(resultDict); }; } return self; diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m index 1dcc846..43bb260 100644 --- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m +++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m @@ -484,11 +484,12 @@ NSString *title = section.fromTitle ? section.fromTitle : section.article.title; UploadSectionWikiTextOp *uploadWikiTextOp = -[[UploadSectionWikiTextOp alloc] initForPageTitle:title domain:section.article.domain section:section.index wikiText:self.wikiText summary:editSummary captchaId:self.captchaId captchaWord:self.captchaViewController.captchaTextBox.text completionBlock:^(NSString *result){ +[[UploadSectionWikiTextOp alloc] initForPageTitle:title domain:section.article.domain section:section.index wikiText:self.wikiText summary:editSummary captchaId:self.captchaId captchaWord:self.captchaViewController.captchaTextBox.text completionBlock:^(NSDictionary *resultDict){ +[self.funnel logSavedRevision:[resultDict[@newrevid] intValue]]; + // Mark article for refreshing and reload it. if (articleID) { -[self.funnel logSavedRevision:0]; // @fixme need revision ID [[NSOperationQueue mainQueue] addOperationWithBlock: ^ { WebViewController *webVC = [self.navigationController searchNavStackForViewControllerOfClass:[WebViewController class]]; [webVC reloadCurrentArticleInvalidatingCache:YES]; -- To view, visit https://gerrit.wikimedia.org/r/141363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for missing revision ID in save event logging - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for missing revision ID in save event logging .. Fix for missing revision ID in save event logging Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613 --- M wikipedia/Data/Operations/UploadSectionWikiTextOp.h M wikipedia/Data/Operations/UploadSectionWikiTextOp.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 3 files changed, 8 insertions(+), 6 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h index 332e7da..4a52b96 100644 --- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.h +++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.h @@ -24,7 +24,7 @@ summary: (NSString *)summary captchaId: (NSString *)captchaId captchaWord: (NSString *)captchaWord - completionBlock: (void (^)(NSString *))completionBlock + completionBlock: (void (^)(NSDictionary *))completionBlock cancelledBlock: (void (^)(NSError *))cancelledBlock errorBlock: (void (^)(NSError *))errorBlock ; diff --git a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m index 2c1d68a..1d60265 100644 --- a/wikipedia/Data/Operations/UploadSectionWikiTextOp.m +++ b/wikipedia/Data/Operations/UploadSectionWikiTextOp.m @@ -16,7 +16,7 @@ summary: (NSString *)summary captchaId: (NSString *)captchaId captchaWord: (NSString *)captchaWord - completionBlock: (void (^)(NSString *))completionBlock + completionBlock: (void (^)(NSDictionary *))completionBlock cancelledBlock: (void (^)(NSError *))cancelledBlock errorBlock: (void (^)(NSError *))errorBlock { @@ -73,7 +73,8 @@ weakSelf.error = [NSError errorWithDomain:@Upload Wikitext Op code:WIKITEXT_UPLOAD_ERROR_SERVER userInfo:errorDict]; } -NSString *result = weakSelf.jsonRetrieved[@edit][@result]; +NSDictionary *resultDict = weakSelf.jsonRetrieved[@edit]; +NSString *result = resultDict[@result]; if (!weakSelf.error !result) { NSMutableDictionary *errorDict = [@{} mutableCopy]; @@ -142,7 +143,7 @@ return; } -completionBlock(result); +completionBlock(resultDict); }; } return self; diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m index 1dcc846..43bb260 100644 --- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m +++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m @@ -484,11 +484,12 @@ NSString *title = section.fromTitle ? section.fromTitle : section.article.title; UploadSectionWikiTextOp *uploadWikiTextOp = -[[UploadSectionWikiTextOp alloc] initForPageTitle:title domain:section.article.domain section:section.index wikiText:self.wikiText summary:editSummary captchaId:self.captchaId captchaWord:self.captchaViewController.captchaTextBox.text completionBlock:^(NSString *result){ +[[UploadSectionWikiTextOp alloc] initForPageTitle:title domain:section.article.domain section:section.index wikiText:self.wikiText summary:editSummary captchaId:self.captchaId captchaWord:self.captchaViewController.captchaTextBox.text completionBlock:^(NSDictionary *resultDict){ +[self.funnel logSavedRevision:[resultDict[@newrevid] intValue]]; + // Mark article for refreshing and reload it. if (articleID) { -[self.funnel logSavedRevision:0]; // @fixme need revision ID [[NSOperationQueue mainQueue] addOperationWithBlock: ^ { WebViewController *webVC = [self.navigationController searchNavStackForViewControllerOfClass:[WebViewController class]]; [webVC reloadCurrentArticleInvalidatingCache:YES]; -- To view, visit https://gerrit.wikimedia.org/r/141363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2fe7c82e1b078dc875d6f33f8e854f02a1868613 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: fix for linking to pages with fragments - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141365 Change subject: Work in progress: fix for linking to pages with fragments .. Work in progress: fix for linking to pages with fragments * updates MWPageTitle class a bit, which wasn't previously used * sticks it in the middle of link handling briefly to remove the fragment todo: * fix some methods to take MWPageTitle instead of string directly * handle jumping to the fragment-specific section on page load todo later: * figure out if/how to handle namespacing Change-Id: Ib203d62ab2499cceaa72604285751b7f93460afc --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/mw-support/MWPageTitle.h M wikipedia/mw-support/MWPageTitle.m M wikipedia/mw-support/MWSite.m 4 files changed, 118 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/65/141365/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index 9cbe0f6..af694fa 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -18,6 +18,7 @@ #import MWLanguageInfo.h #import CenterNavController.h #import Defines.h +#import MWPageTitle.h #import UIViewController+SearchChildViewControllers.h #import NSManagedObjectContext+SimpleFetch.h @@ -818,8 +819,9 @@ if ([href hasPrefix:@/wiki/]) { NSString *title = [href substringWithRange:NSMakeRange(6, href.length - 6)]; +MWPageTitle *pageTitle = [MWPageTitle titleWithString:title]; -[weakSelf navigateToPage: title +[weakSelf navigateToPage: pageTitle.prefixedText domain: [SessionSingleton sharedInstance].currentArticleDomain discoveryMethod: DISCOVERY_METHOD_LINK invalidatingCache: NO]; diff --git a/wikipedia/mw-support/MWPageTitle.h b/wikipedia/mw-support/MWPageTitle.h index 17e7929..2f8747a 100644 --- a/wikipedia/mw-support/MWPageTitle.h +++ b/wikipedia/mw-support/MWPageTitle.h @@ -5,12 +5,64 @@ @interface MWPageTitle : NSObject -+(MWPageTitle *)titleFromNamespace:(NSString *)namespace text:(NSString *)text; +/** + * Initialize a new MWPageTitle object from string input + */ +-(id)initWithString:(NSString *)str; --(id)initFromNamespace:(NSString *)namespace text:(NSString *)text; +/** + * Create a new MWPageTitle object from string input + */ ++(MWPageTitle *)titleWithString:(NSString *)str; --(NSString *)namespace; --(NSString *)text; --(NSString *)prefixedText; +/** + * Normalize a title string portion to text form + */ ++(NSString *)normalize:(NSString *)str; + + +/** + * Normalized namespace (decoded, no underscores) + * Warning: not implemented yet + */ +@property (readonly) NSString *namespace; + +/** + * Normalized title component only (decoded, no underscores) + */ +@property (readonly) NSString *text; + +/** + * Fragment (component after the '#') + * Warning: fragment may be nil! + */ +@property (readonly) NSString *fragment; + + +/** + * Full text-normalized namespace+title + * Decoded, with spaces + */ +@property (readonly) NSString *prefixedText; + +/** + * Full DB-normalized namespace+title + * Decoded, with underscores + */ +@property (readonly) NSString *prefixedDBKey; + +/** + * Full URL-normalized namespace+title + * Encoded, with underscores + */ +@property (readonly) NSString *prefixedURL; + +/** + * URL-normalized fragment, including the # if applicable + * Always returns a string, may be empty string. + */ +@property (readonly) NSString *fragmentForURL; + + @end diff --git a/wikipedia/mw-support/MWPageTitle.m b/wikipedia/mw-support/MWPageTitle.m index f92e9f8..deb2aa0 100644 --- a/wikipedia/mw-support/MWPageTitle.m +++ b/wikipedia/mw-support/MWPageTitle.m @@ -2,30 +2,50 @@ // Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! #import MWPageTitle.h +#import NSString+Extras.h @implementation MWPageTitle { -NSString *_namespace; NSString *_text; +NSString *_fragment; } -+(MWPageTitle *)titleFromNamespace:(NSString *)namespace text:(NSString *)text +#pragma mark - Class methods + ++(MWPageTitle *)titleWithString:(NSString *)str { -return [[MWPageTitle alloc] initFromNamespace:namespace text:text]; +return [[MWPageTitle alloc] initWithString:str]; } --(id)initFromNamespace:(NSString *)namespace text:(NSString *)text ++(NSString *)normalize:(NSString *)str +{ +// @todo implement fuller normalization? +return [str stringByReplacingOccurrencesOfString:@_ withString:@ ]; +} + +#pragma mark - Initializers + +-(id)initWithString:(NSString *)str { self = [self init]; if (self) { -_namespace = namespace; -_text = text; +NSArray *bits = [str
[MediaWiki-commits] [Gerrit] Work in progress: move edit section button styles from Andro... - change (mediawiki...MobileApp)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141762 Change subject: Work in progress: move edit section button styles from Android to generic .. Work in progress: move edit section button styles from Android to generic Change-Id: Id0767093b4beb3280d2d223b726a77c2582b9162 --- M less/android.less M less/editlinks.less 2 files changed, 26 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp refs/changes/62/141762/1 diff --git a/less/android.less b/less/android.less index e4f46cd..823bc91 100644 --- a/less/android.less +++ b/less/android.less @@ -2,32 +2,6 @@ padding-top: 48px; } -.no-editing { -a.edit_section_button { -display: none; -} -} - -.page-protected { - a.edit_section_button { - /* @embed */ - background-image: url(../images/edit-locked.png); - } -} - -#mainpage { - a.edit_section_button { - display: none; - } -} - -.content-rtl a.edit_section_button { -float: left; -/* Flip it! */ --webkit-transform: scaleX(-1); -transform: scaleX(-1); -} - /* Loading animation in pure CSS Thanks to http://dabblet.com/gist/7708654 */ .loading { diff --git a/less/editlinks.less b/less/editlinks.less index e796ff0..7ae3f33 100644 --- a/less/editlinks.less +++ b/less/editlinks.less @@ -7,3 +7,29 @@ float: right; display: inline-float; } + +.no-editing { +a.edit_section_button { +display: none; +} +} + +.page-protected { + a.edit_section_button { + /* @embed */ + background-image: url(../images/edit-locked.png); + } +} + +#mainpage { + a.edit_section_button { + display: none; + } +} + +.content-rtl a.edit_section_button { +float: left; +/* Flip it! */ +-webkit-transform: scaleX(-1); +transform: scaleX(-1); +} -- To view, visit https://gerrit.wikimedia.org/r/141762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id0767093b4beb3280d2d223b726a77c2582b9162 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: adding edit protection fields - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141763 Change subject: Work in progress: adding edit protection fields .. Work in progress: adding edit protection fields Requires CSS updates in https://gerrit.wikimedia.org/r/#/c/141762/ to get the edit buttons to show broken, assuming it works. :D Change-Id: I894850b27e18eb150e98ad516b6a93def748c53e --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/Categories/Article+Convenience.h M wikipedia/Categories/Article+Convenience.m M wikipedia/Data/Model/Article.h M wikipedia/Data/Model/Article.m A wikipedia/Data/Model/ArticleData.xcdatamodeld/.xccurrentversion A wikipedia/Data/Model/ArticleData.xcdatamodeld/ArticleData 2.xcdatamodel/contents M wikipedia/Data/Model/ArticleData.xcdatamodeld/ArticleData.xcdatamodel/contents M wikipedia/Data/Operations/DownloadSectionsOp.m M wikipedia/EventLogging/ProtectedEditAttemptFunnel.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M www/js/listeners.js 13 files changed, 179 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/63/141763/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 24c6f2a..eb49a04 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -634,6 +634,7 @@ D4B0AE0C19366A5400F0AC90 /* LoginFunnel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoginFunnel.h; path = EventLogging/LoginFunnel.h; sourceTree = group; }; D4B0AE0D19366A5400F0AC90 /* LoginFunnel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LoginFunnel.m; path = EventLogging/LoginFunnel.m; sourceTree = group; }; D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = group; }; + D4CA33D71959FDEC0093588B /* ArticleData 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ArticleData 2.xcdatamodel; sourceTree = group; }; D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; }; D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataMigrator.h; path = wikipedia/DataMigrator.h; sourceTree = SOURCE_ROOT; }; D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DataMigrator.m; path = wikipedia/DataMigrator.m; sourceTree = SOURCE_ROOT; }; @@ -2225,9 +2226,10 @@ 04FD6C78184EBFCD002CA02F /* ArticleData.xcdatamodeld */ = { isa = XCVersionGroup; children = ( + D4CA33D71959FDEC0093588B /* ArticleData 2.xcdatamodel */, 04FD6C79184EBFCD002CA02F /* ArticleData.xcdatamodel */, ); - currentVersion = 04FD6C79184EBFCD002CA02F /* ArticleData.xcdatamodel */; + currentVersion = D4CA33D71959FDEC0093588B /* ArticleData 2.xcdatamodel */; path = ArticleData.xcdatamodeld; sourceTree = group; versionGroupType = wrapper.xcdatamodel; diff --git a/wikipedia/Categories/Article+Convenience.h b/wikipedia/Categories/Article+Convenience.h index b5cba6a..33f8d3f 100644 --- a/wikipedia/Categories/Article+Convenience.h +++ b/wikipedia/Categories/Article+Convenience.h @@ -19,4 +19,6 @@ @property (readonly) MWPageTitle* titleObj; +@property (readonly) BOOL editableBool; + @end diff --git a/wikipedia/Categories/Article+Convenience.m b/wikipedia/Categories/Article+Convenience.m index 0de5870..146b5b4 100644 --- a/wikipedia/Categories/Article+Convenience.m +++ b/wikipedia/Categories/Article+Convenience.m @@ -130,4 +130,13 @@ return [MWPageTitle titleWithString:self.title]; } +-(BOOL)editableBool +{ +if (self.editable == nil) { +return YES; // default +} else { +return [self.editable boolValue]; +} +} + @end diff --git a/wikipedia/Data/Model/Article.h b/wikipedia/Data/Model/Article.h index 2802a46..be8b1db 100644 --- a/wikipedia/Data/Model/Article.h +++ b/wikipedia/Data/Model/Article.h @@ -1,5 +1,10 @@ -// Created by Monte Hurd on 5/2/14. -// Created by Monte Hurd on 4/29/14. +// +// Article.h +// Wikipedia +// +// Created by Brion on 6/24/14. +// Copyright (c) 2014 Wikimedia Foundation. All rights reserved. +// #import Foundation/Foundation.h #import
[MediaWiki-commits] [Gerrit] Proactively handle network connection error. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Proactively handle network connection error. .. Proactively handle network connection error. Change-Id: Ie378e5ffa67f8921a340eba7f85adda7866d5adc --- M wikipedia/Session/SessionSingleton.h M wikipedia/Session/SessionSingleton.m M wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 19 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Session/SessionSingleton.h b/wikipedia/Session/SessionSingleton.h index 33e7897..eec1fe1 100644 --- a/wikipedia/Session/SessionSingleton.h +++ b/wikipedia/Session/SessionSingleton.h @@ -27,6 +27,7 @@ @property (strong, atomic) NSArray *unsupportedCharactersLanguageIds; +@property (nonatomic) BOOL fallback; -(NSURL *)urlForDomain:(NSString *)domain; -(NSString *)domainNameForCode:(NSString *)code; diff --git a/wikipedia/Session/SessionSingleton.m b/wikipedia/Session/SessionSingleton.m index b1e75df..d5a157e 100644 --- a/wikipedia/Session/SessionSingleton.m +++ b/wikipedia/Session/SessionSingleton.m @@ -35,12 +35,14 @@ -(NSURL *)urlForDomain:(NSString *)domain { -return [NSURL URLWithString:[NSString stringWithFormat:@https://%@.m.%@/w/api.php;, domain, [self site]]]; +NSString *endpoint = self.fallback ? @ : @.m; +return [NSURL URLWithString:[NSString stringWithFormat:@https://%@%@.%@/w/api.php;, domain, endpoint, [self site]]]; } -(NSString *)searchApiUrl { -return [NSString stringWithFormat:@https://%@.m.%@/w/api.php;, [self domain], [self site]]; +NSString *endpoint = self.fallback ? @ : @.m; +return [NSString stringWithFormat:@https://%@%@.%@/w/api.php;, [self domain], endpoint, [self site]]; } -(void)setDomain:(NSString *)domain diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index b97011c..7b3577b 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1408,6 +1408,20 @@ Article *article = (Article *)[articleDataContext_.workerContext objectWithID:articleID]; [articleDataContext_.workerContext deleteObject:article]; } + +// @TODO potentially do this in the difFailWithError in MWNetworkOp +// It seems safe enough, but we didn't want to cause any sort of memory leak +if (error.domain == NSStreamSocketSSLErrorDomain || +(error.domain == NSURLErrorDomain + (error.code == NSURLErrorSecureConnectionFailed || + error.code == NSURLErrorServerCertificateHasBadDate || + error.code == NSURLErrorServerCertificateUntrusted || + error.code == NSURLErrorServerCertificateHasUnknownRoot || + error.code == NSURLErrorServerCertificateNotYetValid) + ) +) { +[SessionSingleton sharedInstance].fallback = true; +} }]; firstSectionOp.delegate = self; -- To view, visit https://gerrit.wikimedia.org/r/141600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie378e5ffa67f8921a340eba7f85adda7866d5adc Gerrit-PatchSet: 3 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add updated localization files to project - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141914 Change subject: Add updated localization files to project .. Add updated localization files to project Change-Id: I6bb8c8ae62098197437bec492e7b2cc84428f262 --- M Wikipedia.xcodeproj/project.pbxproj 1 file changed, 102 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/14/141914/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 24c6f2a..6165714 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -590,6 +590,51 @@ D44F637918DA793A00EAD1DD /* zh-hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-hans; path = zh-hans.lproj/Main_iPhone.strings; sourceTree = group; }; D44F637A18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-hant; path = zh-hant.lproj/InfoPlist.strings; sourceTree = group; }; D44F637B18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-hant; path = zh-hant.lproj/Main_iPhone.strings; sourceTree = group; }; + D4679060195AD36D00C4E44D /* bn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bn; path = bn.lproj/Localizable.strings; sourceTree = group; }; + D4679061195AD37A00C4E44D /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = group; }; + D4679062195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = group; }; + D4679063195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Main_iPhone.strings; sourceTree = group; }; + D4679064195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/InfoPlist.strings; sourceTree = group; }; + D4679065195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Localizable.strings; sourceTree = group; }; + D4679066195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Main_iPhone.strings; sourceTree = group; }; + D4679067195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/InfoPlist.strings; sourceTree = group; }; + D4679068195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Localizable.strings; sourceTree = group; }; + D4679069195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Main_iPhone.strings; sourceTree = group; }; + D467906A195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/InfoPlist.strings; sourceTree = group; }; + D467906B195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/Main_iPhone.strings; sourceTree = group; }; + D467906C195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/InfoPlist.strings; sourceTree = group; }; + D467906D195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Localizable.strings; sourceTree = group; }; + D467906E195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Main_iPhone.strings; sourceTree = group; }; + D467906F195AD3CE00C4E44D /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = group; }; + D4679070195AD3DC00C4E44D /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = group; }; + D4679071195AD3E600C4E44D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = group; }; + D4679072195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/InfoPlist.strings; sourceTree = group; }; +
[MediaWiki-commits] [Gerrit] Add updated localization files to project - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add updated localization files to project .. Add updated localization files to project Change-Id: I6bb8c8ae62098197437bec492e7b2cc84428f262 --- M Wikipedia.xcodeproj/project.pbxproj 1 file changed, 102 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 24c6f2a..6165714 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -590,6 +590,51 @@ D44F637918DA793A00EAD1DD /* zh-hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-hans; path = zh-hans.lproj/Main_iPhone.strings; sourceTree = group; }; D44F637A18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-hant; path = zh-hant.lproj/InfoPlist.strings; sourceTree = group; }; D44F637B18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-hant; path = zh-hant.lproj/Main_iPhone.strings; sourceTree = group; }; + D4679060195AD36D00C4E44D /* bn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bn; path = bn.lproj/Localizable.strings; sourceTree = group; }; + D4679061195AD37A00C4E44D /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = group; }; + D4679062195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = group; }; + D4679063195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Main_iPhone.strings; sourceTree = group; }; + D4679064195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/InfoPlist.strings; sourceTree = group; }; + D4679065195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Localizable.strings; sourceTree = group; }; + D4679066195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Main_iPhone.strings; sourceTree = group; }; + D4679067195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/InfoPlist.strings; sourceTree = group; }; + D4679068195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Localizable.strings; sourceTree = group; }; + D4679069195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Main_iPhone.strings; sourceTree = group; }; + D467906A195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/InfoPlist.strings; sourceTree = group; }; + D467906B195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/Main_iPhone.strings; sourceTree = group; }; + D467906C195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/InfoPlist.strings; sourceTree = group; }; + D467906D195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Localizable.strings; sourceTree = group; }; + D467906E195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Main_iPhone.strings; sourceTree = group; }; + D467906F195AD3CE00C4E44D /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = group; }; + D4679070195AD3DC00C4E44D /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = group; }; + D4679071195AD3E600C4E44D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = group; }; + D4679072195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/InfoPlist.strings; sourceTree = group; }; + D4679073195AD3F000C4E44D /* kn */ = {isa = PBXFileReference;
[MediaWiki-commits] [Gerrit] Work in progress: EventLogging opt-out switch - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141926 Change subject: Work in progress: EventLogging opt-out switch .. Work in progress: EventLogging opt-out switch todo: * show the subtitle text * i18n Change-Id: Iffd3ce1be2abd25005fbc1cca08fa3a9af887558 --- M wikipedia/AppDelegate.m M wikipedia/Data/Operations/DownloadSectionsOp.m M wikipedia/EventLogging/EventLoggingFunnel.m M wikipedia/Session/SessionSingleton.h M wikipedia/Session/SessionSingleton.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m 6 files changed, 43 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/26/141926/1 diff --git a/wikipedia/AppDelegate.m b/wikipedia/AppDelegate.m index d36a165..df18e94 100644 --- a/wikipedia/AppDelegate.m +++ b/wikipedia/AppDelegate.m @@ -58,7 +58,8 @@ @ZeroOnDialogShownOnce : @NO, @ZeroOffDialogShownOnce : @NO, @FakeZeroOn : @NO, -@LastHousekeepingDate : [NSDate date] //[NSDate dateWithDaysBeforeNow:10] +@LastHousekeepingDate : [NSDate date], //[NSDate dateWithDaysBeforeNow:10] +@SendUsageReports: @YES }; [[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsDefaults]; } diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m b/wikipedia/Data/Operations/DownloadSectionsOp.m index 2d35e3d..e79a130 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -43,8 +43,10 @@ params[@sections] = @0; -ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init]; -params[@appInstallID] = funnel.appInstallID; +if ([SessionSingleton sharedInstance].sendUsageReports) { +ReadingActionFunnel *funnel = [[ReadingActionFunnel alloc] init]; +params[@appInstallID] = funnel.appInstallID; +} } self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] diff --git a/wikipedia/EventLogging/EventLoggingFunnel.m b/wikipedia/EventLogging/EventLoggingFunnel.m index 5d63b2b..2ebaa11 100644 --- a/wikipedia/EventLogging/EventLoggingFunnel.m +++ b/wikipedia/EventLogging/EventLoggingFunnel.m @@ -9,7 +9,7 @@ #import EventLoggingFunnel.h #import LogEventOp.h #import QueuesSingleton.h - +#import SessionSingleton.h @implementation EventLoggingFunnel @@ -29,11 +29,13 @@ -(void)log:(NSDictionary *)eventData { -LogEventOp *logOp = [[LogEventOp alloc] initWithSchema: self.schema - revision: self.revision - event: [self preprocessData:eventData]]; - -[[QueuesSingleton sharedInstance].eventLoggingQ addOperation:logOp]; +if ([SessionSingleton sharedInstance].sendUsageReports) { +LogEventOp *logOp = [[LogEventOp alloc] initWithSchema: self.schema + revision: self.revision + event: [self preprocessData:eventData]]; + +[[QueuesSingleton sharedInstance].eventLoggingQ addOperation:logOp]; +} } -(NSString *)singleUseUUID diff --git a/wikipedia/Session/SessionSingleton.h b/wikipedia/Session/SessionSingleton.h index eec1fe1..0459157 100644 --- a/wikipedia/Session/SessionSingleton.h +++ b/wikipedia/Session/SessionSingleton.h @@ -9,8 +9,10 @@ @interface SessionSingleton : NSObject +// Persistent settings and credentials @property (strong, nonatomic) KeychainCredentials *keychainCredentials; @property (strong, nonatomic) ZeroConfigState *zeroConfigState; +@property (nonatomic) BOOL sendUsageReports; // These 6 persist across app restarts. @property (strong, nonatomic) NSString *site; diff --git a/wikipedia/Session/SessionSingleton.m b/wikipedia/Session/SessionSingleton.m index d5a157e..49e41c4 100644 --- a/wikipedia/Session/SessionSingleton.m +++ b/wikipedia/Session/SessionSingleton.m @@ -158,4 +158,16 @@ return ([self.currentArticleTitle isEqualToString: mainArticleTitle]); } +-(BOOL)sendUsageReports +{ +NSNumber *val = [[NSUserDefaults standardUserDefaults] objectForKey:@SendUsageReports]; +return [val boolValue]; +} + +-(void)setSendUsageReports:(BOOL)sendUsageReports +{ +[[NSUserDefaults standardUserDefaults] setObject:@(sendUsageReports) forKey:@SendUsageReports]; +} + + @end diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 2f0bd1d..d944210 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View
[MediaWiki-commits] [Gerrit] Update W0 flourishes based on UX feedback for MVP. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update W0 flourishes based on UX feedback for MVP. .. Update W0 flourishes based on UX feedback for MVP. * Verbiage updates. * Always show alert for On-to-Off transition, and only have a Dismiss button. * We may make the fixed element show only intermittently and be tappable, but requires exploration. Change-Id: I28577334bcba36a4ac6fb5422a24e79afe2ac153 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m D wikipedia/Settings.bundle/Root.plist D wikipedia/Settings.bundle/en.lproj/Root.strings M wikipedia/View Controllers/Navigation/Center/CenterNavController.h M wikipedia/View Controllers/Navigation/Center/CenterNavController.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/Zero/ZeroConfigState.h M wikipedia/Zero/ZeroConfigState.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 11 files changed, 36 insertions(+), 84 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved Objections: Siebrand: There's a problem with this change, please improve diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index d377d30..fb3d9b2 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -157,7 +157,6 @@ C9180EC418AED30C006C1DCA /* WikipediaAppUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = C9180EC318AED30C006C1DCA /* WikipediaAppUtils.m */; }; C958EE3418CE73E600148D13 /* DownloadTitlesForRandomArticlesOp.m in Sources */ = {isa = PBXBuildFile; fileRef = C958EE3318CE73E600148D13 /* DownloadTitlesForRandomArticlesOp.m */; }; C9928B8618AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.m in Sources */ = {isa = PBXBuildFile; fileRef = C9928B8518AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.m */; }; - C9928B8818AD5E1000FCCA9A /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = C9928B8718AD5E1000FCCA9A /* Settings.bundle */; }; D42E75EB18D11237002EA7E5 /* MWLanguageInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = D42E75EA18D11237002EA7E5 /* MWLanguageInfo.m */; }; D469889518B52DA200DBE014 /* Main_iPhone.strings in Resources */ = {isa = PBXBuildFile; fileRef = D469889318B52DA200DBE014 /* Main_iPhone.strings */; }; D46CD8C418A1AC4F0042959E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D46CD8C018A1AC4F0042959E /* InfoPlist.strings */; }; @@ -472,7 +471,6 @@ C958EE3318CE73E600148D13 /* DownloadTitlesForRandomArticlesOp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadTitlesForRandomArticlesOp.m; sourceTree = group; }; C9928B8418AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadWikipediaZeroMessageOp.h; sourceTree = group; }; C9928B8518AD5C6A00FCCA9A /* DownloadWikipediaZeroMessageOp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadWikipediaZeroMessageOp.m; sourceTree = group; }; - C9928B8718AD5E1000FCCA9A /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = wrapper.plug-in; path = Settings.bundle; sourceTree = group; }; D42E75E918D11237002EA7E5 /* MWLanguageInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWLanguageInfo.h; path = mw-support/MWLanguageInfo.h; sourceTree = group; }; D42E75EA18D11237002EA7E5 /* MWLanguageInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MWLanguageInfo.m; path = mw-support/MWLanguageInfo.m; sourceTree = group; }; D44F630618DA77FF00EAD1DD /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InfoPlist.strings; sourceTree = group; }; @@ -1478,7 +1476,6 @@ D4EE00BB182445670090790F /* mw-support */, C9180EC118AED30C006C1DCA /* mw-utils */, 049566BF18F5F4CB0058EA12 /* Zero */, - C9928B8718AD5E1000FCCA9A /* Settings.bundle */, ); name = Wikipedia; path = wikipedia; @@ -1705,7 +1702,6 @@ 04F27B7618FE0F2E00EDD838 /* PageHistoryResultPrototypeView.xib in Resources */, 04C91CF319554B310035ED1B /* logo-onboard...@2x.png in Resources */, 04292FF4185FBA70002A13FC /* SearchResultPrototypeView.xib in Resources */, -
[MediaWiki-commits] [Gerrit] Protect css from being overwritten by zero byte response. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Protect css from being overwritten by zero byte response. .. Protect css from being overwritten by zero byte response. Change-Id: I666d24ed1c53cb3ea63bc853c75cb4fa27295f9a --- M wikipedia/Data/Operations/SyncAssetsFileOp.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Data/Operations/SyncAssetsFileOp.m b/wikipedia/Data/Operations/SyncAssetsFileOp.m index 0ac6a16..84c826d 100644 --- a/wikipedia/Data/Operations/SyncAssetsFileOp.m +++ b/wikipedia/Data/Operations/SyncAssetsFileOp.m @@ -47,7 +47,7 @@ if (weakSelf.dataRetrieved) { NSString *jsonString = [[NSString alloc] initWithData:weakSelf.dataRetrieved encoding:NSUTF8StringEncoding]; //NSLog(@jsonString = %@, jsonString); -if (!jsonString) return; +if (!jsonString || (jsonString.length == 0)) return; NSString *filePath = assetsFile.path; NSError *error = nil; [jsonString writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:error]; -- To view, visit https://gerrit.wikimedia.org/r/142721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I666d24ed1c53cb3ea63bc853c75cb4fa27295f9a Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update EventLogging edit funnel - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/142724 Change subject: Update EventLogging edit funnel .. Update EventLogging edit funnel Change-Id: Ib629cd9f45f70d50ab3a8bc9fe13d6e2e21b731a --- M wikipedia/EventLogging/EditFunnel.h M wikipedia/EventLogging/EditFunnel.m M wikipedia/View Controllers/Login/LoginViewController.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 4 files changed, 43 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/24/142724/1 diff --git a/wikipedia/EventLogging/EditFunnel.h b/wikipedia/EventLogging/EditFunnel.h index 9b60592..92ccdb3 100644 --- a/wikipedia/EventLogging/EditFunnel.h +++ b/wikipedia/EventLogging/EditFunnel.h @@ -15,17 +15,19 @@ -(id)init; -(void)logStart; -(void)logPreview; +/** + * Parameter should be one of the string keys defined at + * https://meta.wikimedia.org/wiki/Schema_talk:MobileWikiAppEdit#Schema_missing_enum_for_editSummaryTapped + */ +-(void)logEditSummaryTap:(NSString *)editSummaryTapped; -(void)logSavedRevision:(int)revID; --(void)logLoginAttempt; --(void)logLoginSuccess; --(void)logLoginFailure; -(void)logCaptchaShown; -(void)logCaptchaFailure; -(void)logAbuseFilterWarning:(NSString *)code; -(void)logAbuseFilterError:(NSString *)code; -(void)logAbuseFilterWarningIgnore:(NSString *)code; -(void)logAbuseFilterWarningBack:(NSString *)code; --(void)logSaveAnonExplicit; +-(void)logSaveAttempt; // @FIXME USE -(void)logError:(NSString *)code; @end diff --git a/wikipedia/EventLogging/EditFunnel.m b/wikipedia/EventLogging/EditFunnel.m index 359ac4e..3685716 100644 --- a/wikipedia/EventLogging/EditFunnel.m +++ b/wikipedia/EventLogging/EditFunnel.m @@ -15,7 +15,7 @@ -(id)init { // https://meta.wikimedia.org/wiki/Schema:MobileWikiAppEdit -self = [super initWithSchema:@MobileWikiAppEdit version:8198182]; +self = [super initWithSchema:@MobileWikiAppEdit version:9003125]; if (self) { self.editSessionToken = [self singleUseUUID]; } @@ -26,9 +26,14 @@ { NSMutableDictionary *dict = [eventData mutableCopy]; dict[@editSessionToken] = self.editSessionToken; -NSString *userName = [SessionSingleton sharedInstance].keychainCredentials.userName; -dict[@userName] = userName ? userName : @; -//dict[@pageNS] = @0; // @todo allow other types or ...? // Android doesn't send this? +NSString *userName = [SessionSingleton sharedInstance].keychainCredentials.userName; // @FIXME send user ID +if (!userName || [userName isEqualToString:@]) { +dict[@userID] = @0; // not logged in +} else { +// @FIXME fetch the actual user ID +dict[@userID] = @(-1); +} +//dict[@pageNS] = @0; // @todo actually get the namespace... return [NSDictionary dictionaryWithDictionary: dict]; } @@ -44,26 +49,17 @@ [self log:@{@action: @preview}]; } +-(void)logEditSummaryTap:(NSString *)editSummaryTapped +{ +[self log:@{@action: @editSummaryTap, +@editSummaryTapped: editSummaryTapped}]; +} + -(void)logSavedRevision:(int)revID { NSNumber *revIDNumber = [NSNumber numberWithInt:revID]; [self log:@{@action: @saved, @revID: (revIDNumber ? revIDNumber : @)}]; -} - --(void)logLoginAttempt -{ -[self log:@{@action: @loginAttempt}]; -} - --(void)logLoginSuccess -{ -[self log:@{@action: @loginSuccess}]; -} - --(void)logLoginFailure -{ -[self log:@{@action: @loginFailure}]; } -(void)logCaptchaShown @@ -100,9 +96,9 @@ @abuseFilterCode: (code ? code : @)}]; } -- (void)logSaveAnonExplicit +-(void)logSaveAttempt // @FIXME WHAT CALLS THIS { -[self log:@{@action: @saveAnonExplicit}]; +[self log:@{@action: @saveAttempt}]; } - (void)logError:(NSString *)code diff --git a/wikipedia/View Controllers/Login/LoginViewController.m b/wikipedia/View Controllers/Login/LoginViewController.m index 1226d40..f9532a9 100644 --- a/wikipedia/View Controllers/Login/LoginViewController.m +++ b/wikipedia/View Controllers/Login/LoginViewController.m @@ -179,10 +179,6 @@ -(void)save { -if (NAV.isEditorOnNavstack) { -[NAV.editor.funnel logLoginAttempt]; -} - id onboardingVC = [self searchModalsForViewControllerOfClass:[OnboardingViewController class]]; [self loginWithUserName: self.usernameField.text @@ -261,10 +257,6 @@ [self.funnel logSuccess]; - if (NAV.isEditorOnNavstack) { - [NAV.editor.funnel logLoginSuccess]; - } - } cancelledBlock: ^(NSError *error){ [self showAlert:error.localizedDescription]; @@ -280,10 +272,6 @@ [self.funnel
[MediaWiki-commits] [Gerrit] Remove 'webkit-backface-removal' rule which made iPads super... - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/142975 Change subject: Remove 'webkit-backface-removal' rule which made iPads super blurry .. Remove 'webkit-backface-removal' rule which made iPads super blurry An extra CSS rule was snuck into the .transition mixin in I895679ff which caused the entire content area in Vector skin to render blurry on iPads, especially visible on non-Retina devices. There was no mention of it in the commit message, but a comment in the mixin source said something about a '1px Chrome movement bug'. With no source for said Chrome bug and a definite Safari bug, let's try removing it for now. Bug: 67286 Change-Id: If6e88d2b5fa7adaa3cd8198686422a65689fa68b --- M resources/src/mediawiki.less/mediawiki.mixins.less 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/75/142975/1 diff --git a/resources/src/mediawiki.less/mediawiki.mixins.less b/resources/src/mediawiki.less/mediawiki.mixins.less index 67e2f33..b65a62b 100644 --- a/resources/src/mediawiki.less/mediawiki.mixins.less +++ b/resources/src/mediawiki.less/mediawiki.mixins.less @@ -61,7 +61,6 @@ } .transition(@value) { - -webkit-backface-visibility: hidden; // fixes Chrome 1px movement bug -webkit-transition: @value; -moz-transition: @value; -o-transition: @value; -- To view, visit https://gerrit.wikimedia.org/r/142975 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6e88d2b5fa7adaa3cd8198686422a65689fa68b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Credits: HPPLE -- Hpple - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Credits: HPPLE -- Hpple .. Credits: HPPLE -- Hpple According to the project's page on github: https://github.com/topfunky/hpple, they don't capitalize it in all caps. Change-Id: If4a690af04a20805d087f51f982fd114f2f9a225 --- M wikipedia/Base.lproj/Main_iPhone.storyboard 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard b/wikipedia/Base.lproj/Main_iPhone.storyboard index 3d919f6..6140d84 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -604,7 +604,7 @@ fontDescription key=fontDescription type=system pointSize=17/ nil key=highlightedColor/ /label -label opaque=NO clipsSubviews=YES contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=HPPLE lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=280 translatesAutoresizingMaskIntoConstraints=NO id=eSk-uQ-Ran +label opaque=NO clipsSubviews=YES contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Hpple lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=280 translatesAutoresizingMaskIntoConstraints=NO id=eSk-uQ-Ran rect key=frame x=20 y=306 width=280 height=21/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ constraints -- To view, visit https://gerrit.wikimedia.org/r/142809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If4a690af04a20805d087f51f982fd114f2f9a225 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use Content instead of Wiki text - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Use Content instead of Wiki text .. Use Content instead of Wiki text With the introduction of ContentHandler, it's no longer safe to assume that pages are created with wikitext. In that same line, the preferred terminology is content. P.S. wikitext is one word :-) Change-Id: I26694c337666982e6d86af7204594afe3bc7f939 --- M wikipedia/en.lproj/Localizable.strings 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index 14c830c..6c5b9f3 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -48,9 +48,9 @@ login-username-placeholder-text = User name; login-password-placeholder-text = Password; -wikitext-downloading = Loading wiki text...; +wikitext-downloading = Loading content...; wikitext-download-failed = Unable to obtain latest revision.; -wikitext-download-success = Wiki text loaded.; +wikitext-download-success = Content loaded.; wikitext-preview-changes = Retrieving preview of your changes...; wikitext-preview-changes-none = No changes were made to be previewed.; wikitext-upload-result-unknown = Unable to determine wikitext upload result.; -- To view, visit https://gerrit.wikimedia.org/r/142811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I26694c337666982e6d86af7204594afe3bc7f939 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixes for page history and language selector crashes. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fixes for page history and language selector crashes. .. Fixes for page history and language selector crashes. Recent changes to showAlert to make it work with modally presented views were causing crashes with non UIViewController storyboard elements. This happened because showAlert is adding its view to whatever view controller invokes it but UITableViewControllers don't play nice with autolayout if you try to add an autolayout constrained view to their view. Super lame. Quick fix was to simply use UIViewControllers in the storyboard (which then contain the UITableViews as subviews). Fixed bug with article language selection not using MWPageTitle. Updated page history date heading background colors to match chrome color. Change-Id: I9fad5d8ff75aeedd089bc8d9f0272ff4cfa9529d --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/Base.lproj/Main_iPhone.storyboard R wikipedia/View Controllers/Languages/LanguagesViewController.h R wikipedia/View Controllers/Languages/LanguagesViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/View Controllers/PageHistory/PageHistoryViewController.h M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 8 files changed, 146 insertions(+), 99 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index fb3d9b2..e5a637d 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -25,7 +25,7 @@ 04142A8F184F974E006EF779 /* NSDate-Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 04142A8E184F974E006EF779 /* NSDate-Utilities.m */; }; 0415581C18ADFA5D00B81A59 /* UIImage+ColorMask.m in Sources */ = {isa = PBXBuildFile; fileRef = 0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m */; }; 041A3B5E18E11ED90079FF1C /* LanguagesCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 041A3B5918E11ED90079FF1C /* LanguagesCell.m */; }; - 041A3B6218E11ED90079FF1C /* LanguagesTableVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m */; }; + 041A3B6218E11ED90079FF1C /* LanguagesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 041A3B5D18E11ED90079FF1C /* LanguagesViewController.m */; }; 041C55D21950B27D006CE0EF /* EditSummaryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 041C55D11950B27D006CE0EF /* EditSummaryViewController.m */; }; 04272E7B1940EEBC00CC682F /* AssetsFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 04272E791940EEBC00CC682F /* AssetsFile.m */; }; 04292FF2185FBA70002A13FC /* SearchResultCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04292FF0185FBA70002A13FC /* SearchResultCell.m */; }; @@ -215,8 +215,8 @@ 0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIImage+ColorMask.m; sourceTree = group; }; 041A3B5818E11ED90079FF1C /* LanguagesCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesCell.h; sourceTree = group; }; 041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesCell.m; sourceTree = group; }; - 041A3B5C18E11ED90079FF1C /* LanguagesTableVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesTableVC.h; sourceTree = group; }; - 041A3B5D18E11ED90079FF1C /* LanguagesTableVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesTableVC.m; sourceTree = group; }; + 041A3B5C18E11ED90079FF1C /* LanguagesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesViewController.h; sourceTree = group; }; + 041A3B5D18E11ED90079FF1C /* LanguagesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesViewController.m; sourceTree = group; }; 041C55D01950B27D006CE0EF /* EditSummaryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditSummaryViewController.h; sourceTree = group; }; 041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditSummaryViewController.m; sourceTree = group; };
[MediaWiki-commits] [Gerrit] Don't append literal Other to edit summary when Other te... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/143052 Change subject: Don't append literal Other to edit summary when Other text is filled out .. Don't append literal Other to edit summary when Other text is filled out Bug: 67222 Change-Id: I5af617330ff11b9e4f1b8c78c1d43188b06cc031 --- M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/52/143052/1 diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m index 42f4caa..fa46198 100644 --- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m +++ b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m @@ -70,14 +70,15 @@ { NSMutableArray *summaryArray = @[].mutableCopy; -if (self.summaryText (self.summaryText.length 0)) { -[summaryArray addObject:self.summaryText]; -} if (self.cannedSummary01.enabled) [summaryArray addObject:self.cannedSummary01.text]; if (self.cannedSummary02.enabled) [summaryArray addObject:self.cannedSummary02.text]; if (self.cannedSummary03.enabled) [summaryArray addObject:self.cannedSummary03.text]; -if (self.cannedSummary04.enabled) [summaryArray addObject:self.cannedSummary04.text]; +if (self.cannedSummary04.enabled) { +if (self.summaryText (self.summaryText.length 0)) { +[summaryArray addObject:self.summaryText]; +} +} return [summaryArray componentsJoinedByString:@; ]; } -- To view, visit https://gerrit.wikimedia.org/r/143052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5af617330ff11b9e4f1b8c78c1d43188b06cc031 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for logo being too close to screen top on 3.5 inch screens. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for logo being too close to screen top on 3.5 inch screens. .. Fix for logo being too close to screen top on 3.5 inch screens. Change-Id: I4a7addfa12bb923227bdce4c70499c983b7bb66f --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/View Controllers/Onboarding/OnboardingViewController.m 2 files changed, 7 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard b/wikipedia/Base.lproj/Main_iPhone.storyboard index ad70e03..cfd1212 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1057,6 +1057,7 @@ connections outlet property=createAccountButton destination=wkl-j8-wLX id=Q0x-Lf-aBP/ outlet property=loginButton destination=heA-3K-nhS id=90C-kg-bai/ +outlet property=logoImage destination=K0v-hf-TOf id=IDl-op-jI7/ outlet property=skipButton destination=P6J-IE-CiO id=uVS-3Y-c6m/ outlet property=spaceAboveLogoConstraint destination=0B0-Zk-SGf id=Xaw-AS-lGs/ outlet property=spaceBelowLogoConstraint destination=nWX-Cw-MAY id=RnU-fa-AFO/ diff --git a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m index c4386d5..abd26d3 100644 --- a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m +++ b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m @@ -22,6 +22,8 @@ @property (weak, nonatomic) IBOutlet NSLayoutConstraint *spaceBelowLogoConstraint; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *spaceAboveLogoConstraint; +@property (weak, nonatomic) IBOutlet UIImageView *logoImage; + @end @implementation OnboardingViewController @@ -85,10 +87,12 @@ CGFloat aboveMultiplier = 1.0; CGFloat belowMultiplier = 1.0; switch ((int)[UIScreen mainScreen].bounds.size.height) { -case 480: +case 480:{ // Make everything fit on 3.5 inch screens. -aboveMultiplier = 0.2; +aboveMultiplier = 1.0; belowMultiplier = 0.0; +self.logoImage.layer.transform = CATransform3DMakeScale(0.85, 0.85, 1.0); +} break; case 1024: // Make everything fit on iPad screens. -- To view, visit https://gerrit.wikimedia.org/r/143066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a7addfa12bb923227bdce4c70499c983b7bb66f Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Scrolling web view shows/hides chrome. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Scrolling web view shows/hides chrome. .. Scrolling web view shows/hides chrome. Whitespace tap only reveals chrome, never hides it. Title bar tap to scroll to top reveals menu as well. One pixel line at bottom of nav bar now appears if nav is scrolled away. Change-Id: I39b41b8e7bb34fbef540cbbbf0cd9cbb8703c2b8 --- M wikipedia/View Controllers/Root/RootViewController.h M wikipedia/View Controllers/Root/RootViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 56 insertions(+), 31 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Root/RootViewController.h b/wikipedia/View Controllers/Root/RootViewController.h index ef586a6..b661a75 100644 --- a/wikipedia/View Controllers/Root/RootViewController.h +++ b/wikipedia/View Controllers/Root/RootViewController.h @@ -12,7 +12,9 @@ @property (nonatomic) BOOL topMenuHidden; -- (void)animateTopAndBottomMenuToggle; +@property (nonatomic) BOOL isAnimatingTopAndBottomMenuHidden; + +- (void)animateTopAndBottomMenuHidden:(BOOL)hidden; - (void)togglePrimaryMenu; diff --git a/wikipedia/View Controllers/Root/RootViewController.m b/wikipedia/View Controllers/Root/RootViewController.m index 73aac5a..3c536fd 100644 --- a/wikipedia/View Controllers/Root/RootViewController.m +++ b/wikipedia/View Controllers/Root/RootViewController.m @@ -50,9 +50,9 @@ // Fade out the top menu when it is hidden. CGFloat alpha = topMenuHidden ? 0.0 : 1.0; -self.topMenuViewController.navBarContainer.alpha = alpha; - +// Note: don't fade out the navBarContainer or the line at its bottom gets hidden! //self.topMenuViewController.navBarContainer.alpha = alpha; + for (UIView *v in self.topMenuViewController.navBarContainer.subviews) { v.alpha = alpha; } @@ -230,14 +230,19 @@ self.centerContainerTopConstraint.constant = topMenuHeight; } --(void)animateTopAndBottomMenuToggle +-(void)animateTopAndBottomMenuHidden:(BOOL)hidden { +// Don't toggle if hidden state isn't different or if it's already toggling. +if ((self.topMenuHidden == hidden) || self.isAnimatingTopAndBottomMenuHidden) return; + +self.isAnimatingTopAndBottomMenuHidden = YES; + // Queue it up so web view doesn't get blanked out. [[NSOperationQueue mainQueue] addOperationWithBlock:^{ -[UIView animateWithDuration:0.15f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{ +[UIView animateWithDuration:0.12f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{ -self.topMenuHidden = !self.topMenuHidden; +self.topMenuHidden = hidden; WebViewController *webVC = [NAV searchNavStackForViewControllerOfClass:[WebViewController class]]; webVC.bottomMenuHidden = self.topMenuHidden; @@ -250,6 +255,7 @@ [self.view.superview layoutIfNeeded]; } completion:^(BOOL done){ +self.isAnimatingTopAndBottomMenuHidden = NO; }]; }]; diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index 27ecee1..224ce08 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -868,6 +868,10 @@ // @todo merge this link title extraction into MWSite if ([href hasPrefix:@/wiki/]) { + +// Ensure the menu is visible when navigating to new page. +[weakSelf animateTopAndBottomMenuReveal]; + NSString *title = [href substringWithRange:NSMakeRange(6, href.length - 6)]; MWPageTitle *pageTitle = [MWPageTitle titleWithString:title]; @@ -925,11 +929,7 @@ [self.bridge addListener:@nonAnchorTouchEndedWithoutDragging withBlock:^(NSString *messageType, NSDictionary *payload) { NSLog(@nonAnchorTouchEndedWithoutDragging = %@, payload); -if (!weakSelf.tocVC) { -if (ROOT.topMenuViewController.navBarMode != NAVBAR_MODE_SEARCH) { -[ROOT animateTopAndBottomMenuToggle]; -} -} +[weakSelf animateTopAndBottomMenuReveal]; // nonAnchorTouchEndedWithoutDragging is used so TOC may be hidden if user tapped, but did *not* drag. // Used because UIWebView is difficult to attach one-finger touch events to. @@ -1073,25 +1073,6 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { -/* -// Hides nav bar when a scroll threshold is exceeded. Probably only want to do this -// when the webView's scrollView scrolls. Probably also want to set the status bar to -// be not transparent when the nav bar is hidden - if not
[MediaWiki-commits] [Gerrit] Quick fix for space above onboarding globe on iOS 6. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Quick fix for space above onboarding globe on iOS 6. .. Quick fix for space above onboarding globe on iOS 6. Change-Id: If9bacc5ed3a5ec89f9a433646f4550a348d3e694 --- M wikipedia/View Controllers/Onboarding/OnboardingViewController.m 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m index abd26d3..e26d69d 100644 --- a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m +++ b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m @@ -107,9 +107,9 @@ self.spaceAboveLogoConstraint.constant = roundf(self.spaceAboveLogoConstraint.constant * aboveMultiplier); // Adjust for iOS 6 status bar height. -//if (NSFoundationVersionNumber = NSFoundationVersionNumber_iOS_6_1) { -//self.spaceAboveLogoConstraint.constant -= 20; -//} +if (NSFoundationVersionNumber = NSFoundationVersionNumber_iOS_6_1) { +self.spaceAboveLogoConstraint.constant -= 20; +} } -(void)styleLoginButtonText -- To view, visit https://gerrit.wikimedia.org/r/143509 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9bacc5ed3a5ec89f9a433646f4550a348d3e694 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Small refactorings. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Small refactorings. .. Small refactorings. Change-Id: Ic462aafc833d334d11146dfc6881a2be3415f46b --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/View Controllers/TableOfContents/TOCViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 92 insertions(+), 35 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index c51d9ee..7de2aab 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -1103,7 +1103,6 @@ 04C43AB0183441A4006C643B /* View Controllers */ = { isa = PBXGroup; children = ( - D49B2ECF196C684F002F035D /* PullToRefresh */, 04A97E8418B81D440046B166 /* AccountCreation */, 04B7B9BA18B5569600A63551 /* Captcha */, 043DAC481901C3D2001CD17C /* Credits */, @@ -1116,6 +1115,7 @@ 04C91CE8195517030035ED1B /* Onboarding */, 04F27B6D18FE0F2E00EDD838 /* PageHistory */, 04DD89AE18BFE63A00DD5DAD /* Preview */, + D49B2ECF196C684F002F035D /* PullToRefresh */, 0412CC5F192536580010E616 /* Root */, 04293002186030B0002A13FC /* SavedPages */, 04292FEE185FBA70002A13FC /* SearchResults */, diff --git a/wikipedia/View Controllers/TableOfContents/TOCViewController.m b/wikipedia/View Controllers/TableOfContents/TOCViewController.m index f639571..cf8b5c8 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCViewController.m +++ b/wikipedia/View Controllers/TableOfContents/TOCViewController.m @@ -257,6 +257,11 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView { +static NSInteger lastOffsetY = 0; +NSInteger thisOffsetY = (NSInteger)scrollView.contentOffset.y; +if ((thisOffsetY == lastOffsetY) || (thisOffsetY % 2)) return; +lastOffsetY = thisOffsetY; + if (scrollView == self.scrollView) { for (TOCSectionCellView *cell in self.sectionCells) { diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index b6da02b..a386292 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -50,6 +50,7 @@ #import OnboardingViewController.h #import TopMenuContainerView.h #import WikiGlyph_Chars.h +#import UINavigationController+TopActionSheet.h //#import UIView+Debugging.h @@ -1176,6 +1177,58 @@ // Do not remove the following commented toggle. It's for testing W0 stuff. //[[SessionSingleton sharedInstance].zeroConfigState toggleFakeZeroOn]; + +//[self toggleImageSheet]; +} + +-(void)toggleImageSheet +{ +// Quick hack for confirming images for article have routed properly to core data store. +// To do this for real, probably need to make separate view controller - could still present +// images using save autolayout stacking as topActionSheetShowWithViews, but would need to +// determine which UIImageViews were scrolled offscreen and nil their image property out +// until they're not offscreen. Could do separate UIImageView class to make this easier - it +// would have a property with the image's core data ImageData NSManagedObjectID. That way +// it could simply re-retrieve its image data whenever it needed to. +static BOOL showImageSheet = NO; +showImageSheet = !showImageSheet; + +if(showImageSheet){ +NSManagedObjectContext *ctx = articleDataContext_.mainContext; +[ctx performBlockAndWait:^(){ +NSManagedObjectID *articleID = +[ctx getArticleIDForTitle: [SessionSingleton sharedInstance].currentArticleTitle + domain: [SessionSingleton sharedInstance].currentArticleDomain]; +Article *article = (Article *)[ctx objectWithID:articleID]; +NSArray *sectionImages = [article getSectionImagesUsingContext:ctx]; +NSMutableArray *views = @[].mutableCopy; +for (SectionImage *sectionImage in sectionImages) { +Section *section = sectionImage.section; +NSString *title = (section.title.length 0) ? section.title : [SessionSingleton sharedInstance].currentArticleTitle; +//NSLog(@\n\n\nsection image = %@ \n\tsection = %@ \n\tindex in section = %@ \n\timage size = %@, sectionImage.image.fileName, sectionTitle, sectionImage.index, sectionImage.image.dataSize); +
[MediaWiki-commits] [Gerrit] Wrapped the 2 section retrieval chunks in blocks. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Wrapped the 2 section retrieval chunks in blocks. .. Wrapped the 2 section retrieval chunks in blocks. Change-Id: I26e092a9b75bdc9429889bca86f23a99ad9bce7e --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 151 insertions(+), 146 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index ed49186..43b3c99 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1330,58 +1330,60 @@ // Just in case the article wasn't created during the parent operation. if (!articleID) return; - -// The completion block happens on non-main thread, so must get article from articleID again. -// Because you can only use a context on a thread when the context was created on that thread -// this must happen on workerContext as well (see: http://stackoverflow.com/a/6356201/135557) -Article *article = (Article *)[articleDataContext_.workerContext objectWithID:articleID]; -//Non-lead sections have been retreived so set needsRefresh to NO. -article.needsRefresh = @NO; +[articleDataContext_.workerContext performBlockAndWait:^(){ +// The completion block happens on non-main thread, so must get article from articleID again. +// Because you can only use a context on a thread when the context was created on that thread +// this must happen on workerContext as well (see: http://stackoverflow.com/a/6356201/135557) +Article *article = (Article *)[articleDataContext_.workerContext objectWithID:articleID]; -NSArray *sectionsRetrieved = results[@sections]; +//Non-lead sections have been retreived so set needsRefresh to NO. +article.needsRefresh = @NO; -for (NSDictionary *section in sectionsRetrieved) { -if (![section[@id] isEqual: @0]) { - -// Add sections for article -Section *thisSection = [NSEntityDescription insertNewObjectForEntityForName:@Section inManagedObjectContext:articleDataContext_.workerContext]; +NSArray *sectionsRetrieved = results[@sections]; -// Section index is a string because transclusion sections indexes will start with T-. -if ([section[@index] isKindOfClass:[NSString class]]) { -thisSection.index = section[@index]; +for (NSDictionary *section in sectionsRetrieved) { +if (![section[@id] isEqual: @0]) { + +// Add sections for article +Section *thisSection = [NSEntityDescription insertNewObjectForEntityForName:@Section inManagedObjectContext:articleDataContext_.workerContext]; + +// Section index is a string because transclusion sections indexes will start with T-. +if ([section[@index] isKindOfClass:[NSString class]]) { +thisSection.index = section[@index]; +} + +thisSection.title = section[@line]; + +if ([section[@level] isKindOfClass:[NSString class]]) { +thisSection.level = section[@level]; +} + +// Section number, from the api, can be 3.5.2 etc, so it's a string. +if ([section[@number] isKindOfClass:[NSString class]]) { +thisSection.number = section[@number]; +} + +if (section[@fromtitle]) { +thisSection.fromTitle = section[@fromtitle]; +} + +thisSection.sectionId = section[@id]; + +thisSection.html = section[@text]; +thisSection.tocLevel = section[@toclevel]; +thisSection.dateRetrieved = [NSDate date]; +thisSection.anchor = (section[@anchor]) ? section[@anchor] : @; + +[article addSectionObject:thisSection]; + +[thisSection createImageRecordsForHtmlOnContext:articleDataContext_.workerContext]; } - -thisSection.title = section[@line]; - -if ([section[@level] isKindOfClass:[NSString class]]) { -thisSection.level = section[@level]; -} - -// Section number, from the api, can be 3.5.2 etc, so it's a string. -if ([section[@number] isKindOfClass:[NSString class]]) { -thisSection.number = section[@number]; -
[MediaWiki-commits] [Gerrit] Update CSS derivative files that didn't get updated before w... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145674 Change subject: Update CSS derivative files that didn't get updated before whoops .. Update CSS derivative files that didn't get updated before whoops Change-Id: Iea5fbef0cf1000746897e2ad0645b0a067ed185d --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/74/145674/1 diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 444e2d8..8574f49 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -283,7 +283,7 @@ } a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); - background-image: url(//bits.beta.wmflabs.org/static-master/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-05-23T12:15:00Z)!ie; + background-image: url(//bits.wikimedia.org/static-1.24wmf12/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-03T17:31:40Z)!ie; /* We don't need the !ie hack because this old IE uses the fallback already */ background-image: -webkit-linear-gradient(transparent,transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGRlZnM+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNLS45NTgtNC4yNTljLTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2IDAgLjM5NC4xNDMuNzM2LjMzNiAxLjA0OWwtLjA3LjA1NmMtLjM3My0uNTEzLS45NTQtLjg2Ny0xLjYzNi0uODY3LTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2cy45MjIgMi4wNTYgMi4wNTYgMi4wNTZjLjU5NiAwIDEuMTIxLS4yNjUgMS40OTYtLjY3MS0uMDc1LjIxMy0uMTI2LjQzMy0uMTI2LjY3MSAwIDEuMTM0LjkyMiAyLjA1NiAyLjA1NiAyLjA1NnMyLjA1Ni0uOTIyIDIuMDU2LTIuMDU2YzAtLjQ3Ni0uMTg5LS44OTYtLjQ2Mi0xLjI0NS44MTMuMTU4IDEuNjI3LjQ3NyAyLjIyNCAxLjM5OS0uNDQzLS40NDMtLjcyNy0xLjI0OC0uNzI3LTIuMzM2bC0uMzc4LS4wMjguMzUtLjAxNGMwLTEuMDg3LjI3LTEuODkzLjcxMy0yLjMzNi0uNTc1Ljg4OS0xLjM1NCAxLjIxNi0yLjE0IDEuMzg1LjI0My0uMzM3LjQyLS43MjguNDItMS4xNzUgMC0xLjEzNC0uOTIyLTIuMDU2LTIuMDU2LTIuMDU2eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNMC0yLjgyOGwtMi44MjggMi44MjggMi44MjggMi44MjggMi44MjgtMi44MjgtMi44MjgtMi44Mjh6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSJOYU4iLz48L21hcmtlcj48bWFya2VyIG9yaWVudD0iYXV0byIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0xMCAwbDQtNC0xNCA0IDE0IDQtNC00eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PC9kZWZzPjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzA2YyIgZD0iTS41IDMuNTE4aDUuOTgydjUuOTgyaC01Ljk4MnoiLz48cGF0aCBkPSJNNC43NTUtLjE2aDUuMjM0djUuMzlsLTEuNTcxIDEuNTQ0LTEuMzEtMS4zMS0yLjcyNSAyLjcyNS0yLjY4OC0yLjY4OCAyLjgwOC0yLjgwOC0xLjMxLTEuMzF6IiBmaWxsPSIjMDZmIi8+PHBhdGggZD0iTTguOTg0Ljg0NWwuMDIyIDQuODg0LTEuODE3LTEuODE3LTIuODgxIDIuODgxLTEuMjI3LTEuMjI3IDIuODgxLTIuODgxLTEuODUtMS44NTF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+); background-image: linear-gradient(transparent,transparent),
[MediaWiki-commits] [Gerrit] Saved pages and history no entries labels wrapping on. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Saved pages and history no entries labels wrapping on. .. Saved pages and history no entries labels wrapping on. Change-Id: I09a31cb1106a33c0feeb8eb9afdf6b8a324b95d2 --- M wikipedia/Base.lproj/Main_iPhone.storyboard 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard b/wikipedia/Base.lproj/Main_iPhone.storyboard index 625b01e..24a646e 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1114,7 +1114,7 @@ constraint firstAttribute=height constant=118 id=EK2-gD-TIz/ /constraints /imageView -label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=No saved pages yet. textAlignment=center lineBreakMode=tailTruncation baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO translatesAutoresizingMaskIntoConstraints=NO id=W1c-wQ-1pa userLabel=Big label customClass=PaddedLabel +label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=No saved pages yet. textAlignment=center lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=W1c-wQ-1pa userLabel=Big label customClass=PaddedLabel rect key=frame x=40 y=126 width=240 height=21/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ constraints @@ -1124,7 +1124,7 @@ color key=textColor cocoaTouchSystemColor=darkTextColor/ nil key=highlightedColor/ /label -label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Saved pages are pretty awesome. Think of them as bookmarks that you can read even when you are offline. textAlignment=center lineBreakMode=wordWrap numberOfLines=4 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=GiD-Rj-wb7 userLabel=Little label customClass=PaddedLabel +label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Saved pages are pretty awesome. Think of them as bookmarks that you can read even when you are offline. textAlignment=center lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=GiD-Rj-wb7 userLabel=Little label customClass=PaddedLabel rect key=frame x=40 y=155 width=240 height=51/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ constraints @@ -1420,7 +1420,7 @@ constraint firstAttribute=width constant=120 id=rnI-Xg-L2E/ /constraints /imageView -label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=No recent pages here. textAlignment=center lineBreakMode=tailTruncation baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO translatesAutoresizingMaskIntoConstraints=NO id=aUp-0e-F6i userLabel=Big label customClass=PaddedLabel +label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=No recent pages here. textAlignment=center lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=aUp-0e-F6i userLabel=Big label customClass=PaddedLabel rect key=frame x=40 y=56 width=240 height=21/
[MediaWiki-commits] [Gerrit] Update storyboard strings, qqq files when master files change - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145708 Change subject: Update storyboard strings, qqq files when master files change .. Update storyboard strings, qqq files when master files change en.lproj/Main_iPhone.strings now updates automatically when new things appear in Main_iPhone.storyboard. qqq.lproj/*.strings files now have stub entries added for any new entries in en.lproj/*.strings files. These should be very visible in code review if they don't get caught before committing. :) Change-Id: Ibd01ba5eb754ec9aaafddf0391496c8c527273cc --- M Wikipedia.xcodeproj/project.pbxproj A scripts/update-qqq.php M wikipedia/qqq.lproj/Localizable.strings M wikipedia/qqq.lproj/Main_iPhone.strings 4 files changed, 281 insertions(+), 66 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/08/145708/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index be38747..ad6ceb2 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -1573,9 +1573,11 @@ buildPhases = ( D4991431181D51DE00E6073C /* Sources */, D4991432181D51DE00E6073C /* Frameworks */, - D4991433181D51DE00E6073C /* Resources */, 04272E7619404CDF00CC682F /* ShellScript */, 04272E75193FF7F000CC682F /* ShellScript */, + D4C16A621970946900CD91AD /* ShellScript */, + D4C16A631970949A00CD91AD /* ShellScript */, + D4991433181D51DE00E6073C /* Resources */, ); buildRules = ( ); @@ -1753,6 +1755,37 @@ shellPath = /bin/sh; shellScript = scripts/run-grunt.sh; }; + D4C16A621970946900CD91AD /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + $(SRCROOT)/wikipedia/Base.lproj/Main_iPhone.storyboard, + ); + outputPaths = ( + $(SRCROOT)/wikipedia/en.lproj/Main_iPhone.strings, + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = scripts/update-storyboard-strings.php; + }; + D4C16A631970949A00CD91AD /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + $(SRCROOT)/wikipedia/en.lproj/Main_iPhone.strings, + $(SRCROOT)/wikipedia/en.lproj/InfoPlist.strings, + $(SRCROOT)/wikipedia/en.lproj/Localizable.strings, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = scripts/update-qqq.php; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/scripts/update-qqq.php b/scripts/update-qqq.php new file mode 100755 index 000..c192a6d --- /dev/null +++ b/scripts/update-qqq.php @@ -0,0 +1,239 @@ +#!/usr/bin/php -q +?php + +/** + * AppleFFS class implements support for Apple .strings files. + * This class reads and writes only UTF-8 files. + * + * @author Brion Vibber bvib...@wikimedia.org + * + * derived from the AppleFFS in Translate extension, but hacked down + */ +class AppleStringsFile { + // READ + + public function readFromFile( $path ) { + $data = file_get_contents( $path ); + return $this-readFromVariable( $data ); + } + + public function write( $data ) { + return $this-writeReal( $data ); + } + + /** +* @param array $data +* @return array Parsed data. +* @throws Exception +*/ + public function readFromVariable( $data ) { + $lines = explode( \n, $data ); + $authors = $messages = array(); + $linecontinuation = false; + + $value = ''; + foreach ( $lines as $line ) { + if ( $linecontinuation ) { + $linecontinuation = false; +
[MediaWiki-commits] [Gerrit] Use system language as default wiki search language - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145719 Change subject: Use system language as default wiki search language .. Use system language as default wiki search language This will set the search language to the system locale lang unless you've set an explicit setting -- previously we simply used English as a default, whoops! Also loads the appropriate Main Page on first view (note if switching languages after first run, we'll show whatever was shown previously, even if it's a main page). Moved a few bits from SessionSingleton and WebViewController to WikipediaAppUtils: * domainNameForCode * mainArticleTitleForCode * copyAssetsFoldertoAppDataDocuments also added: * wikiLangForSystemLang Currently the system-wiki langugage mappings simply throw away any variant or country code and take the rest as-is; should probably do a quick survey to make sure there aren't any conflicts with any of the languages supported by iOS. Change-Id: Iff978197949940ec53bb4c13bf5eb71f4dc0ba7f --- M wikipedia/AppDelegate.m M wikipedia/Importer/ArticleImporter.m M wikipedia/Session/SessionSingleton.h M wikipedia/Session/SessionSingleton.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/mw-utils/WikipediaAppUtils.h M wikipedia/mw-utils/WikipediaAppUtils.m 7 files changed, 169 insertions(+), 127 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/19/145719/1 diff --git a/wikipedia/AppDelegate.m b/wikipedia/AppDelegate.m index 585c6b6..309e163 100644 --- a/wikipedia/AppDelegate.m +++ b/wikipedia/AppDelegate.m @@ -4,6 +4,7 @@ #import AppDelegate.h #import URLCache.h #import NSDate-Utilities.h +#import WikipediaAppUtils.h @implementation AppDelegate @@ -18,6 +19,7 @@ diskPath: nil]; [NSURLCache setSharedURLCache:urlCache]; +[WikipediaAppUtils copyAssetsFolderToAppDataDocuments]; [self registerStandardUserDefaults]; [self systemWideStyleOverrides]; @@ -45,14 +47,36 @@ -(void)registerStandardUserDefaults { +NSString *systemLang = [[NSLocale preferredLanguages] objectAtIndex:0]; +NSString *lang = [WikipediaAppUtils wikiLangForSystemLang:systemLang]; +if (lang == nil) { +// Should not happen. +NSLog(@Could not map system language %@ to wiki language; falling back to en, systemLang); +lang = @en; +} + +NSString *langName = [WikipediaAppUtils domainNameForCode:lang]; +if (langName == nil) { +// Should not happen, hopefully. +NSLog(@Could not get localized name of language %@, lang); +langName = lang; +} + +NSString *mainPage = [WikipediaAppUtils mainArticleTitleForCode:lang]; +if (mainPage == nil) { +// Also should not happen, hopefully. +NSLog(@Could not get main page of language %@, lang); +mainPage = @Main Page; +} + // Register default default values. // See: http://stackoverflow.com/a/5397647/135557 NSDictionary *userDefaultsDefaults = @{ -@CurrentArticleTitle: @Main Page, -@CurrentArticleDomain: @en, -@Domain: @en, -@DomainName: @English, -@DomainMainArticleTitle: @Main Page, +@CurrentArticleTitle: mainPage, +@CurrentArticleDomain: lang, +@Domain: lang, +@DomainName: langName, +@DomainMainArticleTitle: mainPage, @Site: @wikipedia.org, @ZeroWarnWhenLeaving : @YES, @ZeroOnDialogShownOnce : @NO, @@ -64,6 +88,11 @@ [[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsDefaults]; } +- (NSString *)defaultLanguageName +{ +return @English; +} + -(void)systemWideStyleOverrides { // Minimize flicker of search result table cells being recycled as they diff --git a/wikipedia/Importer/ArticleImporter.m b/wikipedia/Importer/ArticleImporter.m index c350867..5910851 100644 --- a/wikipedia/Importer/ArticleImporter.m +++ b/wikipedia/Importer/ArticleImporter.m @@ -7,6 +7,7 @@ #import ArticleCoreDataObjects.h #import SessionSingleton.h #import NSManagedObjectContext+SimpleFetch.h +#import WikipediaAppUtils.h @implementation ArticleImporter @@ -70,7 +71,7 @@ article.lastmodifiedby = @; article.redirected = @; article.domainName = -[[SessionSingleton sharedInstance] domainNameForCode:article.domain]; +[WikipediaAppUtils domainNameForCode:article.domain]; // Add saved record for article. Saved *saved = diff --git a/wikipedia/Session/SessionSingleton.h b/wikipedia/Session/SessionSingleton.h index 0459157..52060ff 100644 --- a/wikipedia/Session/SessionSingleton.h +++ b/wikipedia/Session/SessionSingleton.h @@ -31,9 +31,7 @@ @property (nonatomic) BOOL fallback; -(NSURL *)urlForDomain:(NSString
[MediaWiki-commits] [Gerrit] Work in progress: early testing of integration with ogv.js m... - change (mediawiki...TimedMediaHandler)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145756 Change subject: Work in progress: early testing of integration with ogv.js media player .. Work in progress: early testing of integration with ogv.js media player ogv.js is a basic audio/video player in JavaScript, using the standard Xiph ogg/vorbis/theora libraries cross-compiled with emscripten. It's meant to provide Ogg media playback in Safari and Internet Explorer when native decoders are not installed (or cannot be installed, as on iOS and Windows RT). See source and live examples via https://github.com/brion/ogv.js Issues: * need to add credits/license info for ogg, vorbis, theora, opus, ogv.js * oddities with the popup player (multiple play buttons?) * transcodes don't play right on my test box, not sure if transcodes are broken or the player... * audio doesn't work in IE yet, as this requires a small Flash shim that is not yet packaged * audio doesn't work on iOS Safari yet, as the audio must be started from an event handler but it's very async here. * ogvjs.js file is not optimized for size -- it's about 1MB uncompressed, gzipping down to something like 250k-ish. * Many iOS devices will be too slow to decode video, this is not checked yet * Audio support is not checked for * all-Flash fallback for older browsers not yet packaged * WebGL acceleration not yet used when available Bug: 61823 Change-Id: I1a82378281434927f688a04095dbf5bfbeca7025 --- M MwEmbedModules/EmbedPlayer/EmbedPlayer.php A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogvjs.js M MwEmbedModules/EmbedPlayer/i18n/en.json A MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js M MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js 6 files changed, 2,365 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/56/145756/1 -- To view, visit https://gerrit.wikimedia.org/r/145756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a82378281434927f688a04095dbf5bfbeca7025 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for TMH Error missing media source under HHVM - change (mediawiki...TimedMediaHandler)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145875 Change subject: Fix for TMH Error missing media source under HHVM .. Fix for TMH Error missing media source under HHVM Media players inline showed only as Error missing media source. Appears to be due to use of current() to get the first element of an array, assuming that the key pointer was reset. In HHVM, magic reset on pass-by-value doesn't appear to happen. Adding a manual reset() before the current() usage fixes it. Bug: 67937 Change-Id: I606048cca847ec4927e2a59c44d819dda067db3a --- M TimedMediaTransformOutput.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/75/145875/1 diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index 15bee30..18415f9 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -244,6 +244,7 @@ function getHtmlMediaTagOutput( $sizeOverride = array(), $autoPlay = false ){ // Try to get the first source src attribute ( usually this should be the source file ) $mediaSources = $this-getMediaSources(); + reset( $mediaSources ); // do not rely on auto-resetting of arrays under HHVM $firstSource = current( $mediaSources ); if( !$firstSource['src'] ){ -- To view, visit https://gerrit.wikimedia.org/r/145875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I606048cca847ec4927e2a59c44d819dda067db3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Optionally use avconv/ffmpeg for .ogv transcodes - change (mediawiki...TimedMediaHandler)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145990 Change subject: Optionally use avconv/ffmpeg for .ogv transcodes .. Optionally use avconv/ffmpeg for .ogv transcodes Set $wgFFmpeg2theoraLocation = false to use avconv/ffmpeg instead of ffmpeg2theora for producing .ogv transcodes. Note that ffmpeg2theora 0.29 on Ubuntu Trusty and OSX/Homebrew seems very flaky and produces files with broken audio tracks. Bug: 67953 Change-Id: Iaf5d51200e618b4b4a03f3cdba31149a2fcf7c71 --- M TimedMediaHandler.php M WebVideoTranscode/WebVideoTranscodeJob.php 2 files changed, 52 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/90/145990/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index a876c42..e21989a 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -95,6 +95,7 @@ $wgFFmpegThreads = 1; // The location of ffmpeg2theora (transcoding) +// Set to false to use avconv/ffmpeg to produce Ogg Theora transcodes instead $wgFFmpeg2theoraLocation = '/usr/bin/ffmpeg2theora'; // Location of oggThumb binary ( used instead of ffmpeg ) diff --git a/WebVideoTranscode/WebVideoTranscodeJob.php b/WebVideoTranscode/WebVideoTranscodeJob.php index 507014e..e30d8f5 100644 --- a/WebVideoTranscode/WebVideoTranscodeJob.php +++ b/WebVideoTranscode/WebVideoTranscodeJob.php @@ -115,7 +115,7 @@ * @return boolean success */ public function run() { - global $wgVersion; + global $wgVersion, $wgFFmpeg2theoraLocation; // get a local pointer to the file $file = $this-getFile(); @@ -186,9 +186,9 @@ // Check the codec see which encode method to call; if ( isset( $options[ 'novideo' ] ) ) { $status = $this-ffmpegEncode( $options ); - } elseif( $options['videoCodec'] == 'theora' ){ + } elseif( $options['videoCodec'] == 'theora' $wgFFmpeg2theoraLocation !== false ){ $status = $this-ffmpeg2TheoraEncode( $options ); - } elseif( $options['videoCodec'] == 'vp8' || $options['videoCodec'] == 'h264' ){ + } elseif( $options['videoCodec'] == 'vp8' || $options['videoCodec'] == 'h264' || ( $options['videoCodec'] == 'theora' $wgFFmpeg2theoraLocation === false ) ){ // Check for twopass: if( isset( $options['twopass'] ) ){ // ffmpeg requires manual two pass @@ -345,6 +345,8 @@ $cmd.= $this-ffmpegAddWebmVideoOptions( $options, $pass ); } elseif( $options['videoCodec'] == 'h264'){ $cmd.= $this-ffmpegAddH264VideoOptions( $options, $pass ); + } elseif( $options['videoCodec'] == 'theora'){ + $cmd.= $this-ffmpegAddTheoraVideoOptions( $options, $pass ); } // Add size options: $cmd .= $this-ffmpegAddVideoSizeOptions( $options ) ; @@ -528,6 +530,52 @@ } /** +* Adds ffmpeg shell options for webm +* +* @param $options +* @param $pass +* @return string +*/ + function ffmpegAddTheoraVideoOptions( $options, $pass ){ + global $wgFFmpegThreads; + + // Get a local pointer to the file object + $file = $this-getFile(); + + $cmd =' -threads ' . intval( $wgFFmpegThreads ); + + // Check for video quality: + if ( isset( $options['videoQuality'] ) $options['videoQuality'] = 0 ) { + // Map 0-10 to 63-0, higher values worse quality + $quality = 63 - intval( intval( $options['videoQuality'] )/10 * 63 ); + $cmd .= -qmin . wfEscapeShellArg( $quality ); + $cmd .= -qmax . wfEscapeShellArg( $quality ); + } + + // Check for video bitrate: + if ( isset( $options['videoBitrate'] ) ) { + $cmd.= -qmin 1 -qmax 51; + $cmd.= -vb . wfEscapeShellArg( $options['videoBitrate'] * 1000 ); + } + // Set the codec: + $cmd.= -vcodec theora; + + // Check for keyframeInterval + if( isset( $options['keyframeInterval'] ) ){ + $cmd.= ' -g ' . wfEscapeShellArg( $options['keyframeInterval'] ); + $cmd.= ' -keyint_min ' . wfEscapeShellArg( $options['keyframeInterval'] ); + } + if( isset( $options['deinterlace'] ) ){ + $cmd.= ' -deinterlace'; + } + + // Output WebM + $cmd.= -f ogg; + + return $cmd; +
[MediaWiki-commits] [Gerrit] Toc appearance updates. More subtle selection indicator. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Toc appearance updates. More subtle selection indicator. .. Toc appearance updates. More subtle selection indicator. Lead section background color remains blue. Subsection selection indicated by vertical blue bar on left of section. Fix for toc incorrectly appearance animation if page chrome had been scrolled away. Faster toc appearance and selection scroll. Change-Id: I6593c141122da7114517434068c58ac9c8837ef8 --- M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.h M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m M wikipedia/View Controllers/TableOfContents/TOCViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 5 files changed, 104 insertions(+), 29 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m index 65260c1..00fd6f1 100644 --- a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m @@ -506,7 +506,7 @@ WikiGlyphButton *button = (WikiGlyphButton *)tappedView; [button.label animateAndRewindXF: CATransform3DMakeScale(animationScale, animationScale, 1.0f) afterDelay: 0.0 - duration: 0.06f + duration: 0.04f then: postTapNotification]; }else{ // If tapped item not a button, don't animate, just post. diff --git a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.h b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.h index e179c1d..f8e0e52 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.h +++ b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.h @@ -9,4 +9,6 @@ @property (nonatomic) BOOL isHighlighted; @property (nonatomic) BOOL isSelected; +-(id)initWithLevel:(NSInteger)level isLead:(BOOL)isLead; + @end diff --git a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m index 421bbc4..34f23ae 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m +++ b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m @@ -4,11 +4,22 @@ #import TOCSectionCellView.h #import WMF_Colors.h +#define SELECTION_INDICATOR_WIDTH 6 +#define SELECTION_INDICATOR_VERTICAL_INSET 10 + +@interface TOCSectionCellView() + +@property (nonatomic) NSInteger level; +@property (nonatomic) BOOL isLead; + +@end + @implementation TOCSectionCellView -- (id)init +-(id)initWithLevel:(NSInteger)level isLead:(BOOL)isLead { self = [super init]; + if (self) { self.translatesAutoresizingMaskIntoConstraints = NO; self.clearsContextBeforeDrawing = NO; @@ -16,35 +27,70 @@ self.numberOfLines = 0; self.lineBreakMode = NSLineBreakByWordWrapping; self.backgroundColor = [UIColor clearColor]; +self.isSelected = NO; self.isHighlighted = NO; self.clipsToBounds = NO; -self.opaque = YES; +self.opaque = NO; +self.level = level; +self.isLead = isLead; + +self.font = (self.level == 1) ? [UIFont boldSystemFontOfSize:17] : [UIFont systemFontOfSize:17]; + +if (self.isLead) self.backgroundColor = WMF_COLOR_BLUE; + +self.textColor = (self.level = 1) ? +[UIColor whiteColor] +: +[UIColor colorWithRed:0.573 green:0.58 blue:0.592 alpha:1]; } + return self; } -(void)setIsHighlighted:(BOOL)isHighlighted { -if (isHighlighted) { -self.backgroundColor = [WMF_COLOR_BLUE colorWithAlphaComponent:0.6]; -}else{ -self.backgroundColor = [UIColor colorWithRed:0.049 green:0.049 blue:0.049 alpha:1.0]; -} - -if (isHighlighted) self.alpha = 1.0f; - _isHighlighted = isHighlighted; -self.textColor = isHighlighted ? [UIColor whiteColor] : [UIColor colorWithRed:0.573 green:0.58 blue:0.592 alpha:1]; +[self setNeedsDisplay]; } -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect -{ -// Drawing code +- (void)drawRect:(CGRect)rect { +[super drawRect:rect]; + +if (!self.isSelected) return; + +CGContextRef context = UIGraphicsGetCurrentContext(); + +CGFloat width = SELECTION_INDICATOR_WIDTH; + +BOOL devoMode = NO; + +if (!devoMode) { +CGContextSetFillColorWithColor(context, WMF_COLOR_BLUE.CGColor); +CGRect rectangle =
[MediaWiki-commits] [Gerrit] Fix for back/forward buttons in rtl langs. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for back/forward buttons in rtl langs. .. Fix for back/forward buttons in rtl langs. Change-Id: I73c99e48da86d0d99a2c29a32e3fa0cb7f757aff --- M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index 03c4ba5..a33e2b2 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -18,6 +18,7 @@ #import ShareMenuSavePageActivity.h #import Article+Convenience.h #import Defines.h +#import WikipediaAppUtils.h typedef NS_ENUM(NSInteger, BottomMenuItemTag) { BOTTOM_MENU_BUTTON_UNKNOWN = 0, @@ -54,13 +55,15 @@ UIColor *buttonColor = [UIColor blackColor]; CGFloat buttonTextSize = 34; -[self.backButton.label setWikiText: IOS_WIKIGLYPH_BACKWARD +BOOL isRTL = [WikipediaAppUtils isDeviceLanguageRTL]; + +[self.backButton.label setWikiText: isRTL ? IOS_WIKIGLYPH_FORWARD : IOS_WIKIGLYPH_BACKWARD color: buttonColor size: buttonTextSize baselineOffset: 2.0]; self.backButton.tag = BOTTOM_MENU_BUTTON_PREVIOUS; -[self.forwardButton.label setWikiText: IOS_WIKIGLYPH_FORWARD +[self.forwardButton.label setWikiText: isRTL ? IOS_WIKIGLYPH_BACKWARD : IOS_WIKIGLYPH_FORWARD color: buttonColor size: buttonTextSize baselineOffset: 2.0 -- To view, visit https://gerrit.wikimedia.org/r/146109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73c99e48da86d0d99a2c29a32e3fa0cb7f757aff Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: adding userId for edit event logging - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/146164 Change subject: Work in progress: adding userId for edit event logging .. Work in progress: adding userId for edit event logging CURRENTLY BROKEN WHEN SWITCHING LANGUAGES AFTER LOGIN. Each wiki has a separate local user ID for each local user, so a single global SUL account will need to 'change' IDs depending on the language we're working with. Android looks similarly broken but I haven't tested it yet. Change-Id: Ied5d52cf4da657f06c4b23a5cba13094e228b766 --- M wikipedia/Data/Operations/LoginOp.h M wikipedia/Data/Operations/LoginOp.m M wikipedia/EventLogging/EditFunnel.m M wikipedia/Keychain/KeychainCredentials.h M wikipedia/Keychain/KeychainCredentials.m M wikipedia/View Controllers/Login/LoginViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m 7 files changed, 45 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/64/146164/1 diff --git a/wikipedia/Data/Operations/LoginOp.h b/wikipedia/Data/Operations/LoginOp.h index d3c58ea..05ef478 100644 --- a/wikipedia/Data/Operations/LoginOp.h +++ b/wikipedia/Data/Operations/LoginOp.h @@ -10,7 +10,7 @@ - (id)initWithUsername: (NSString *)userName password: (NSString *)password domain: (NSString *)domain - completionBlock: (void (^)(NSString *))completionBlock + completionBlock: (void (^)(NSDictionary *))completionBlock cancelledBlock: (void (^)(NSError *))cancelledBlock errorBlock: (void (^)(NSError *))errorBlock ; diff --git a/wikipedia/Data/Operations/LoginOp.m b/wikipedia/Data/Operations/LoginOp.m index 76c03f3..4968310 100644 --- a/wikipedia/Data/Operations/LoginOp.m +++ b/wikipedia/Data/Operations/LoginOp.m @@ -39,7 +39,7 @@ - (id)initWithUsername: (NSString *)userName password: (NSString *)password domain: (NSString *)domain - completionBlock: (void (^)(NSString *))completionBlock + completionBlock: (void (^)(NSDictionary *))completionBlock cancelledBlock: (void (^)(NSError *))cancelledBlock errorBlock: (void (^)(NSError *))errorBlock { @@ -95,8 +95,8 @@ return; } -//NSDictionary *result = weakSelf.jsonRetrieved; -NSString *result = weakSelf.jsonRetrieved[@login][@result]; +NSDictionary *result = weakSelf.jsonRetrieved; +//NSString *result = weakSelf.jsonRetrieved[@login][@result]; completionBlock(result); }; diff --git a/wikipedia/EventLogging/EditFunnel.m b/wikipedia/EventLogging/EditFunnel.m index f9ce1c8..713edb8 100644 --- a/wikipedia/EventLogging/EditFunnel.m +++ b/wikipedia/EventLogging/EditFunnel.m @@ -26,13 +26,10 @@ { NSMutableDictionary *dict = [eventData mutableCopy]; dict[@editSessionToken] = self.editSessionToken; -NSString *userName = [SessionSingleton sharedInstance].keychainCredentials.userName; // @FIXME send user ID -if (!userName || [userName isEqualToString:@]) { -dict[@userID] = @0; // not logged in -} else { -// @FIXME fetch the actual user ID -dict[@userID] = @(-1); -} + +int userId = [SessionSingleton sharedInstance].keychainCredentials.userId; +dict[@userID] = @(userId); + //dict[@pageNS] = @0; // @todo actually get the namespace... return [NSDictionary dictionaryWithDictionary: dict]; } diff --git a/wikipedia/Keychain/KeychainCredentials.h b/wikipedia/Keychain/KeychainCredentials.h index 5d59504..0a0d322 100644 --- a/wikipedia/Keychain/KeychainCredentials.h +++ b/wikipedia/Keychain/KeychainCredentials.h @@ -6,6 +6,7 @@ @interface KeychainCredentials : NSObject @property (strong, nonatomic) NSString *userName; +@property (nonatomic) int userId; @property (strong, nonatomic) NSString *password; // Edit tokens are stored in the editTokens dictionary with language code diff --git a/wikipedia/Keychain/KeychainCredentials.m b/wikipedia/Keychain/KeychainCredentials.m index 9e5c5a1..120b0bc 100644 --- a/wikipedia/Keychain/KeychainCredentials.m +++ b/wikipedia/Keychain/KeychainCredentials.m @@ -15,6 +15,29 @@ return [self getKeychainValueForEntry:@org.wikimedia.wikipedia.username]; } +-(void)setUserId:(int)userId +{ +NSString *str = [NSString stringWithFormat:@%d, userId]; +[self setKeychainValue:str forEntry:@org.wikimedia.wikipedia.userid]; +} + +-(int)userId +{ +NSString *val = [self getKeychainValueForEntry:@org.wikimedia.wikipedia.userid]; +if (val) { +return atoi([val UTF8String]); +} else { +NSString *userName = self.userName; +if (userName) { +// Old record, don't have the id. +return -1; +} else { +// Not logged in. +return 0; +} +
[MediaWiki-commits] [Gerrit] RTL lang fixes! - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: RTL lang fixes! .. RTL lang fixes! RTL fixes for toc text alignment and selection indicator, more menu button, history, saved pages and article history. Change-Id: I919ffec5efe06013e761f5d5783dc2810af1caf4 --- M wikipedia/PaddedLabel/PaddedLabel.m M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m M wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.h M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m M wikipedia/View Controllers/TableOfContents/TOCViewController.m 9 files changed, 62 insertions(+), 13 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/PaddedLabel/PaddedLabel.m b/wikipedia/PaddedLabel/PaddedLabel.m index 4c64ccc..2331d84 100644 --- a/wikipedia/PaddedLabel/PaddedLabel.m +++ b/wikipedia/PaddedLabel/PaddedLabel.m @@ -8,6 +8,7 @@ -(void)setup { self.padding = UIEdgeInsetsZero; +self.textAlignment = NSTextAlignmentNatural; } - (instancetype)initWithCoder:(NSCoder *)coder diff --git a/wikipedia/View Controllers/History/HistoryViewController.m b/wikipedia/View Controllers/History/HistoryViewController.m index cb17524..fd6e966 100644 --- a/wikipedia/View Controllers/History/HistoryViewController.m +++ b/wikipedia/View Controllers/History/HistoryViewController.m @@ -339,7 +339,7 @@ NSString *language = [NSString stringWithFormat:@\n%@, historyEntry.article.domainName]; NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; -paragraphStyle.alignment = NSTextAlignmentLeft; +paragraphStyle.alignment = NSTextAlignmentNatural; NSMutableAttributedString *(^styleText)(NSString *, CGFloat, UIColor *) = ^NSMutableAttributedString *(NSString *str, CGFloat size, UIColor *color){ return [[NSMutableAttributedString alloc] initWithString:str attributes: @{ diff --git a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m index fc5db07..3d124dd 100644 --- a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m @@ -73,7 +73,7 @@ baselineOffset: 2.0 ]; -self.moreButton.label.textAlignment = NSTextAlignmentLeft; +self.moreButton.label.textAlignment = NSTextAlignmentNatural; self.moreButton.label.padding = UIEdgeInsetsMake(0, 12, 0, 12); diff --git a/wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m b/wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m index 6b5dcfb..5abb2d9 100644 --- a/wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m +++ b/wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m @@ -26,6 +26,12 @@ //self.backgroundColor = [UIColor greenColor]; self.separatorHeightConstraint.constant = 1.0f / [UIScreen mainScreen].scale; + +self.summaryLabel.textAlignment = NSTextAlignmentNatural; +self.nameLabel.textAlignment = NSTextAlignmentNatural; +self.timeLabel.textAlignment = NSTextAlignmentNatural; +self.deltaLabel.textAlignment = NSTextAlignmentNatural; +self.iconLabel.textAlignment = NSTextAlignmentNatural; } -(void)prepareForReuse diff --git a/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m b/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m index 6a7c70b..cb01699 100644 --- a/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m +++ b/wikipedia/View Controllers/PageHistory/PageHistoryViewController.m @@ -15,12 +15,14 @@ #import RootViewController.h #import UIViewController+ModalPop.h #import Defines.h +#import PaddedLabel.h @interface PageHistoryViewController (){ } @property (strong, nonatomic) __block NSMutableArray *pageHistoryDataArray; +@property (nonatomic) BOOL isRTL; @end @@ -82,6 +84,8 @@ - (void)viewDidLoad { [super viewDidLoad]; + +self.isRTL = [WikipediaAppUtils isDeviceLanguageRTL]; self.navigationItem.hidesBackButton = YES; @@ -222,14 +226,22 @@ UIView *view = [[UIView alloc] initWithFrame:CGRectZero]; view.backgroundColor = CHROME_COLOR; view.autoresizesSubviews = YES; -UILabel *label = [[UILabel alloc] initWithFrame: - CGRectMake(10, view.bounds.origin.y, view.bounds.size.width, view.bounds.size.height) - ]; +PaddedLabel *label = [[PaddedLabel alloc] init]; + +CGFloat leadingIndent = 10; +
[MediaWiki-commits] [Gerrit] Rtl fixes for edit workflow, sign-in, acct creation captcha. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Rtl fixes for edit workflow, sign-in, acct creation captcha. .. Rtl fixes for edit workflow, sign-in, acct creation captcha. Change-Id: Ib225186ab1a1be54909603180bbe008f545673b9 --- M wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m M wikipedia/View Controllers/Captcha/CaptchaViewController.m M wikipedia/View Controllers/Login/LoginViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 5 files changed, 17 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m b/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m index 4696c91..faa31e4 100644 --- a/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m +++ b/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m @@ -146,6 +146,11 @@ ((MenuButton *)[self.topMenuViewController getNavBarItem:NAVBAR_BUTTON_NEXT]).color = WMF_COLOR_GREEN; ((MenuButton *)[self.topMenuViewController getNavBarItem:NAVBAR_BUTTON_DONE]).color = WMF_COLOR_GREEN; + +self.usernameField.textAlignment = NSTextAlignmentNatural; +self.passwordField.textAlignment = NSTextAlignmentNatural; +self.passwordRepeatField.textAlignment = NSTextAlignmentNatural; +self.emailField.textAlignment = NSTextAlignmentNatural; } - (void)loginButtonPushed:(id)sender diff --git a/wikipedia/View Controllers/Captcha/CaptchaViewController.m b/wikipedia/View Controllers/Captcha/CaptchaViewController.m index 13b8b76..39138f8 100644 --- a/wikipedia/View Controllers/Captcha/CaptchaViewController.m +++ b/wikipedia/View Controllers/Captcha/CaptchaViewController.m @@ -23,6 +23,8 @@ [self.reloadCaptchaButton setTitleColor:[UIColor darkGrayColor] forState:UIControlStateDisabled]; [self.reloadCaptchaButton setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal]; + +self.captchaTextBox.textAlignment = NSTextAlignmentNatural; } - (void)reloadCaptchaPushed:(id)sender diff --git a/wikipedia/View Controllers/Login/LoginViewController.m b/wikipedia/View Controllers/Login/LoginViewController.m index f9532a9..5791d3f 100644 --- a/wikipedia/View Controllers/Login/LoginViewController.m +++ b/wikipedia/View Controllers/Login/LoginViewController.m @@ -101,6 +101,9 @@ ; */ self.titleLabel.text = MWLocalizedString(@navbar-title-mode-login, nil); + +self.usernameField.textAlignment = NSTextAlignmentNatural; +self.passwordField.textAlignment = NSTextAlignmentNatural; } -(NSAttributedString *)getAttributedPlaceholderForString:(NSString *)string diff --git a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m index 00fd6f1..c93d810 100644 --- a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m @@ -236,11 +236,14 @@ CGFloat size = 34; CGFloat baselineOffset = 2.0; +BOOL isRTL = [WikipediaAppUtils isDeviceLanguageRTL]; +NSString *caret = !isRTL ? WIKIGLYPH_CARET_LEFT: IOS_WIKIGLYPH_FORWARD; + self.buttonPencil = getWikiGlyphButton(WIKIGLYPH_PENCIL, NAVBAR_BUTTON_PENCIL, size, baselineOffset); self.buttonX = getWikiGlyphButton(WIKIGLYPH_X, NAVBAR_BUTTON_X, size - 4, baselineOffset - 0.5); self.buttonEye =getWikiGlyphButton(WIKIGLYPH_EYE, NAVBAR_BUTTON_EYE, size, baselineOffset); -self.buttonArrowLeft = getWikiGlyphButton(WIKIGLYPH_CARET_LEFT, NAVBAR_BUTTON_ARROW_LEFT, size, baselineOffset - 2.0); -self.buttonArrowRight = getWikiGlyphButton(WIKIGLYPH_CARET_LEFT, NAVBAR_BUTTON_ARROW_RIGHT, size, baselineOffset - 2.0); +self.buttonArrowLeft = getWikiGlyphButton(caret, NAVBAR_BUTTON_ARROW_LEFT, size, baselineOffset - 2.0); +self.buttonArrowRight = getWikiGlyphButton(caret, NAVBAR_BUTTON_ARROW_RIGHT, size, baselineOffset - 2.0); self.buttonW = getWikiGlyphButton(IOS_WIKIGLYPH_W, NAVBAR_BUTTON_LOGO_W, size, baselineOffset); self.buttonTOC =getWikiGlyphButton(IOS_WIKIGLYPH_TOC, NAVBAR_BUTTON_TOC, size, baselineOffset); self.buttonMagnify =getWikiGlyphButton(IOS_WIKIGLYPH_MAGNIFY, NAVBAR_BUTTON_MAGNIFY, size, baselineOffset); diff --git a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m b/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m index fa46198..79f0860 100644 --- a/wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m
[MediaWiki-commits] [Gerrit] Rtl fix for other edit summary. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Rtl fix for other edit summary. .. Rtl fix for other edit summary. Change-Id: Id69bb8d3340b70596e7f7db0c7ab45a5bf70586c --- M wikipedia/View Controllers/EditSummary/EditSummaryViewController.m 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m b/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m index f21edb6..ccbd769 100644 --- a/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m +++ b/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m @@ -37,10 +37,12 @@ // Do any additional setup after loading the view. self.placeholderLabel.text = MWLocalizedString(@edit-summary-field-placeholder-text, nil); +self.placeholderLabel.textAlignment = NSTextAlignmentNatural; self.summaryTextField.textColor = [UIColor darkGrayColor]; self.summaryTextField.returnKeyType = UIReturnKeyDone; self.summaryTextField.delegate = self; +self.summaryTextField.textAlignment = NSTextAlignmentNatural; self.bottomLineHeightConstraint.constant = 1.0f / [UIScreen mainScreen].scale; } -- To view, visit https://gerrit.wikimedia.org/r/146261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id69bb8d3340b70596e7f7db0c7ab45a5bf70586c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rtl leading padding fix for history date headings. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Rtl leading padding fix for history date headings. .. Rtl leading padding fix for history date headings. Change-Id: Id1705f26b386e4562cc9cb8b67c6907c863c1e48 --- M wikipedia/View Controllers/History/HistoryViewController.m 1 file changed, 13 insertions(+), 10 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/History/HistoryViewController.m b/wikipedia/View Controllers/History/HistoryViewController.m index fd6e966..dd81312 100644 --- a/wikipedia/View Controllers/History/HistoryViewController.m +++ b/wikipedia/View Controllers/History/HistoryViewController.m @@ -17,6 +17,7 @@ #import TopMenuViewController.h #import UIViewController+StatusBarHeight.h #import UIViewController+ModalPop.h +#import PaddedLabel.h #define HISTORY_THUMBNAIL_WIDTH 110 #define HISTORY_RESULT_HEIGHT 66 @@ -34,7 +35,7 @@ @property (strong, atomic) NSMutableArray *historyDataArray; @property (strong, nonatomic) NSDateFormatter *dateFormatter; - +@property (nonatomic) BOOL isRTL; @property (strong, nonatomic) IBOutlet UITableView *tableView; @end @@ -109,6 +110,8 @@ { [super viewDidLoad]; +self.isRTL = [WikipediaAppUtils isDeviceLanguageRTL]; + self.dateFormatter = [[NSDateFormatter alloc] init]; [self.dateFormatter setLocale:[NSLocale currentLocale]]; [self.dateFormatter setTimeZone:[NSTimeZone localTimeZone]]; @@ -419,7 +422,15 @@ UIView *view = [[UIView alloc] initWithFrame:CGRectZero]; view.backgroundColor = HISTORY_DATE_HEADER_BACKGROUND_COLOR; view.autoresizesSubviews = YES; -UILabel *label = [[UILabel alloc] initWithFrame:view.bounds]; +PaddedLabel *label = [[PaddedLabel alloc] init]; + +CGFloat leadingIndent = HISTORY_DATE_HEADER_LEFT_PADDING; +if (!self.isRTL) { +label.padding = UIEdgeInsetsMake(0, leadingIndent, 0, 0); +}else{ +label.padding = UIEdgeInsetsMake(0, 0, 0, leadingIndent); +} + label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; label.backgroundColor = [UIColor clearColor]; @@ -435,19 +446,11 @@ -(NSAttributedString *)getAttributedHeaderForTitle:(NSString *)title dateString:(NSString *)dateString { -NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init] ; -paragraphStyle.firstLineHeadIndent = HISTORY_DATE_HEADER_LEFT_PADDING; - NSString *header = [NSString stringWithFormat:@%@ %@, title, dateString]; NSMutableAttributedString *attributedHeader = [[NSMutableAttributedString alloc] initWithString: header]; -NSRange rangeOfHeader = NSMakeRange(0, header.length); NSRange rangeOfTitle = NSMakeRange(0, title.length); NSRange rangeOfDateString = NSMakeRange(title.length + 1, dateString.length); - -[attributedHeader addAttributes:@{ - NSParagraphStyleAttributeName: paragraphStyle - } range:rangeOfHeader]; [attributedHeader addAttributes:@{ NSFontAttributeName : [UIFont boldSystemFontOfSize:12.0], -- To view, visit https://gerrit.wikimedia.org/r/146257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id1705f26b386e4562cc9cb8b67c6907c863c1e48 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changed search result thumb resolution. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Changed search result thumb resolution. .. Changed search result thumb resolution. Fixed bug PaddedLabel forcing storyboard center alignment to left. Change-Id: I3623b7a1f7a5fe34b8ae47e2f6fa8d343cdb6f5b --- M wikipedia/Defines/Defines.h M wikipedia/PaddedLabel/PaddedLabel.m 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h index f1ce5e1..a711e5d 100644 --- a/wikipedia/Defines/Defines.h +++ b/wikipedia/Defines/Defines.h @@ -1,8 +1,8 @@ #pragma mark Defines -#define SEARCH_THUMBNAIL_WIDTH 110 +#define SEARCH_THUMBNAIL_WIDTH (48 * 3) #define SEARCH_RESULT_HEIGHT 60 -#define SEARCH_MAX_RESULTS @25 +#define SEARCH_MAX_RESULTS @24 #define SEARCH_TEXT_FIELD_FONT [UIFont systemFontOfSize:14.0] #define SEARCH_TEXT_FIELD_HIGHLIGHTED_COLOR [UIColor blackColor] diff --git a/wikipedia/PaddedLabel/PaddedLabel.m b/wikipedia/PaddedLabel/PaddedLabel.m index 2331d84..8550151 100644 --- a/wikipedia/PaddedLabel/PaddedLabel.m +++ b/wikipedia/PaddedLabel/PaddedLabel.m @@ -8,7 +8,7 @@ -(void)setup { self.padding = UIEdgeInsetsZero; -self.textAlignment = NSTextAlignmentNatural; +if(self.textAlignment == NSTextAlignmentLeft) self.textAlignment = NSTextAlignmentNatural; } - (instancetype)initWithCoder:(NSCoder *)coder -- To view, visit https://gerrit.wikimedia.org/r/146264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3623b7a1f7a5fe34b8ae47e2f6fa8d343cdb6f5b Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-add qqq descriptions accidentally removed during merge - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/146260 Change subject: Re-add qqq descriptions accidentally removed during merge .. Re-add qqq descriptions accidentally removed during merge Change-Id: If68e0c56ebb3793765283dd8f1d8fee7527edcdd --- M wikipedia/qqq.lproj/Localizable.strings 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/60/146260/1 diff --git a/wikipedia/qqq.lproj/Localizable.strings b/wikipedia/qqq.lproj/Localizable.strings index 23d5df3..49e922e 100644 --- a/wikipedia/qqq.lproj/Localizable.strings +++ b/wikipedia/qqq.lproj/Localizable.strings @@ -140,3 +140,22 @@ onboarding-skip = Button text allowing first time users to skip the other onboarding choices; preference_title_eventlogging_opt_in = Title of preference that when checked enables data collection of user behavior.; preference_summary_eventlogging_opt_in = Description of preference that when checked enables data collection of user behavior.; +license-footer-text = Brief footer text linking to CC-BY-SA license. '$1' is placeholder for the license-footer-name message; +license-footer-name = License short name; usually leave untranslated as CC-BY-SA 3.0; +table-of-contents-heading = Header text appearing above the first section in the table of contents; +wikitext-upload-save-terms-name = Formal name of Wikipedia 'Terms of Use' in local language, used as a link; +page_protected_autoconfirmed = Brief description of Wikipedia 'autoconfirmed' protection level, shown when editing a page that is protected.; +page_protected_sysop = Brief description of Wikipedia 'sysop' protection level, shown when editing a page that is protected.; +page_protected_other = Brief description of Wikipedia unknown protection level, shown when editing a page that is protected.; +page_protected_can_not_edit = Text of alert dialog shown when trying to edit a page that is protected beyond what the user can edit.; +page_protected_can_not_edit_title = Title of alert dialog shown when trying to edit a page that is protected beyond what the user can edit.; +main-menu-heading-zero = Header text for the Wikipedia Zero section of the menu.; +main-menu-heading-legal = Header text for the legal section of the menu.; +zero-charged-verbiage-extended = Extended text describing that further usage of the app may in fact incur data charges because Wikipedia Zero is off, but Saved articles are still free.; +wikitext-upload-save-terms-and-license = Button text for information about the Terms of Use and edit license. Parameters:\n$1 - 'Terms of Use' link\n* $2 - license name link; +open-link-title = Title for popup menu of terms/license link options.; +open-link-cancel = Text for cancel button in popup menu of terms/license link options; +main-menu-zero-faq = Button text for showing the Wikipedia Zero Frequently Asked Questions (FAQ) document; +main-menu-privacy-policy = Button text for showing privacy policy; +main-menu-license = Button text for showing license; +main-menu-rate-app = Button text for showing the app in the app store so user can rate the app; -- To view, visit https://gerrit.wikimedia.org/r/146260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If68e0c56ebb3793765283dd8f1d8fee7527edcdd Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-add qqq descriptions accidentally removed during merge - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Re-add qqq descriptions accidentally removed during merge .. Re-add qqq descriptions accidentally removed during merge Change-Id: If68e0c56ebb3793765283dd8f1d8fee7527edcdd --- M wikipedia/qqq.lproj/Localizable.strings 1 file changed, 19 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/qqq.lproj/Localizable.strings b/wikipedia/qqq.lproj/Localizable.strings index 23d5df3..49e922e 100644 --- a/wikipedia/qqq.lproj/Localizable.strings +++ b/wikipedia/qqq.lproj/Localizable.strings @@ -140,3 +140,22 @@ onboarding-skip = Button text allowing first time users to skip the other onboarding choices; preference_title_eventlogging_opt_in = Title of preference that when checked enables data collection of user behavior.; preference_summary_eventlogging_opt_in = Description of preference that when checked enables data collection of user behavior.; +license-footer-text = Brief footer text linking to CC-BY-SA license. '$1' is placeholder for the license-footer-name message; +license-footer-name = License short name; usually leave untranslated as CC-BY-SA 3.0; +table-of-contents-heading = Header text appearing above the first section in the table of contents; +wikitext-upload-save-terms-name = Formal name of Wikipedia 'Terms of Use' in local language, used as a link; +page_protected_autoconfirmed = Brief description of Wikipedia 'autoconfirmed' protection level, shown when editing a page that is protected.; +page_protected_sysop = Brief description of Wikipedia 'sysop' protection level, shown when editing a page that is protected.; +page_protected_other = Brief description of Wikipedia unknown protection level, shown when editing a page that is protected.; +page_protected_can_not_edit = Text of alert dialog shown when trying to edit a page that is protected beyond what the user can edit.; +page_protected_can_not_edit_title = Title of alert dialog shown when trying to edit a page that is protected beyond what the user can edit.; +main-menu-heading-zero = Header text for the Wikipedia Zero section of the menu.; +main-menu-heading-legal = Header text for the legal section of the menu.; +zero-charged-verbiage-extended = Extended text describing that further usage of the app may in fact incur data charges because Wikipedia Zero is off, but Saved articles are still free.; +wikitext-upload-save-terms-and-license = Button text for information about the Terms of Use and edit license. Parameters:\n$1 - 'Terms of Use' link\n* $2 - license name link; +open-link-title = Title for popup menu of terms/license link options.; +open-link-cancel = Text for cancel button in popup menu of terms/license link options; +main-menu-zero-faq = Button text for showing the Wikipedia Zero Frequently Asked Questions (FAQ) document; +main-menu-privacy-policy = Button text for showing privacy policy; +main-menu-license = Button text for showing license; +main-menu-rate-app = Button text for showing the app in the app store so user can rate the app; -- To view, visit https://gerrit.wikimedia.org/r/146260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If68e0c56ebb3793765283dd8f1d8fee7527edcdd Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added splash screens. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Added splash screens. .. Added splash screens. Change-Id: I01b4dd928268a1eae768e5826bbf8f81f75046c5 --- M wikipedia/Images.xcassets/LaunchImage.launchimage/Contents.json A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768-1.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1536x2048-1.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1536x2048.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_2048x1536-1.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_2048x1536.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_320x480.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x1136-1.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x1136.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x960-1.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x960.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_768x1024-1.png A wikipedia/Images.xcassets/LaunchImage.launchimage/splash_768x1024.png M wikipedia/View Controllers/Onboarding/OnboardingViewController.m 15 files changed, 31 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Images.xcassets/LaunchImage.launchimage/Contents.json b/wikipedia/Images.xcassets/LaunchImage.launchimage/Contents.json index 82fb390..85307b6 100644 --- a/wikipedia/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/wikipedia/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -5,14 +5,16 @@ idiom : iphone, extent : full-screen, minimum-system-version : 7.0, + filename : splash_640x960.png, scale : 2x }, { - orientation : portrait, - idiom : iphone, extent : full-screen, - minimum-system-version : 7.0, + idiom : iphone, subtype : retina4, + filename : splash_640x1136.png, + minimum-system-version : 7.0, + orientation : portrait, scale : 2x }, { @@ -20,6 +22,7 @@ idiom : ipad, extent : full-screen, minimum-system-version : 7.0, + filename : splash_768x1024.png, scale : 1x }, { @@ -27,6 +30,7 @@ idiom : ipad, extent : full-screen, minimum-system-version : 7.0, + filename : splash_1024x768.png, scale : 1x }, { @@ -34,6 +38,7 @@ idiom : ipad, extent : full-screen, minimum-system-version : 7.0, + filename : splash_1536x2048.png, scale : 2x }, { @@ -41,24 +46,28 @@ idiom : ipad, extent : full-screen, minimum-system-version : 7.0, + filename : splash_2048x1536.png, scale : 2x }, { orientation : portrait, idiom : iphone, extent : full-screen, + filename : splash_320x480.png, scale : 1x }, { orientation : portrait, idiom : iphone, extent : full-screen, + filename : splash_640x960-1.png, scale : 2x }, { orientation : portrait, idiom : iphone, extent : full-screen, + filename : splash_640x1136-1.png, subtype : retina4, scale : 2x }, @@ -72,6 +81,7 @@ orientation : portrait, idiom : ipad, extent : full-screen, + filename : splash_768x1024-1.png, scale : 1x }, { @@ -84,6 +94,7 @@ orientation : landscape, idiom : ipad, extent : full-screen, + filename : splash_1024x768-1.png, scale : 1x }, { @@ -96,6 +107,7 @@ orientation : portrait, idiom : ipad, extent : full-screen, + filename : splash_1536x2048-1.png, scale : 2x }, { @@ -108,6 +120,7 @@ orientation : landscape, idiom : ipad, extent : full-screen, + filename : splash_2048x1536-1.png, scale : 2x } ], diff --git a/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768-1.png b/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768-1.png new file mode 100644 index 000..f7ea466 --- /dev/null +++ b/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768-1.png Binary files differ diff --git a/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768.png b/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768.png new file mode 100644 index 000..f7ea466 --- /dev/null +++ b/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768.png Binary files differ diff --git a/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1536x2048-1.png b/wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1536x2048-1.png new file mode 100644 index 000..2ed50bd --- /dev/null
[MediaWiki-commits] [Gerrit] Set scroll velocity thresholds for menu reveal/hide. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Set scroll velocity thresholds for menu reveal/hide. .. Set scroll velocity thresholds for menu reveal/hide. Change-Id: I8d78ca98929ca38c49440b1236f2ad76f69b69e9 --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index a8a5281..ceb70f1 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1028,6 +1028,21 @@ if (self.webView.scrollView.isDragging ![self tocDrawerIsOpen]){ CGFloat distanceScrolled = scrollViewDragBeganVerticalOffset_ - self.webView.scrollView.contentOffset.y; CGFloat minPixelsScrolled = 20; + +// Reveal menus if scrolled to near top (100px) or if scroll velocity is a bit fast. +// Point is to avoid showing the menu if the user is *slowly* scrolling. This is how +// Safari seems to handle things. +if (self.webView.scrollView.contentOffset.y 100){ +CGPoint scrollVelocity = [self.webView.scrollView.panGestureRecognizer velocityInView:self.view]; +if (distanceScrolled 0) { +// When pulling down let things scroll a bit faster before menus reveal is triggered. +if (scrollVelocity.y 350.0f) return; +}else{ +// When pushing up set a lower scroll velocity threshold to hide menus. +if (scrollVelocity.y -150.0f) return; +} +} + if (fabsf(distanceScrolled) minPixelsScrolled) return; [ROOT animateTopAndBottomMenuHidden:((distanceScrolled 0) ? NO : YES)]; } -- To view, visit https://gerrit.wikimedia.org/r/146290 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8d78ca98929ca38c49440b1236f2ad76f69b69e9 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] iOS 6 docs led us astray with NSTextAlignmentNatural. Fixed. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: iOS 6 docs led us astray with NSTextAlignmentNatural. Fixed. .. iOS 6 docs led us astray with NSTextAlignmentNatural. Fixed. Change-Id: I211b30b65fb497fdc7b93e001cd9bbb6072525f5 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/PaddedLabel/PaddedLabel.m M wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m M wikipedia/View Controllers/Captcha/CaptchaViewController.m M wikipedia/View Controllers/EditSummary/EditSummaryViewController.m M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/View Controllers/Languages/LanguagesCell.m M wikipedia/View Controllers/Login/LoginViewController.m M wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuRowView.m M wikipedia/View Controllers/PageHistory/PageHistoryResultCell.m M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M wikipedia/View Controllers/SearchResults/SearchResultCell.m M wikipedia/mw-utils/WikipediaAppUtils.h M wikipedia/mw-utils/WikipediaAppUtils.m 17 files changed, 60 insertions(+), 36 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index decc9aa..47da97e 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -212,16 +212,16 @@ 0415581A18ADFA5C00B81A59 /* UIImage+ColorMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIImage+ColorMask.h; sourceTree = group; }; 0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIImage+ColorMask.m; sourceTree = group; }; 041A3B5818E11ED90079FF1C /* LanguagesCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesCell.h; sourceTree = group; }; - 041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesCell.m; sourceTree = group; }; + 041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = LanguagesCell.m; sourceTree = group; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 041A3B5C18E11ED90079FF1C /* LanguagesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesViewController.h; sourceTree = group; }; 041A3B5D18E11ED90079FF1C /* LanguagesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesViewController.m; sourceTree = group; }; 041C55D01950B27D006CE0EF /* EditSummaryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditSummaryViewController.h; sourceTree = group; }; - 041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditSummaryViewController.m; sourceTree = group; }; + 041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = EditSummaryViewController.m; sourceTree = group; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 04272E781940EEBC00CC682F /* AssetsFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsFile.h; sourceTree = group; }; 04272E791940EEBC00CC682F /* AssetsFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AssetsFile.m; sourceTree = group; }; 04272E7A1940EEBC00CC682F /* AssetsFileEnum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsFileEnum.h; sourceTree = group; }; 04292FEF185FBA70002A13FC /* SearchResultCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchResultCell.h; sourceTree = group; }; - 04292FF0185FBA70002A13FC /* SearchResultCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchResultCell.m; sourceTree = group; }; + 04292FF0185FBA70002A13FC /* SearchResultCell.m */ = {isa = PBXFileReference; fileEncoding = 4;
[MediaWiki-commits] [Gerrit] Made web view taps hide the toc instead of following links etc. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Made web view taps hide the toc instead of following links etc. .. Made web view taps hide the toc instead of following links etc. Change-Id: Ia801c51cd0c9584975688694fd0aedc67ea7fc6c --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 20 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index ceb70f1..608e8b1 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -779,8 +779,11 @@ __weak WebViewController *weakSelf = self; [self.bridge addListener:@linkClicked withBlock:^(NSString *messageType, NSDictionary *payload) { NSString *href = payload[@href]; - -[weakSelf tocHide]; + +if([weakSelf tocDrawerIsOpen]){ +[weakSelf tocHide]; +return; +} // @todo merge this link title extraction into MWSite if ([href hasPrefix:@/wiki/]) { @@ -824,7 +827,11 @@ }]; [self.bridge addListener:@editClicked withBlock:^(NSString *messageType, NSDictionary *payload) { -[weakSelf tocHide]; + +if([weakSelf tocDrawerIsOpen]){ +[weakSelf tocHide]; +return; +} if (weakSelf.editable) { weakSelf.sectionToEditId = [payload[@sectionId] integerValue]; @@ -837,11 +844,21 @@ }]; [self.bridge addListener:@langClicked withBlock:^(NSString *messageType, NSDictionary *payload) { +if([weakSelf tocDrawerIsOpen]){ +[weakSelf tocHide]; +return; +} + NSLog(@Language button pushed); [weakSelf languageButtonPushed]; }]; [self.bridge addListener:@historyClicked withBlock:^(NSString *messageType, NSDictionary *payload) { +if([weakSelf tocDrawerIsOpen]){ +[weakSelf tocHide]; +return; +} + [weakSelf historyButtonPushed]; }]; -- To view, visit https://gerrit.wikimedia.org/r/146343 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia801c51cd0c9584975688694fd0aedc67ea7fc6c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tweak 'last modified' text - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/146338 Change subject: Tweak 'last modified' text .. Tweak 'last modified' text * unbreak into a single line (better for i18n also) Change-Id: I4debd797903051c671bdad57783e25f42e6e5e89 --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 3 files changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/38/146338/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index ceb70f1..112a0c4 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1648,20 +1648,22 @@ NSString *ts = [WikipediaAppUtils relativeTimestamp:date]; NSString *recent = (fabs([date timeIntervalSinceNow]) 60*60*24) ? @recent : @; -NSString *lm = [MWLocalizedString(@lastmodified-timestamp, nil) stringByReplacingOccurrencesOfString:@$1 withString:ts]; -NSString *by; +NSString *lm; if (username ![username isEqualToString:@]) { -by = [MWLocalizedString(@lastmodified-by, nil) stringByReplacingOccurrencesOfString:@$1 withString:username]; +lm = [[MWLocalizedString(@lastmodified-by-user, nil) + stringByReplacingOccurrencesOfString:@$1 withString:ts] +stringByReplacingOccurrencesOfString:@$2 withString:username]; } else { -by = MWLocalizedString(@lastmodified-anon, nil); +lm = [MWLocalizedString(@lastmodified-by-anon, nil) + stringByReplacingOccurrencesOfString:@$1 withString:ts]; } return [NSString stringWithFormat:@button dir=\%@\ class=\mw-last-modified mw-footer-button %@\ @div @spanspan class=\mw-footer-icon\%@/span/span -@span%@br%@/span +@span%@/span @/div -@/button, dir, recent, icon, lm, by]; +@/button, dir, recent, icon, lm]; } -(NSString *)renderLicenseFooter diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index 9381223..a083757 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -154,9 +154,8 @@ timestamp-months = %d months ago; timestamp-years = %d years ago; -lastmodified-timestamp = Last Modified $1; -lastmodified-by = by $1; -lastmodified-anon = by an anonymous user; +lastmodified-by-user = Modified $1 by $2; +lastmodified-by-anon = Modified $1 by an anonymous user; button-next = Next; button-done = Done; diff --git a/wikipedia/qqq.lproj/Localizable.strings b/wikipedia/qqq.lproj/Localizable.strings index 49e922e..7d717e7 100644 --- a/wikipedia/qqq.lproj/Localizable.strings +++ b/wikipedia/qqq.lproj/Localizable.strings @@ -128,9 +128,8 @@ timestamp-days = Human-readable approximate timestamp for events in the last couple months, expressed as days; timestamp-months = Human-readable approximate timestamp for events in the last couple years, expressed as months; timestamp-years = Human-readable approximate timestamp for events in the distant past, expressed as years; -lastmodified-timestamp = Marker at page end for last modified time. $1 is placeholder for a human-readable approximate timestamp; -lastmodified-by = Marker at page end for who last modified the page. $1 is a username.; -lastmodified-anon = Marker at page end for who last modified the page when anonymous.; +lastmodified-by-user = Marker at page end for who last modified the page. $1 is a relative date such as '2 months ago' or 'today', $2 is a username.; +lastmodified-by-anon = Marker at page end for who last modified the page when anonymous. $1 is a relative date such as '2 months ago' or 'today'.; button-next = Button text for next button used in various places.\n{{Identical|Next}}; button-done = Button text for done button used in various places.\n{{Identical|Done}}; button-save = Button text for save button used in various places.\n{{Identical|Save}}; -- To view, visit https://gerrit.wikimedia.org/r/146338 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4debd797903051c671bdad57783e25f42e6e5e89 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix long-press menu on links - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/146346 Change subject: Fix long-press menu on links .. Fix long-press menu on links Change-Id: Ib40c51289e38285d2775a0d90093de179e950713 --- M wikipedia/assets/bundle.js M www/js/listeners.js 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/46/146346/1 diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 40350e8..c7b9b3d 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -103,6 +103,7 @@ var body = document.querySelector( body ); body.lang = payload.lang; body.dir = payload.dir; +document.querySelector('base').href = 'http://' + payload.lang + '.wikipedia.org/'; } ); bridge.registerListener( setScale, function( payload ) { diff --git a/www/js/listeners.js b/www/js/listeners.js index 019198e..a840b66 100644 --- a/www/js/listeners.js +++ b/www/js/listeners.js @@ -7,6 +7,7 @@ var body = document.querySelector( body ); body.lang = payload.lang; body.dir = payload.dir; +document.querySelector('base').href = 'http://' + payload.lang + '.wikipedia.org/'; } ); bridge.registerListener( setScale, function( payload ) { -- To view, visit https://gerrit.wikimedia.org/r/146346 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib40c51289e38285d2775a0d90093de179e950713 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] License - Terms of Use in menu - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/146354 Change subject: License - Terms of Use in menu .. License - Terms of Use in menu Change-Id: I83706fd16be962e4db22ff80871bbec48c0db713 --- M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 3 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/54/146354/1 diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 8cf2a5b..805e28f 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -35,7 +35,7 @@ #define URL_ZERO_FAQ @https://m.wikimediafoundation.org/wiki/Wikipedia_Zero_App_FAQ; #define URL_PRIVACY_POLICY @https://m.wikimediafoundation.org/wiki/Privacy_Policy; -#define URL_LICENSE @https://m.wikimediafoundation.org/wiki/Terms_of_Use; +#define URL_TERMS @https://m.wikimediafoundation.org/wiki/Terms_of_Use; #define URL_RATE_APP @itms-apps://itunes.apple.com/app/id324715238 typedef enum { @@ -50,7 +50,7 @@ SECONDARY_MENU_ROW_INDEX_CREDITS = 8, SECONDARY_MENU_ROW_INDEX_SEND_USAGE_REPORTS = 9, SECONDARY_MENU_ROW_INDEX_PRIVACY_POLICY = 10, -SECONDARY_MENU_ROW_INDEX_LICENSE = 11, +SECONDARY_MENU_ROW_INDEX_TERMS = 11, SECONDARY_MENU_ROW_INDEX_RATE_APP = 12, SECONDARY_MENU_ROW_INDEX_HEADING_ZERO = 13, SECONDARY_MENU_ROW_INDEX_HEADING_LEGAL = 14, @@ -445,8 +445,8 @@ }.mutableCopy , @{ - @title: MWLocalizedString(@main-menu-license, nil), - @tag: @(SECONDARY_MENU_ROW_INDEX_LICENSE), + @title: MWLocalizedString(@main-menu-terms-of-use, nil), + @tag: @(SECONDARY_MENU_ROW_INDEX_TERMS), @icon: ltrSafeCaretCharacter, @type: @(ROW_TYPE_SELECTION), }.mutableCopy @@ -595,9 +595,9 @@ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:URL_PRIVACY_POLICY]]; } break; -case SECONDARY_MENU_ROW_INDEX_LICENSE: +case SECONDARY_MENU_ROW_INDEX_TERMS: { -[[UIApplication sharedApplication] openURL:[NSURL URLWithString:URL_LICENSE]]; +[[UIApplication sharedApplication] openURL:[NSURL URLWithString:URL_TERMS]]; } break; case SECONDARY_MENU_ROW_INDEX_RATE_APP: diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index a083757..37599b5 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -98,7 +98,7 @@ main-menu-credits = Credits; main-menu-zero-faq = Wikipedia Zero FAQ; main-menu-privacy-policy = Privacy policy; -main-menu-license = License; +main-menu-terms-of-use = Terms of Use; main-menu-rate-app = Rate app; main-menu-heading-zero = Wikipedia Zero; main-menu-heading-legal = Mumbo jumbo; diff --git a/wikipedia/qqq.lproj/Localizable.strings b/wikipedia/qqq.lproj/Localizable.strings index 7d717e7..e3af9a5 100644 --- a/wikipedia/qqq.lproj/Localizable.strings +++ b/wikipedia/qqq.lproj/Localizable.strings @@ -156,5 +156,5 @@ open-link-cancel = Text for cancel button in popup menu of terms/license link options; main-menu-zero-faq = Button text for showing the Wikipedia Zero Frequently Asked Questions (FAQ) document; main-menu-privacy-policy = Button text for showing privacy policy; -main-menu-license = Button text for showing license; main-menu-rate-app = Button text for showing the app in the app store so user can rate the app; +main-menu-terms-of-use = Button text for showing site terms of use; -- To view, visit https://gerrit.wikimedia.org/r/146354 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83706fd16be962e4db22ff80871bbec48c0db713 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rtl fixes for search results and lang selector. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Rtl fixes for search results and lang selector. .. Rtl fixes for search results and lang selector. Change-Id: I0ee121e1c7f0db79fd3c5e71041885f6718a9c82 --- M wikipedia/View Controllers/Languages/LanguagesCell.m M wikipedia/View Controllers/SearchResults/SearchResultCell.m 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Languages/LanguagesCell.m b/wikipedia/View Controllers/Languages/LanguagesCell.m index 86cbff6..4fb623b 100644 --- a/wikipedia/View Controllers/Languages/LanguagesCell.m +++ b/wikipedia/View Controllers/Languages/LanguagesCell.m @@ -29,7 +29,8 @@ //self.textLabel.layer.borderWidth = 1; //self.textLabel.layer.borderColor = [UIColor redColor].CGColor; self.backgroundColor = BACKGROUND_COLOR; -} +self.textLabel.textAlignment = NSTextAlignmentNatural; +self.canonicalLabel.textAlignment = NSTextAlignmentNatural;} - (void)setSelected:(BOOL)selected animated:(BOOL)animated { diff --git a/wikipedia/View Controllers/SearchResults/SearchResultCell.m b/wikipedia/View Controllers/SearchResults/SearchResultCell.m index 6e4898d..717e0bb 100644 --- a/wikipedia/View Controllers/SearchResults/SearchResultCell.m +++ b/wikipedia/View Controllers/SearchResults/SearchResultCell.m @@ -59,6 +59,8 @@ //self.textLabel.layer.borderWidth = 1; //self.textLabel.layer.borderColor = [UIColor redColor].CGColor; //self.backgroundColor = [UIColor greenColor]; + +self.textLabel.textAlignment = NSTextAlignmentNatural; } -(void)prepareForReuse -- To view, visit https://gerrit.wikimedia.org/r/146183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ee121e1c7f0db79fd3c5e71041885f6718a9c82 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix ToC scrolling to sections near end of page - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/146641 Change subject: Fix ToC scrolling to sections near end of page .. Fix ToC scrolling to sections near end of page The ToC section tap code was scrolling past the end of the document, which got reset as soon as we adjusted the document further (say by zooming in when hiding the ToC). Work around this by 1024px of padding at the end of the web document while the ToC is open -- this keeps the scroll position intact through the zoom out, and then we remove the space again and no one's any the wiser, we hope! Bug: 67633 Change-Id: Idc6f454bc35fd621b3434734a0629ad750d441d0 --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M wikipedia/assets/index.html M www/index.html M www/js/listeners.js 5 files changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/41/146641/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index 171b014..e3f3be9 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -446,6 +446,9 @@ }completion: ^(BOOL done){ if(self.tocVC) [self tocViewControllerRemove]; self.unsafeToToggleTOC = NO; + + // Remove the extra scroll area we added + [self retractScroll]; }]; } @@ -469,6 +472,9 @@ // Clear alerts [self fadeAlert]; + +// Extend the bottom of the view so we can scroll to sections close to the end +[self expandScroll]; // Ensure the toc is rebuilt from scratch! Very weird toc scroll view // resizing issues (can't scroll up to bottom toc entry sometimes, etc) @@ -1962,4 +1968,25 @@ [alert show]; } +#pragma mark - Scrollview manipulation for ToC helper + +/** + * When we zoom out, we still need to be able to scroll to sections + * that are very near the end of the page. So tell the web view to + * increase its height a bit... + */ +-(void)expandScroll +{ +[self.bridge sendMessage:@expandScroll withPayload:@{}]; +} + +/** + * After we zoom back in, we can remove that extra space added by + * call to -expandScroll. + */ +-(void)retractScroll +{ +[self.bridge sendMessage:@retractScroll withPayload:@{}]; +} + @end diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index c7b9b3d..31491a2 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -178,6 +178,14 @@ document.getElementsByTagName( html )[0].classList.add( page-protected ); } ); +bridge.registerListener( expandScroll, function() { +document.getElementById( toc-scroll-padding ).style.height = 1024px; +}); + +bridge.registerListener( retractScroll, function() { +document.getElementById( toc-scroll-padding ).style.height = auto; +}); + /** * Quickie function to walk from the current element up to parents and match CSS-ish selectors. * Think of it as a reverse element.querySelector :) diff --git a/wikipedia/assets/index.html b/wikipedia/assets/index.html index a207b8b..2a4b078 100644 --- a/wikipedia/assets/index.html +++ b/wikipedia/assets/index.html @@ -12,5 +12,6 @@ body div class=content id=content /div +div id=toc-scroll-padding/div /body /html \ No newline at end of file diff --git a/www/index.html b/www/index.html index a207b8b..2a4b078 100644 --- a/www/index.html +++ b/www/index.html @@ -12,5 +12,6 @@ body div class=content id=content /div +div id=toc-scroll-padding/div /body /html \ No newline at end of file diff --git a/www/js/listeners.js b/www/js/listeners.js index a840b66..11ee83f 100644 --- a/www/js/listeners.js +++ b/www/js/listeners.js @@ -82,6 +82,14 @@ document.getElementsByTagName( html )[0].classList.add( page-protected ); } ); +bridge.registerListener( expandScroll, function() { +document.getElementById( toc-scroll-padding ).style.height = 1024px; +}); + +bridge.registerListener( retractScroll, function() { +document.getElementById( toc-scroll-padding ).style.height = auto; +}); + /** * Quickie function to walk from the current element up to parents and match CSS-ish selectors. * Think of it as a reverse element.querySelector :) -- To view, visit https://gerrit.wikimedia.org/r/146641 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc6f454bc35fd621b3434734a0629ad750d441d0 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] License string corrected - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: License string corrected .. License string corrected Correct license abreviation is CC BY-SA 3.0. (per https://creativecommons.org/licenses/by-sa/3.0/) Affects: * license-footer-name Spotted by Jopparn at https://translatewiki.net/wiki/Thread:Support/About_Wikimedia:Wikipedia-ios-license-footer-name/sv Change-Id: Icaa1afa24e53d75af195ed332b14111f4e40e19b --- M wikipedia/en.lproj/Localizable.strings 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index 37599b5..99b537a 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -176,6 +176,6 @@ page_protected_can_not_edit_title = This page is protected; license-footer-text = Content is available under $1; -license-footer-name = CC-BY-SA 3.0; +license-footer-name = CC BY-SA 3.0; table-of-contents-heading = Contents; -- To view, visit https://gerrit.wikimedia.org/r/146744 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icaa1afa24e53d75af195ed332b14111f4e40e19b Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Lokal Profil lokal.pro...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Animate splash logo. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Animate splash logo. .. Animate splash logo. Change-Id: I3d25c17b3f86f0821d669b894f08b4796618bbda --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768-1.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1024x768.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1536x2048-1.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_1536x2048.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_2048x1536-1.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_2048x1536.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_320x480.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x1136-1.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x1136.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x960-1.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_640x960.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_768x1024-1.png M wikipedia/Images.xcassets/LaunchImage.launchimage/splash_768x1024.png M wikipedia/View Controllers/Onboarding/OnboardingViewController.m M wikipedia/View Controllers/Root/RootViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 17 files changed, 261 insertions(+), 47 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard b/wikipedia/Base.lproj/Main_iPhone.storyboard index f830763..c44bf88 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -833,32 +833,32 @@ viewControllerLayoutGuide type=top id=Wha-F2-A5d/ viewControllerLayoutGuide type=bottom id=aHG-dq-Url/ /layoutGuides -view key=view contentMode=scaleToFill id=GRM-Ns-1PB +view key=view opaque=NO clearsContextBeforeDrawing=NO contentMode=scaleToFill id=GRM-Ns-1PB rect key=frame x=0.0 y=0.0 width=320 height=568/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews -scrollView opaque=NO clipsSubviews=YES clearsContextBeforeDrawing=NO multipleTouchEnabled=YES contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=mLM-M6-Y1D +scrollView opaque=NO clipsSubviews=YES clearsContextBeforeDrawing=NO multipleTouchEnabled=YES contentMode=scaleToFill showsHorizontalScrollIndicator=NO translatesAutoresizingMaskIntoConstraints=NO id=mLM-M6-Y1D rect key=frame x=0.0 y=0.0 width=320 height=568/ autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/ subviews view opaque=NO clearsContextBeforeDrawing=NO contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=7jD-Km-GNT userLabel=Scroll Container -rect key=frame x=0.0 y=0.0 width=320 height=475/ +rect key=frame x=0.0 y=0.0 width=320 height=477/ autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/ subviews view opaque=NO clearsContextBeforeDrawing=NO contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=Ypf-Xx-Lly -rect key=frame x=20 y=0.0 width=280 height=475/ +rect key=frame x=20 y=0.0 width=280 height=477/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews -imageView userInteractionEnabled=NO contentMode=center horizontalHuggingPriority=251 verticalHuggingPriority=251 image=logo-onboarding.png translatesAutoresizingMaskIntoConstraints=NO id=K0v-hf-TOf +imageView opaque=NO clearsContextBeforeDrawing=NO userInteractionEnabled=NO contentMode=center horizontalHuggingPriority=251 verticalHuggingPriority=251 image=logo-onboarding.png translatesAutoresizingMaskIntoConstraints=NO id=K0v-hf-TOf rect key=frame x=35 y=56 width=210 height=192/ autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/
[MediaWiki-commits] [Gerrit] Lower case u in terms of use. More menu padding adjustment. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Lower case u in terms of use. More menu padding adjustment. .. Lower case u in terms of use. More menu padding adjustment. Change-Id: Id167df0843f7203a349aca7eae59a380ebf7cf21 --- M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuRowView.m M wikipedia/en.lproj/Localizable.strings 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuRowView.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuRowView.m index b7e2f20..fae9d16 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuRowView.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuRowView.m @@ -79,7 +79,7 @@ break; case ROW_TYPE_SELECTION: self.insetTopBorderHeightConstraint.constant = 0; -self.textLabel.padding = UIEdgeInsetsMake(6, 0, 6, 0); +self.textLabel.padding = UIEdgeInsetsMake(10, 0, 10, 0); self.backgroundColor = [UIColor whiteColor]; break; diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index 99b537a..7de1a32 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -98,7 +98,7 @@ main-menu-credits = Credits; main-menu-zero-faq = Wikipedia Zero FAQ; main-menu-privacy-policy = Privacy policy; -main-menu-terms-of-use = Terms of Use; +main-menu-terms-of-use = Terms of use; main-menu-rate-app = Rate app; main-menu-heading-zero = Wikipedia Zero; main-menu-heading-legal = Mumbo jumbo; -- To view, visit https://gerrit.wikimedia.org/r/146855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id167df0843f7203a349aca7eae59a380ebf7cf21 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed right carets from more menu. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Removed right carets from more menu. .. Removed right carets from more menu. Change-Id: I8496eb24d499d42c284dc1c97dde46ed4c860843 --- M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 805e28f..0c10f91 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -322,7 +322,7 @@ -(void)setRowData { -NSString *ltrSafeCaretCharacter = [WikipediaAppUtils isDeviceLanguageRTL] ? IOS_WIKIGLYPH_BACKWARD : IOS_WIKIGLYPH_FORWARD; +//NSString *ltrSafeCaretCharacter = [WikipediaAppUtils isDeviceLanguageRTL] ? IOS_WIKIGLYPH_BACKWARD : IOS_WIKIGLYPH_FORWARD; //NSString *currentArticleTitle = [SessionSingleton sharedInstance].currentArticleTitle; @@ -403,7 +403,7 @@ @{ @title: MWLocalizedString(@main-menu-zero-faq, nil), @tag: @(SECONDARY_MENU_ROW_INDEX_ZERO_FAQ), - @icon: ltrSafeCaretCharacter, + @icon: @, @type: @(ROW_TYPE_SELECTION), }.mutableCopy , @@ -440,14 +440,14 @@ @{ @title: MWLocalizedString(@main-menu-privacy-policy, nil), @tag: @(SECONDARY_MENU_ROW_INDEX_PRIVACY_POLICY), - @icon: ltrSafeCaretCharacter, + @icon: @, @type: @(ROW_TYPE_SELECTION), }.mutableCopy , @{ @title: MWLocalizedString(@main-menu-terms-of-use, nil), @tag: @(SECONDARY_MENU_ROW_INDEX_TERMS), - @icon: ltrSafeCaretCharacter, + @icon: @, @type: @(ROW_TYPE_SELECTION), }.mutableCopy , -- To view, visit https://gerrit.wikimedia.org/r/146856 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8496eb24d499d42c284dc1c97dde46ed4c860843 Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ensure alerts don't show when toc is revealed. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Ensure alerts don't show when toc is revealed. .. Ensure alerts don't show when toc is revealed. Change-Id: I72b43275425edb2f3cc58a1dce440a96018306cd --- M wikipedia/Categories/Alerts/UIViewController+Alert.h M wikipedia/Categories/Alerts/UIViewController+Alert.m M wikipedia/View Controllers/WebView/WebViewController.m 3 files changed, 15 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/Alerts/UIViewController+Alert.h b/wikipedia/Categories/Alerts/UIViewController+Alert.h index 4bc5df8..63cbf4f 100644 --- a/wikipedia/Categories/Alerts/UIViewController+Alert.h +++ b/wikipedia/Categories/Alerts/UIViewController+Alert.h @@ -13,6 +13,8 @@ -(void)fadeAlert; +-(void)hideAlert; + // Shows full screen alert html just beneath the nav bar. // Any links open in Safari. -(void)showHTMLAlert: (NSString *)html diff --git a/wikipedia/Categories/Alerts/UIViewController+Alert.m b/wikipedia/Categories/Alerts/UIViewController+Alert.m index eaaf74e..6066a30 100644 --- a/wikipedia/Categories/Alerts/UIViewController+Alert.m +++ b/wikipedia/Categories/Alerts/UIViewController+Alert.m @@ -42,6 +42,15 @@ [self showAlert:@]; } +-(void)hideAlert +{ +// Hide alert immediately. +AlertLabel *alertLabel = [self getExistingViewOfClass:[AlertLabel class] inContainer:self.view]; +if (alertLabel) { +alertLabel.alpha = 0.0; +} +} + -(BOOL)shouldHideAlertForViewController:(UIViewController *)vc { BOOL hideAlerts = NO; diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index 371e7e7..cd76df3 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -237,6 +237,8 @@ -(void)showAlert:(NSString *)alertText { +if ([self tocDrawerIsOpen]) return; + // Don't show alerts if onboarding onscreen. if ([self shouldShowOnboarding]) return; @@ -472,8 +474,8 @@ { self.unsafeToToggleTOC = YES; -// Clear alerts -[self fadeAlert]; +// Hide any alerts immediately. +[self hideAlert]; // Ensure the toc is rebuilt from scratch! Very weird toc scroll view // resizing issues (can't scroll up to bottom toc entry sometimes, etc) -- To view, visit https://gerrit.wikimedia.org/r/146899 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I72b43275425edb2f3cc58a1dce440a96018306cd Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Slight adjustment to alert hiding to ensure fade interrupted. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Slight adjustment to alert hiding to ensure fade interrupted. .. Slight adjustment to alert hiding to ensure fade interrupted. Change-Id: If78247cd2d65fdb8d4ac8e508528d50bf751e3c2 --- M wikipedia/Categories/Alerts/UIViewController+Alert.m 1 file changed, 5 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/Alerts/UIViewController+Alert.m b/wikipedia/Categories/Alerts/UIViewController+Alert.m index 6066a30..1f1fa59 100644 --- a/wikipedia/Categories/Alerts/UIViewController+Alert.m +++ b/wikipedia/Categories/Alerts/UIViewController+Alert.m @@ -4,6 +4,7 @@ #import UIViewController+Alert.h #import AlertLabel.h #import AlertWebView.h +#import UIView+RemoveConstraints.h @implementation UIViewController (Alert) @@ -44,10 +45,12 @@ -(void)hideAlert { -// Hide alert immediately. +// Hide alert immediately. Removes it so any running fade animations don't prevent immediate hide. AlertLabel *alertLabel = [self getExistingViewOfClass:[AlertLabel class] inContainer:self.view]; if (alertLabel) { -alertLabel.alpha = 0.0; +[alertLabel removeConstraintsOfViewFromView:self.view]; +[alertLabel removeFromSuperview]; +alertLabel = nil; } } -- To view, visit https://gerrit.wikimedia.org/r/146900 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If78247cd2d65fdb8d4ac8e508528d50bf751e3c2 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Search field clear icon more distinct. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Search field clear icon more distinct. .. Search field clear icon more distinct. Ran other icons though image optimizer to reduce file size. Better vertical centering on ios 6 for back/forward icons. Change-Id: I0b935d751f9723d3c74d7bc155248f79002deaf1 --- M wikipedia/Images/abuse-filter-disallowed.png M wikipedia/Images/abuse-filter-disallo...@2x.png M wikipedia/Images/abuse-filter-flag-white.png M wikipedia/Images/abuse-filter-flag-wh...@2x.png M wikipedia/Images/clear.png M wikipedia/Images/logo-onboarding-subtitle.png M wikipedia/Images/logo-onboarding-subti...@2x.png M wikipedia/Images/logo-onboarding.png M wikipedia/Images/logo-onboard...@2x.png M wikipedia/Images/logo-search-placeholder.png M wikipedia/Images/logo-search-placehol...@2x.png M wikipedia/Images/text_field_x_circle_gray.png M wikipedia/Images/text_field_x_circle_g...@2x.png M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m 15 files changed, 6 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Images/abuse-filter-disallowed.png b/wikipedia/Images/abuse-filter-disallowed.png index 8675eab..55271e9 100644 --- a/wikipedia/Images/abuse-filter-disallowed.png +++ b/wikipedia/Images/abuse-filter-disallowed.png Binary files differ diff --git a/wikipedia/Images/abuse-filter-disallo...@2x.png b/wikipedia/Images/abuse-filter-disallo...@2x.png index e6d5c44..84f4598 100644 --- a/wikipedia/Images/abuse-filter-disallo...@2x.png +++ b/wikipedia/Images/abuse-filter-disallo...@2x.png Binary files differ diff --git a/wikipedia/Images/abuse-filter-flag-white.png b/wikipedia/Images/abuse-filter-flag-white.png index dc87bda..b01ed32 100644 --- a/wikipedia/Images/abuse-filter-flag-white.png +++ b/wikipedia/Images/abuse-filter-flag-white.png Binary files differ diff --git a/wikipedia/Images/abuse-filter-flag-wh...@2x.png b/wikipedia/Images/abuse-filter-flag-wh...@2x.png index b605d71..13ea356 100644 --- a/wikipedia/Images/abuse-filter-flag-wh...@2x.png +++ b/wikipedia/Images/abuse-filter-flag-wh...@2x.png Binary files differ diff --git a/wikipedia/Images/clear.png b/wikipedia/Images/clear.png index 1074531..dc0044c 100644 --- a/wikipedia/Images/clear.png +++ b/wikipedia/Images/clear.png Binary files differ diff --git a/wikipedia/Images/logo-onboarding-subtitle.png b/wikipedia/Images/logo-onboarding-subtitle.png index c71f4aa..d8c5e04 100644 --- a/wikipedia/Images/logo-onboarding-subtitle.png +++ b/wikipedia/Images/logo-onboarding-subtitle.png Binary files differ diff --git a/wikipedia/Images/logo-onboarding-subti...@2x.png b/wikipedia/Images/logo-onboarding-subti...@2x.png index 9d8ecbe..6e0f677 100644 --- a/wikipedia/Images/logo-onboarding-subti...@2x.png +++ b/wikipedia/Images/logo-onboarding-subti...@2x.png Binary files differ diff --git a/wikipedia/Images/logo-onboarding.png b/wikipedia/Images/logo-onboarding.png index 33f52a0..4969793 100644 --- a/wikipedia/Images/logo-onboarding.png +++ b/wikipedia/Images/logo-onboarding.png Binary files differ diff --git a/wikipedia/Images/logo-onboard...@2x.png b/wikipedia/Images/logo-onboard...@2x.png index df5b179..adc68c7 100644 --- a/wikipedia/Images/logo-onboard...@2x.png +++ b/wikipedia/Images/logo-onboard...@2x.png Binary files differ diff --git a/wikipedia/Images/logo-search-placeholder.png b/wikipedia/Images/logo-search-placeholder.png index 4f37aa5..30779a5 100644 --- a/wikipedia/Images/logo-search-placeholder.png +++ b/wikipedia/Images/logo-search-placeholder.png Binary files differ diff --git a/wikipedia/Images/logo-search-placehol...@2x.png b/wikipedia/Images/logo-search-placehol...@2x.png index 0ccb276..a0e6496 100644 --- a/wikipedia/Images/logo-search-placehol...@2x.png +++ b/wikipedia/Images/logo-search-placehol...@2x.png Binary files differ diff --git a/wikipedia/Images/text_field_x_circle_gray.png b/wikipedia/Images/text_field_x_circle_gray.png old mode 100644 new mode 100755 index 3489286..fd0e2ac --- a/wikipedia/Images/text_field_x_circle_gray.png +++ b/wikipedia/Images/text_field_x_circle_gray.png Binary files differ diff --git a/wikipedia/Images/text_field_x_circle_g...@2x.png b/wikipedia/Images/text_field_x_circle_g...@2x.png old mode 100644 new mode 100755 index d8d0fb7..9ad2a61 --- a/wikipedia/Images/text_field_x_circle_g...@2x.png +++ b/wikipedia/Images/text_field_x_circle_g...@2x.png Binary files differ diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index a33e2b2..2c55fae 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -55,18 +55,20 @@ UIColor
[MediaWiki-commits] [Gerrit] Slightly slower toc toggle animation. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Slightly slower toc toggle animation. .. Slightly slower toc toggle animation. Change-Id: I7a97b8626a418ffeff254322e9da094f99a2a922 --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index cd76df3..91c7bba 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -54,7 +54,7 @@ //#import UIView+Debugging.h -#define TOC_TOGGLE_ANIMATION_DURATION @0.2f +#define TOC_TOGGLE_ANIMATION_DURATION @0.225f typedef enum { DISPLAY_LEAD_SECTION = 0, -- To view, visit https://gerrit.wikimedia.org/r/146944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a97b8626a418ffeff254322e9da094f99a2a922 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for random causing flicker. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for random causing flicker. .. Fix for random causing flicker. Change-Id: I2429e18b7f68e6708c5897fed8501f7170c78634 --- M wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m index 9d7d08a..36fd898 100644 --- a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m @@ -258,7 +258,7 @@ } break; case PRIMARY_MENU_ITEM_RANDOM: { -[self showAlert:MWLocalizedString(@fetching-random-article, nil)]; +//[self showAlert:MWLocalizedString(@fetching-random-article, nil)]; [self fetchRandomArticle]; [self popModal]; } -- To view, visit https://gerrit.wikimedia.org/r/146945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2429e18b7f68e6708c5897fed8501f7170c78634 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for repeated random taps eventually crashing. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for repeated random taps eventually crashing. .. Fix for repeated random taps eventually crashing. Change-Id: I8f4de053fa53a66024f139ac42b7eda898df7362 --- M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/View Controllers/Navigation/Center/CenterNavController.h M wikipedia/View Controllers/Navigation/Center/CenterNavController.m M wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M wikipedia/View Controllers/SearchResults/SearchResultsController.m M wikipedia/View Controllers/WebView/WebViewController.m 8 files changed, 18 insertions(+), 8 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/History/HistoryViewController.m b/wikipedia/View Controllers/History/HistoryViewController.m index 18e0670..1f7bfb8 100644 --- a/wikipedia/View Controllers/History/HistoryViewController.m +++ b/wikipedia/View Controllers/History/HistoryViewController.m @@ -403,7 +403,8 @@ domain: historyEntry.article.domain animated: YES discoveryMethod: DISCOVERY_METHOD_SEARCH -invalidatingCache: NO]; +invalidatingCache: NO + popToWebVC: YES]; [self popModalToRoot]; } diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h index 9107402..f3ab356 100644 --- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h +++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h @@ -19,7 +19,8 @@ domain: (NSString *)domain animated: (BOOL)animated discoveryMethod: (ArticleDiscoveryMethod)discoveryMethod - invalidatingCache: (BOOL)invalidateCache; + invalidatingCache: (BOOL)invalidateCache + popToWebVC: (BOOL)popToWebVC; -(void) promptFirstTimeZeroOnWithTitleIfAppropriate:(NSString *) title; -(void) promptZeroOff; diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.m b/wikipedia/View Controllers/Navigation/Center/CenterNavController.m index f958e4e..75f55b5 100644 --- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.m +++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.m @@ -81,6 +81,7 @@ animated: (BOOL)animated discoveryMethod: (ArticleDiscoveryMethod)discoveryMethod invalidatingCache: (BOOL)invalidateCache + popToWebVC: (BOOL)popToWebVC { WebViewController *webVC = [self searchNavStackForViewControllerOfClass:[WebViewController class]]; if (webVC){ @@ -90,7 +91,9 @@ domain: domain discoveryMethod: discoveryMethod invalidatingCache: invalidateCache]; -[ROOT popToViewController:webVC animated:animated]; +if (popToWebVC) { +[ROOT popToViewController:webVC animated:animated]; +} } } diff --git a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m index 36fd898..9e99225 100644 --- a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m @@ -297,7 +297,8 @@ domain: [SessionSingleton sharedInstance].domain animated: YES discoveryMethod: DISCOVERY_METHOD_RANDOM - invalidatingCache: NO]; + invalidatingCache: NO + popToWebVC: NO]; // Don't pop - popModal was already called above. }); } } cancelledBlock: ^(NSError *errorCancel) { diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 0c10f91..573673f 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -700,7
[MediaWiki-commits] [Gerrit] Put 'action' before 'format' on API parameters to fix app in... - change (apps...java-mwapi)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/147134 Change subject: Put 'action' before 'format' on API parameters to fix app indexing .. Put 'action' before 'format' on API parameters to fix app indexing Our robots.txt whitelists API requests for action=mobileview... but only if action=mobileview appears as the first parameter. This is required for Google's app search indexing, which otherwise detects we've fetched something outside robots.txt and gets confused. Change-Id: I991bd40574e5311c6e3cd8fa646f31ccb6e420ac --- M src/main/java/org/mediawiki/api/json/RequestBuilder.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/java-mwapi refs/changes/34/147134/1 diff --git a/src/main/java/org/mediawiki/api/json/RequestBuilder.java b/src/main/java/org/mediawiki/api/json/RequestBuilder.java index 7a0fd17..11bb6f3 100644 --- a/src/main/java/org/mediawiki/api/json/RequestBuilder.java +++ b/src/main/java/org/mediawiki/api/json/RequestBuilder.java @@ -25,8 +25,8 @@ RequestBuilder(final Api apiToUse, final String action) { this.api = apiToUse; params = new HashMapString, String(); +params.put(action, action); // put action first to match robots.txt whitelist of action=mobileview for app search indexing params.put(format, json); // Force everything to be JSON -params.put(action, action); } /** -- To view, visit https://gerrit.wikimedia.org/r/147134 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I991bd40574e5311c6e3cd8fa646f31ccb6e420ac Gerrit-PatchSet: 1 Gerrit-Project: apps/android/java-mwapi Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Killed the Credits carets. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Killed the Credits carets. .. Killed the Credits carets. Change-Id: I98523897544aa1e2385f7cbb57b218a142c49a96 --- M wikipedia/View Controllers/Credits/CreditsViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Credits/CreditsViewController.m b/wikipedia/View Controllers/Credits/CreditsViewController.m index 9c6a4f3..44152bf 100644 --- a/wikipedia/View Controllers/Credits/CreditsViewController.m +++ b/wikipedia/View Controllers/Credits/CreditsViewController.m @@ -200,7 +200,7 @@ -(void)setRowData { -NSString *ltrSafeCaretCharacter = [WikipediaAppUtils isDeviceLanguageRTL] ? IOS_WIKIGLYPH_BACKWARD : IOS_WIKIGLYPH_FORWARD; +NSString *ltrSafeCaretCharacter = @; //[WikipediaAppUtils isDeviceLanguageRTL] ? IOS_WIKIGLYPH_BACKWARD : IOS_WIKIGLYPH_FORWARD; NSMutableArray *rowData = @[ -- To view, visit https://gerrit.wikimedia.org/r/146997 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98523897544aa1e2385f7cbb57b218a142c49a96 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More fixes related to the random crash fix. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: More fixes related to the random crash fix. .. More fixes related to the random crash fix. Change-Id: I667866c1872cdbc224c271bf44a3922bd44c4472 --- M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/History/HistoryViewController.m b/wikipedia/View Controllers/History/HistoryViewController.m index 1f7bfb8..829628e 100644 --- a/wikipedia/View Controllers/History/HistoryViewController.m +++ b/wikipedia/View Controllers/History/HistoryViewController.m @@ -404,7 +404,7 @@ animated: YES discoveryMethod: DISCOVERY_METHOD_SEARCH invalidatingCache: NO - popToWebVC: YES]; + popToWebVC: NO]; [self popModalToRoot]; } diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 573673f..c69007e 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -701,7 +701,7 @@ animated: YES discoveryMethod: DISCOVERY_METHOD_SEARCH invalidatingCache: YES - popToWebVC: YES]; + popToWebVC: NO]; } } diff --git a/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m b/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m index 8465c65..4e28937 100644 --- a/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m +++ b/wikipedia/View Controllers/SavedPages/SavedPagesViewController.m @@ -262,7 +262,7 @@ animated: YES discoveryMethod: DISCOVERY_METHOD_SEARCH invalidatingCache: NO - popToWebVC: YES]; + popToWebVC: NO]; [self popModalToRoot]; } -- To view, visit https://gerrit.wikimedia.org/r/146983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I667866c1872cdbc224c271bf44a3922bd44c4472 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: EL updates for saved pages - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/147311 Change subject: Work in progress: EL updates for saved pages .. Work in progress: EL updates for saved pages Some questions at https://meta.wikimedia.org/wiki/Schema_talk:MobileWikiAppSavedPages Change-Id: Ib14b72f3b84fcd5bef923330a8078d8a3a8f95c6 --- M Wikipedia.xcodeproj/project.pbxproj A wikipedia/EventLogging/SavedPagesFunnel.h A wikipedia/EventLogging/SavedPagesFunnel.m 3 files changed, 117 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/11/147311/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 47da97e..61a4808 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -160,6 +160,7 @@ D46CD8C418A1AC4F0042959E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D46CD8C018A1AC4F0042959E /* InfoPlist.strings */; }; D46CD8C518A1AC4F0042959E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D46CD8C218A1AC4F0042959E /* Localizable.strings */; }; D474CC15182AE196002BDE45 /* MWSite.m in Sources */ = {isa = PBXBuildFile; fileRef = D474CC14182AE196002BDE45 /* MWSite.m */; }; + D47BF5D4197870390067C3BC /* SavedPagesFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D47BF5D3197870390067C3BC /* SavedPagesFunnel.m */; }; D4991439181D51DE00E6073C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4991438181D51DE00E6073C /* Foundation.framework */; }; D499143B181D51DE00E6073C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D499143A181D51DE00E6073C /* CoreGraphics.framework */; }; D499143D181D51DE00E6073C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D499143C181D51DE00E6073C /* UIKit.framework */; }; @@ -587,6 +588,8 @@ D474CC12182AE07C002BDE45 /* WikipediaApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WikipediaApp.h; sourceTree = group; }; D474CC13182AE196002BDE45 /* MWSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWSite.h; path = mw-support/MWSite.h; sourceTree = group; }; D474CC14182AE196002BDE45 /* MWSite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MWSite.m; path = mw-support/MWSite.m; sourceTree = group; }; + D47BF5D2197870390067C3BC /* SavedPagesFunnel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SavedPagesFunnel.h; path = EventLogging/SavedPagesFunnel.h; sourceTree = group; }; + D47BF5D3197870390067C3BC /* SavedPagesFunnel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SavedPagesFunnel.m; path = EventLogging/SavedPagesFunnel.m; sourceTree = group; }; D4991435181D51DE00E6073C /* Wikipedia.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Wikipedia.app; sourceTree = BUILT_PRODUCTS_DIR; }; D4991438181D51DE00E6073C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; D499143A181D51DE00E6073C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -1538,6 +1541,8 @@ D4F277FA194235A00032BA38 /* ProtectedEditAttemptFunnel.m */, D4F277FC194235B50032BA38 /* ToCInteractionFunnel.h */, D4F277FD194235B50032BA38 /* ToCInteractionFunnel.m */, + D47BF5D2197870390067C3BC /* SavedPagesFunnel.h */, + D47BF5D3197870390067C3BC /* SavedPagesFunnel.m */, ); name = EventLogging; sourceTree = group; @@ -1929,6 +1934,7 @@ 04C43A9D183440B0006C643B /* MWCrumbyTest.m in Sources */, D4991445181D51DE00E6073C /* main.m in Sources */, 04CFA123194B94980088269A /* MenuButton.m in Sources */, + D47BF5D4197870390067C3BC /* SavedPagesFunnel.m in Sources */, 04C43AC0183442FC006C643B /* NSString+Extras.m in Sources */, 04CCCFEE1935093A00E3F60C /*
[MediaWiki-commits] [Gerrit] Updated bits URLs in base CSS - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/147313 Change subject: Updated bits URLs in base CSS .. Updated bits URLs in base CSS Change-Id: Idd30ffabbfd9e2ed5cdbab9e9921422dc440e73b --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/13/147313/1 diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 8574f49..67fc7de 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -283,7 +283,7 @@ } a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); - background-image: url(//bits.wikimedia.org/static-1.24wmf12/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-03T17:31:40Z)!ie; + background-image: url(//bits.wikimedia.org/static-1.24wmf13/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-10T15:10:00Z)!ie; /* We don't need the !ie hack because this old IE uses the fallback already */ background-image: -webkit-linear-gradient(transparent,transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGRlZnM+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNLS45NTgtNC4yNTljLTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2IDAgLjM5NC4xNDMuNzM2LjMzNiAxLjA0OWwtLjA3LjA1NmMtLjM3My0uNTEzLS45NTQtLjg2Ny0xLjYzNi0uODY3LTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2cy45MjIgMi4wNTYgMi4wNTYgMi4wNTZjLjU5NiAwIDEuMTIxLS4yNjUgMS40OTYtLjY3MS0uMDc1LjIxMy0uMTI2LjQzMy0uMTI2LjY3MSAwIDEuMTM0LjkyMiAyLjA1NiAyLjA1NiAyLjA1NnMyLjA1Ni0uOTIyIDIuMDU2LTIuMDU2YzAtLjQ3Ni0uMTg5LS44OTYtLjQ2Mi0xLjI0NS44MTMuMTU4IDEuNjI3LjQ3NyAyLjIyNCAxLjM5OS0uNDQzLS40NDMtLjcyNy0xLjI0OC0uNzI3LTIuMzM2bC0uMzc4LS4wMjguMzUtLjAxNGMwLTEuMDg3LjI3LTEuODkzLjcxMy0yLjMzNi0uNTc1Ljg4OS0xLjM1NCAxLjIxNi0yLjE0IDEuMzg1LjI0My0uMzM3LjQyLS43MjguNDItMS4xNzUgMC0xLjEzNC0uOTIyLTIuMDU2LTIuMDU2LTIuMDU2eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNMC0yLjgyOGwtMi44MjggMi44MjggMi44MjggMi44MjggMi44MjgtMi44MjgtMi44MjgtMi44Mjh6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSJOYU4iLz48L21hcmtlcj48bWFya2VyIG9yaWVudD0iYXV0byIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0xMCAwbDQtNC0xNCA0IDE0IDQtNC00eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PC9kZWZzPjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzA2YyIgZD0iTS41IDMuNTE4aDUuOTgydjUuOTgyaC01Ljk4MnoiLz48cGF0aCBkPSJNNC43NTUtLjE2aDUuMjM0djUuMzlsLTEuNTcxIDEuNTQ0LTEuMzEtMS4zMS0yLjcyNSAyLjcyNS0yLjY4OC0yLjY4OCAyLjgwOC0yLjgwOC0xLjMxLTEuMzF6IiBmaWxsPSIjMDZmIi8+PHBhdGggZD0iTTguOTg0Ljg0NWwuMDIyIDQuODg0LTEuODE3LTEuODE3LTIuODgxIDIuODgxLTEuMjI3LTEuMjI3IDIuODgxLTIuODgxLTEuODUtMS44NTF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+); background-image: linear-gradient(transparent,transparent),
[MediaWiki-commits] [Gerrit] Updated bits URLs in base CSS - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Updated bits URLs in base CSS .. Updated bits URLs in base CSS Change-Id: Idd30ffabbfd9e2ed5cdbab9e9921422dc440e73b --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 7 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 8574f49..67fc7de 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -283,7 +283,7 @@ } a.external { background-image: url(data:image/png;base64,iVBORw0KGgoNSUhEUgoKCAYAAACNMs+9VElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAElFTkSuQmCC); - background-image: url(//bits.wikimedia.org/static-1.24wmf12/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-03T17:31:40Z)!ie; + background-image: url(//bits.wikimedia.org/static-1.24wmf13/extensions/MobileApp/../MobileFrontend/less/content/images/external-link-ltr-icon.png?2014-07-10T15:10:00Z)!ie; /* We don't need the !ie hack because this old IE uses the fallback already */ background-image: -webkit-linear-gradient(transparent,transparent), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGRlZnM+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNLS45NTgtNC4yNTljLTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2IDAgLjM5NC4xNDMuNzM2LjMzNiAxLjA0OWwtLjA3LjA1NmMtLjM3My0uNTEzLS45NTQtLjg2Ny0xLjYzNi0uODY3LTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2cy45MjIgMi4wNTYgMi4wNTYgMi4wNTZjLjU5NiAwIDEuMTIxLS4yNjUgMS40OTYtLjY3MS0uMDc1LjIxMy0uMTI2LjQzMy0uMTI2LjY3MSAwIDEuMTM0LjkyMiAyLjA1NiAyLjA1NiAyLjA1NnMyLjA1Ni0uOTIyIDIuMDU2LTIuMDU2YzAtLjQ3Ni0uMTg5LS44OTYtLjQ2Mi0xLjI0NS44MTMuMTU4IDEuNjI3LjQ3NyAyLjIyNCAxLjM5OS0uNDQzLS40NDMtLjcyNy0xLjI0OC0uNzI3LTIuMzM2bC0uMzc4LS4wMjguMzUtLjAxNGMwLTEuMDg3LjI3LTEuODkzLjcxMy0yLjMzNi0uNTc1Ljg4OS0xLjM1NCAxLjIxNi0yLjE0IDEuMzg1LjI0My0uMzM3LjQyLS43MjguNDItMS4xNzUgMC0xLjEzNC0uOTIyLTIuMDU2LTIuMDU2LTIuMDU2eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNMC0yLjgyOGwtMi44MjggMi44MjggMi44MjggMi44MjggMi44MjgtMi44MjgtMi44MjgtMi44Mjh6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSJOYU4iLz48L21hcmtlcj48bWFya2VyIG9yaWVudD0iYXV0byIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0xMCAwbDQtNC0xNCA0IDE0IDQtNC00eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PC9kZWZzPjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzA2YyIgZD0iTS41IDMuNTE4aDUuOTgydjUuOTgyaC01Ljk4MnoiLz48cGF0aCBkPSJNNC43NTUtLjE2aDUuMjM0djUuMzlsLTEuNTcxIDEuNTQ0LTEuMzEtMS4zMS0yLjcyNSAyLjcyNS0yLjY4OC0yLjY4OCAyLjgwOC0yLjgwOC0xLjMxLTEuMzF6IiBmaWxsPSIjMDZmIi8+PHBhdGggZD0iTTguOTg0Ljg0NWwuMDIyIDQuODg0LTEuODE3LTEuODE3LTIuODgxIDIuODgxLTEuMjI3LTEuMjI3IDIuODgxLTIuODgxLTEuODUtMS44NTF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+); background-image: linear-gradient(transparent,transparent),
[MediaWiki-commits] [Gerrit] Fix for onboarding globe flicker. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for onboarding globe flicker. .. Fix for onboarding globe flicker. Also fix for restricting onboarding screen to portrait for phones. Change-Id: I6cafaddd5f83130269393b3ac1050f122acc3b9f --- M wikipedia/View Controllers/Onboarding/OnboardingViewController.m M wikipedia/View Controllers/Root/RootViewController.m 2 files changed, 38 insertions(+), 14 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m index 4bc7cc7..117d508 100644 --- a/wikipedia/View Controllers/Onboarding/OnboardingViewController.m +++ b/wikipedia/View Controllers/Onboarding/OnboardingViewController.m @@ -46,6 +46,17 @@ @implementation OnboardingViewController +- (BOOL)shouldAutorotate +{ +return YES; +} + +- (NSUInteger)supportedInterfaceOrientations +{ +return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) ? +UIInterfaceOrientationMaskPortrait : UIInterfaceOrientationMaskAll; +} + - (BOOL)prefersAlertsHidden { return YES; diff --git a/wikipedia/View Controllers/Root/RootViewController.m b/wikipedia/View Controllers/Root/RootViewController.m index 0055fb9..68323bd 100644 --- a/wikipedia/View Controllers/Root/RootViewController.m +++ b/wikipedia/View Controllers/Root/RootViewController.m @@ -28,6 +28,8 @@ @property (strong, nonatomic) UIView *splashImageBackgroundView; +@property (nonatomic) BOOL showingOnboarding; + @end @implementation RootViewController @@ -36,13 +38,17 @@ { [super viewDidLoad]; +// Need to record ShowOnboarding here because by the time it is needed in viewDidAppear it has changed already. NSNumber *showingOnboarding = [[NSUserDefaults standardUserDefaults] objectForKey:@ShowOnboarding]; -if (!showingOnboarding.boolValue) { -// Add an image view to view w globe image - center it in screen the in view -// did appear see if this view is still present, if so animate hiding it and -// remove it (and its constraints!). -[self splashImageShow]; -} +self.showingOnboarding = showingOnboarding.boolValue; + +// Add an image view to view w globe image - center it in screen the in view +// did appear see if this view is still present, if so animate hiding it and +// remove it (and its constraints!). +// (Show splash image even if onboarding to prevent flicker between time root +// view appears and time onboarding vc's view appears - it's the briefest +// interval, but noticeable) +[self splashImageShow]; } -(void)viewDidAppear:(BOOL)animated @@ -107,13 +113,7 @@ -(void)splashImageHide { -CGFloat delay = 0.6; -CGFloat duration = 0.3; - -CFTimeInterval beginTime = CACurrentMediaTime() + delay; -[CATransaction begin]; -[CATransaction setAnimationDuration:duration]; -[CATransaction setCompletionBlock:^{ +void (^completionBlock)(void) = ^{ [self.splashImage removeConstraintsOfViewFromView:self.splashImageBackgroundView]; [self.splashImage removeFromSuperview]; self.splashImage = nil; @@ -121,7 +121,20 @@ [self.splashImageBackgroundView removeConstraintsOfViewFromView:self.view]; [self.splashImageBackgroundView removeFromSuperview]; self.splashImageBackgroundView = nil; -}]; +}; + +if (self.showingOnboarding) { +completionBlock(); +return; +} + +CGFloat delay = 0.6; +CGFloat duration = 0.3; + +CFTimeInterval beginTime = CACurrentMediaTime() + delay; +[CATransaction begin]; +[CATransaction setAnimationDuration:duration]; +[CATransaction setCompletionBlock:completionBlock]; CABasicAnimation *zoom = [CABasicAnimation animationWithKeyPath:@transform]; zoom.fillMode = kCAFillModeForwards; -- To view, visit https://gerrit.wikimedia.org/r/147525 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cafaddd5f83130269393b3ac1050f122acc3b9f Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fine tuned velocity at which scroll hides menu chrome. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fine tuned velocity at which scroll hides menu chrome. .. Fine tuned velocity at which scroll hides menu chrome. Change-Id: Iee34eb610b799282f0405def3a880be30a63a60c --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 9 insertions(+), 12 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index e56d36e..be4cb1e 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1053,18 +1053,15 @@ CGFloat distanceScrolled = scrollViewDragBeganVerticalOffset_ - self.webView.scrollView.contentOffset.y; CGFloat minPixelsScrolled = 20; -// Reveal menus if scrolled to near top (100px) or if scroll velocity is a bit fast. -// Point is to avoid showing the menu if the user is *slowly* scrolling. This is how -// Safari seems to handle things. -if (self.webView.scrollView.contentOffset.y 100){ -CGPoint scrollVelocity = [self.webView.scrollView.panGestureRecognizer velocityInView:self.view]; -if (distanceScrolled 0) { -// When pulling down let things scroll a bit faster before menus reveal is triggered. -if (scrollVelocity.y 350.0f) return; -}else{ -// When pushing up set a lower scroll velocity threshold to hide menus. -if (scrollVelocity.y -150.0f) return; -} +// Reveal menus if scroll velocity is a bit fast. Point is to avoid showing the menu +// if the user is *slowly* scrolling. This is how Safari seems to handle things. +CGPoint scrollVelocity = [self.webView.scrollView.panGestureRecognizer velocityInView:self.view]; +if (distanceScrolled 0) { +// When pulling down let things scroll a bit faster before menus reveal is triggered. +if (scrollVelocity.y 350.0f) return; +}else{ +// When pushing up set a lower scroll velocity threshold to hide menus. +if (scrollVelocity.y -250.0f) return; } if (fabsf(distanceScrolled) minPixelsScrolled) return; -- To view, visit https://gerrit.wikimedia.org/r/147535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iee34eb610b799282f0405def3a880be30a63a60c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only run build script for retrieving css update on install. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Only run build script for retrieving css update on install. .. Only run build script for retrieving css update on install. Change-Id: Ib4fe258c6c96fc81537932a3cd5c740b4f7e94ef --- M Wikipedia.xcodeproj/project.pbxproj 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 47da97e..c9e92ab 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -1736,7 +1736,7 @@ /* Begin PBXShellScriptBuildPhase section */ 04272E75193FF7F000CC682F /* ShellScript */ = { isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; + buildActionMask = 8; files = ( ); inputPaths = ( @@ -1744,7 +1744,7 @@ ); outputPaths = ( ); - runOnlyForDeploymentPostprocessing = 0; + runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/bash; shellScript = scripts/make-css-assets.bash; }; -- To view, visit https://gerrit.wikimedia.org/r/147552 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4fe258c6c96fc81537932a3cd5c740b4f7e94ef Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix footer divider to extend on landscape iPad - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/147636 Change subject: Fix footer divider to extend on landscape iPad .. Fix footer divider to extend on landscape iPad Change-Id: I34e1661a5c87ab2f524e5dbc5f4d2c09b068e923 --- A wikipedia/assets/footer-divider-notch.png M wikipedia/assets/footer-divider.png M wikipedia/assets/footer.css M www/less/langbutton.less 4 files changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/36/147636/1 diff --git a/wikipedia/assets/footer-divider-notch.png b/wikipedia/assets/footer-divider-notch.png new file mode 100644 index 000..c0c0b80 --- /dev/null +++ b/wikipedia/assets/footer-divider-notch.png Binary files differ diff --git a/wikipedia/assets/footer-divider.png b/wikipedia/assets/footer-divider.png index 2d6bbae..ea0728a 100644 --- a/wikipedia/assets/footer-divider.png +++ b/wikipedia/assets/footer-divider.png Binary files differ diff --git a/wikipedia/assets/footer.css b/wikipedia/assets/footer.css index c722c8d..ea0cf10 100644 --- a/wikipedia/assets/footer.css +++ b/wikipedia/assets/footer.css @@ -5,9 +5,8 @@ width: 100%; height: 12px; border: none; - background-image: url(footer-divider.png); - background-repeat: no-repeat; - background-size: 284px 12px; + background: url(footer-divider-notch.png) no-repeat, url(footer-divider.png); + background-size: 60px 12px; margin-top: 24px; } .mw-footer-divider[dir=rtl] { diff --git a/www/less/langbutton.less b/www/less/langbutton.less index 85b7868..82c953d 100644 --- a/www/less/langbutton.less +++ b/www/less/langbutton.less @@ -7,9 +7,9 @@ height: 12px; border: none; -background-image: url(footer-divider.png); -background-repeat: no-repeat; -background-size: 284px 12px; +background: url(footer-divider-notch.png) no-repeat, +url(footer-divider.png); +background-size: 60px 12px; margin-top: 24px; } .mw-footer-divider[dir=rtl] { -- To view, visit https://gerrit.wikimedia.org/r/147636 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34e1661a5c87ab2f524e5dbc5f4d2c09b068e923 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added save button to share menu - hooked it up too. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Added save button to share menu - hooked it up too. .. Added save button to share menu - hooked it up too. Change-Id: I6bf18ac4d4a60fe76bef74e3a5de450ade3b6146 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m A wikipedia/View Controllers/Navigation/Bottom/ShareMenuSavePageActivity.h A wikipedia/View Controllers/Navigation/Bottom/ShareMenuSavePageActivity.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 6 files changed, 150 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 1b165ef..93b09ae 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 042A5B36192591520095E172 /* TopMenuTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 042A5B31192591520095E172 /* TopMenuTextField.m */; }; 042A5B37192591520095E172 /* TopMenuLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 042A5B33192591520095E172 /* TopMenuLabel.m */; }; 042A5B38192591520095E172 /* TopMenuButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 042A5B35192591520095E172 /* TopMenuButtonView.m */; }; + 042B3996192EAEEA0066B270 /* ShareMenuSavePageActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = 042B3995192EAEEA0066B270 /* ShareMenuSavePageActivity.m */; }; 0433542218A023FE009305F0 /* UIViewController+HideKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 0433542118A023FE009305F0 /* UIViewController+HideKeyboard.m */; }; 0433542618A093C5009305F0 /* UIView+RemoveConstraints.m in Sources */ = {isa = PBXBuildFile; fileRef = 0433542518A093C5009305F0 /* UIView+RemoveConstraints.m */; }; 043C668A18BE9A8E00580E9B /* PreviewWikiTextOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 043C668918BE9A8E00580E9B /* PreviewWikiTextOp.m */; }; @@ -231,6 +232,8 @@ 042A5B33192591520095E172 /* TopMenuLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopMenuLabel.m; sourceTree = group; }; 042A5B34192591520095E172 /* TopMenuButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopMenuButtonView.h; sourceTree = group; }; 042A5B35192591520095E172 /* TopMenuButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopMenuButtonView.m; sourceTree = group; }; + 042B3994192EAEEA0066B270 /* ShareMenuSavePageActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareMenuSavePageActivity.h; sourceTree = group; }; + 042B3995192EAEEA0066B270 /* ShareMenuSavePageActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShareMenuSavePageActivity.m; sourceTree = group; }; 0433542018A023FE009305F0 /* UIViewController+HideKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIViewController+HideKeyboard.h; sourceTree = group; }; 0433542118A023FE009305F0 /* UIViewController+HideKeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIViewController+HideKeyboard.m; sourceTree = group; }; 0433542418A093C5009305F0 /* UIView+RemoveConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIView+RemoveConstraints.h; sourceTree = group; }; @@ -717,6 +720,8 @@ 042A5B2B19253E690095E172 /* BottomMenuViewController.m */, 04B162EF19284A6F00B1ABC2 /* BottomMenuContainerView.h */, 04B162F019284A6F00B1ABC2 /* BottomMenuContainerView.m */, + 042B3994192EAEEA0066B270 /* ShareMenuSavePageActivity.h */, + 042B3995192EAEEA0066B270 /* ShareMenuSavePageActivity.m */, ); path = Bottom; sourceTree = group; @@ -1538,6 +1543,7 @@ 048A26701905E55B00395F53 /* PreviewChoicesMenuView.m in Sources */, 04992BC418B6971F00A6C22B /* SearchThumbUrlsOp.m in Sources */, 044BD6B618849AD000FFE4BE /* SectionEditorViewController.m in Sources */, + 042B3996192EAEEA0066B270 /* ShareMenuSavePageActivity.m in Sources */,
[MediaWiki-commits] [Gerrit] Fix for dark cancel button on sharing sheet. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for dark cancel button on sharing sheet. .. Fix for dark cancel button on sharing sheet. Change-Id: I5f9c1e5e2495c7d096790129925e398095ecf341 --- M wikipedia/AppDelegate.m 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/AppDelegate.m b/wikipedia/AppDelegate.m index 9311398..7eb6c42 100644 --- a/wikipedia/AppDelegate.m +++ b/wikipedia/AppDelegate.m @@ -97,7 +97,6 @@ // Make buttons look the same on iOS 6 7. [[UIButton appearance] setBackgroundImage:[UIImage imageNamed:@clear.png] forState:UIControlStateNormal]; [[UIButton appearance] setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled]; -[[UIButton appearance] setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; } - (void)applicationWillResignActive:(UIApplication *)application -- To view, visit https://gerrit.wikimedia.org/r/135066 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f9c1e5e2495c7d096790129925e398095ecf341 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] RTL styling fix for language button - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/135104 Change subject: RTL styling fix for language button .. RTL styling fix for language button * fix styles so padding/border are correct when in RTL * check the UI language to set proper 'dir' on the button Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87 --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/styles.css M www/less/langbutton.less 3 files changed, 51 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/04/135104/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index d4c6340..fe16032 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1342,11 +1342,15 @@ -(NSString *)renderLanguageButtonForCount:(NSInteger)count { if (count 0) { +NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0]; +MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode]; +NSString *dir = lang.dir; + NSString *aa = @span class=\mw-language-icon\Aあ/span; NSString *countStr = [NSString stringWithFormat:@span class=\mw-language-count\%d/span, (int)count]; NSString *otherLanguages = [NSString stringWithFormat:@span class=\mw-language-label\%@/span, MWLocalizedString(@language-button-other-languages, nil)]; -return [NSString stringWithFormat:@button class=\mw-language-button\span class=\mw-language-items\%@%@%@/span/button, aa, countStr, otherLanguages]; +return [NSString stringWithFormat:@button dir=\%@\ class=\mw-language-button\span class=\mw-language-items\%@%@%@/span/button, dir, aa, countStr, otherLanguages]; } else { return @; } diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 67a0dd5..92679ab 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -177,19 +177,37 @@ height: 24px; } .mw-language-icon { - text-align: right; color: white; - padding-right: 12px; - border-right: solid 1px #aaa; white-space: nowrap; font-family: AvenirNextCondensed-Medium; } -.mw-language-count { - text-align: center; +.mw-language-button[dir=ltr] .mw-language-icon { + text-align: right; + padding-right: 12px; + border-right: solid 1px #aaa; +} +.mw-language-button[dir=rtl] .mw-language-icon { + text-align: left; + border-left: solid 1px #aaa; padding-left: 12px; } +.mw-language-count { + text-align: center; +} +.mw-language-button[dir=ltr] .mw-language-count { + padding-left: 12px; +} +.mw-language-button[dir=rtl] .mw-language-count { + padding-right: 12px; +} .mw-language-label { + font-size: 10px; +} +.mw-language-button[dir=ltr] .mw-language-label { text-align: left; padding-left: 12px; - font-size: 10px; +} +.mw-language-button[dir=rtl] .mw-language-label { + text-align: right; + padding-right: 12px; } diff --git a/www/less/langbutton.less b/www/less/langbutton.less index bb205f6..5550f0b 100644 --- a/www/less/langbutton.less +++ b/www/less/langbutton.less @@ -24,22 +24,39 @@ } .mw-language-icon { - text-align: right; color: white; + white-space: nowrap; + font-family: AvenirNextCondensed-Medium; +} +.mw-language-button[dir=ltr] .mw-language-icon { + text-align: right; padding-right: 12px; border-right: solid 1px #aaa; - white-space: nowrap; - - font-family: AvenirNextCondensed-Medium; +} +.mw-language-button[dir=rtl] .mw-language-icon { + text-align: left; + border-left: solid 1px #aaa; + padding-left: 12px; } .mw-language-count { text-align: center; +} +.mw-language-button[dir=ltr] .mw-language-count { padding-left: 12px; +} +.mw-language-button[dir=rtl] .mw-language-count { + padding-right: 12px; } .mw-language-label { + font-size: 10px; +} +.mw-language-button[dir=ltr] .mw-language-label { text-align: left; padding-left: 12px; - font-size: 10px; +} +.mw-language-button[dir=rtl] .mw-language-label { + text-align: right; + padding-right: 12px; } -- To view, visit https://gerrit.wikimedia.org/r/135104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial 'last modified' marker at bottom of page - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/135118 Change subject: Initial 'last modified' marker at bottom of page .. Initial 'last modified' marker at bottom of page Currently within the web view; we may move this and the language button to native widgets attached to the end of the web view. Change-Id: Iad197228d51ceb5e9a41ec3b588b7d37ac6b608f --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/styles.css M wikipedia/en.lproj/Localizable.strings M wikipedia/mw-utils/WikipediaAppUtils.h M wikipedia/mw-utils/WikipediaAppUtils.m M wikipedia/qqq.lproj/Localizable.strings M www/Gruntfile.js A www/less/lastmod.less 8 files changed, 76 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/18/135118/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index fe16032..b7d66fc 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1271,6 +1271,8 @@ MWLanguageInfo *languageInfo = [MWLanguageInfo languageInfoForCode:article.domain]; NSNumber *langCount = article.languagecount; +NSDate *lastModified = article.lastmodified; +NSString *lastModifiedBy = article.lastmodifiedby; [self.bottomMenuViewController updateBottomBarButtonsEnabledState]; @@ -1313,6 +1315,7 @@ if ((mode != DISPLAY_LEAD_SECTION) ![[SessionSingleton sharedInstance] isCurrentArticleMain]) { [sectionTextArray addObject: [self renderLanguageButtonForCount: langCount.integerValue]]; +[sectionTextArray addObject: [self renderLastModified:lastModified by:lastModifiedBy]]; } @@ -1356,6 +1359,24 @@ } } +-(NSString *)renderLastModified:(NSDate *)date by:(NSString *)username +{ +NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0]; +MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode]; +NSString *dir = lang.dir; + +NSString *ts = [WikipediaAppUtils relativeTimestamp:date]; +NSString *lm = [MWLocalizedString(@lastmodified-timestamp, nil) stringByReplacingOccurrencesOfString:@$1 withString:ts]; +NSString *by; +if (username ![username isEqualToString:@]) { +by = [MWLocalizedString(@lastmodified-by, nil) stringByReplacingOccurrencesOfString:@$1 withString:username]; +} else { +by = MWLocalizedString(@lastmodified-anon, nil); +} + +return [NSString stringWithFormat:@div dir=\%@\ class=\mw-last-modified\%@br%@/div, dir, lm, by]; +} + #pragma mark Scroll to last section after rotate -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 92679ab..180a858 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -211,3 +211,8 @@ text-align: right; padding-right: 12px; } + +.mw-last-modified { + margin-top: 1em; + color: #27aa65; +} diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index ce78ebb..dfc04b3 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -125,3 +125,14 @@ share-menu-save-page = Save Page; share-menu-page-saved = Page Saved; + +timestamp-just-now = just now; +timestamp-minutes = %d minutes ago; +timestamp-hours = %d hours ago; +timestamp-days = %d days ago; +timestamp-months = %d months ago; +timestamp-years = %d years ago; + +lastmodified-timestamp = Last Modified $1; +lastmodified-by = by $1; +lastmodified-anon = by an anonymous user; diff --git a/wikipedia/mw-utils/WikipediaAppUtils.h b/wikipedia/mw-utils/WikipediaAppUtils.h index 91a1f72..2cd601f 100644 --- a/wikipedia/mw-utils/WikipediaAppUtils.h +++ b/wikipedia/mw-utils/WikipediaAppUtils.h @@ -11,5 +11,6 @@ +(NSString*) formFactor; +(NSString*) versionedUserAgent; +(NSString*) localizedStringForKey:(NSString *)key; ++(NSString*) relativeTimestamp:(NSDate *)date; @end diff --git a/wikipedia/mw-utils/WikipediaAppUtils.m b/wikipedia/mw-utils/WikipediaAppUtils.m index 3e609d1..7300834 100644 --- a/wikipedia/mw-utils/WikipediaAppUtils.m +++ b/wikipedia/mw-utils/WikipediaAppUtils.m @@ -62,4 +62,28 @@ } } ++(NSString *) relativeTimestamp:(NSDate *)date +{ +NSTimeInterval interval = abs([date timeIntervalSinceNow]); +double minutes = interval / 60.0; +double hours = minutes / 60.0; +double days = hours / 24.0; +double months = days / (365.25 / 12.0); +double years = months / 12.0; + +if (minutes 2.0) { +return MWLocalizedString(@timestamp-just-now, nil); +} else if (hours 2.0) { +return [NSString
[MediaWiki-commits] [Gerrit] RTL styling fix for language button - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: RTL styling fix for language button .. RTL styling fix for language button * fix styles so padding/border are correct when in RTL * check the UI language to set proper 'dir' on the button Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87 --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/styles.css M www/less/langbutton.less 3 files changed, 51 insertions(+), 12 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index d4c6340..fe16032 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1342,11 +1342,15 @@ -(NSString *)renderLanguageButtonForCount:(NSInteger)count { if (count 0) { +NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0]; +MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode]; +NSString *dir = lang.dir; + NSString *aa = @span class=\mw-language-icon\Aあ/span; NSString *countStr = [NSString stringWithFormat:@span class=\mw-language-count\%d/span, (int)count]; NSString *otherLanguages = [NSString stringWithFormat:@span class=\mw-language-label\%@/span, MWLocalizedString(@language-button-other-languages, nil)]; -return [NSString stringWithFormat:@button class=\mw-language-button\span class=\mw-language-items\%@%@%@/span/button, aa, countStr, otherLanguages]; +return [NSString stringWithFormat:@button dir=\%@\ class=\mw-language-button\span class=\mw-language-items\%@%@%@/span/button, dir, aa, countStr, otherLanguages]; } else { return @; } diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 67a0dd5..92679ab 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -177,19 +177,37 @@ height: 24px; } .mw-language-icon { - text-align: right; color: white; - padding-right: 12px; - border-right: solid 1px #aaa; white-space: nowrap; font-family: AvenirNextCondensed-Medium; } -.mw-language-count { - text-align: center; +.mw-language-button[dir=ltr] .mw-language-icon { + text-align: right; + padding-right: 12px; + border-right: solid 1px #aaa; +} +.mw-language-button[dir=rtl] .mw-language-icon { + text-align: left; + border-left: solid 1px #aaa; padding-left: 12px; } +.mw-language-count { + text-align: center; +} +.mw-language-button[dir=ltr] .mw-language-count { + padding-left: 12px; +} +.mw-language-button[dir=rtl] .mw-language-count { + padding-right: 12px; +} .mw-language-label { + font-size: 10px; +} +.mw-language-button[dir=ltr] .mw-language-label { text-align: left; padding-left: 12px; - font-size: 10px; +} +.mw-language-button[dir=rtl] .mw-language-label { + text-align: right; + padding-right: 12px; } diff --git a/www/less/langbutton.less b/www/less/langbutton.less index bb205f6..5550f0b 100644 --- a/www/less/langbutton.less +++ b/www/less/langbutton.less @@ -24,22 +24,39 @@ } .mw-language-icon { - text-align: right; color: white; + white-space: nowrap; + font-family: AvenirNextCondensed-Medium; +} +.mw-language-button[dir=ltr] .mw-language-icon { + text-align: right; padding-right: 12px; border-right: solid 1px #aaa; - white-space: nowrap; - - font-family: AvenirNextCondensed-Medium; +} +.mw-language-button[dir=rtl] .mw-language-icon { + text-align: left; + border-left: solid 1px #aaa; + padding-left: 12px; } .mw-language-count { text-align: center; +} +.mw-language-button[dir=ltr] .mw-language-count { padding-left: 12px; +} +.mw-language-button[dir=rtl] .mw-language-count { + padding-right: 12px; } .mw-language-label { + font-size: 10px; +} +.mw-language-button[dir=ltr] .mw-language-label { text-align: left; padding-left: 12px; - font-size: 10px; +} +.mw-language-button[dir=rtl] .mw-language-label { + text-align: right; + padding-right: 12px; } -- To view, visit https://gerrit.wikimedia.org/r/135104 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5271d59a7d9fd36fefeda904721fe509c5a8b87 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial 'last modified' marker at bottom of page - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Initial 'last modified' marker at bottom of page .. Initial 'last modified' marker at bottom of page Currently within the web view; we may move this and the language button to native widgets attached to the end of the web view. Change-Id: Iad197228d51ceb5e9a41ec3b588b7d37ac6b608f --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/styles.css M wikipedia/en.lproj/Localizable.strings M wikipedia/mw-utils/WikipediaAppUtils.h M wikipedia/mw-utils/WikipediaAppUtils.m M wikipedia/qqq.lproj/Localizable.strings M www/Gruntfile.js A www/less/lastmod.less 8 files changed, 76 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index fe16032..b7d66fc 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1271,6 +1271,8 @@ MWLanguageInfo *languageInfo = [MWLanguageInfo languageInfoForCode:article.domain]; NSNumber *langCount = article.languagecount; +NSDate *lastModified = article.lastmodified; +NSString *lastModifiedBy = article.lastmodifiedby; [self.bottomMenuViewController updateBottomBarButtonsEnabledState]; @@ -1313,6 +1315,7 @@ if ((mode != DISPLAY_LEAD_SECTION) ![[SessionSingleton sharedInstance] isCurrentArticleMain]) { [sectionTextArray addObject: [self renderLanguageButtonForCount: langCount.integerValue]]; +[sectionTextArray addObject: [self renderLastModified:lastModified by:lastModifiedBy]]; } @@ -1356,6 +1359,24 @@ } } +-(NSString *)renderLastModified:(NSDate *)date by:(NSString *)username +{ +NSString *langCode = [[NSLocale preferredLanguages] objectAtIndex:0]; +MWLanguageInfo *lang = [MWLanguageInfo languageInfoForCode:langCode]; +NSString *dir = lang.dir; + +NSString *ts = [WikipediaAppUtils relativeTimestamp:date]; +NSString *lm = [MWLocalizedString(@lastmodified-timestamp, nil) stringByReplacingOccurrencesOfString:@$1 withString:ts]; +NSString *by; +if (username ![username isEqualToString:@]) { +by = [MWLocalizedString(@lastmodified-by, nil) stringByReplacingOccurrencesOfString:@$1 withString:username]; +} else { +by = MWLocalizedString(@lastmodified-anon, nil); +} + +return [NSString stringWithFormat:@div dir=\%@\ class=\mw-last-modified\%@br%@/div, dir, lm, by]; +} + #pragma mark Scroll to last section after rotate -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 92679ab..180a858 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -211,3 +211,8 @@ text-align: right; padding-right: 12px; } + +.mw-last-modified { + margin-top: 1em; + color: #27aa65; +} diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index ce78ebb..dfc04b3 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -125,3 +125,14 @@ share-menu-save-page = Save Page; share-menu-page-saved = Page Saved; + +timestamp-just-now = just now; +timestamp-minutes = %d minutes ago; +timestamp-hours = %d hours ago; +timestamp-days = %d days ago; +timestamp-months = %d months ago; +timestamp-years = %d years ago; + +lastmodified-timestamp = Last Modified $1; +lastmodified-by = by $1; +lastmodified-anon = by an anonymous user; diff --git a/wikipedia/mw-utils/WikipediaAppUtils.h b/wikipedia/mw-utils/WikipediaAppUtils.h index 91a1f72..2cd601f 100644 --- a/wikipedia/mw-utils/WikipediaAppUtils.h +++ b/wikipedia/mw-utils/WikipediaAppUtils.h @@ -11,5 +11,6 @@ +(NSString*) formFactor; +(NSString*) versionedUserAgent; +(NSString*) localizedStringForKey:(NSString *)key; ++(NSString*) relativeTimestamp:(NSDate *)date; @end diff --git a/wikipedia/mw-utils/WikipediaAppUtils.m b/wikipedia/mw-utils/WikipediaAppUtils.m index 3e609d1..7300834 100644 --- a/wikipedia/mw-utils/WikipediaAppUtils.m +++ b/wikipedia/mw-utils/WikipediaAppUtils.m @@ -62,4 +62,28 @@ } } ++(NSString *) relativeTimestamp:(NSDate *)date +{ +NSTimeInterval interval = abs([date timeIntervalSinceNow]); +double minutes = interval / 60.0; +double hours = minutes / 60.0; +double days = hours / 24.0; +double months = days / (365.25 / 12.0); +double years = months / 12.0; + +if (minutes 2.0) { +return MWLocalizedString(@timestamp-just-now, nil); +} else if (hours 2.0) { +return [NSString stringWithFormat:MWLocalizedString(@timestamp-minutes, nil), (int)round(minutes)]; +}
[MediaWiki-commits] [Gerrit] Article image appears when sharing items via mail, Facebook ... - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Article image appears when sharing items via mail, Facebook etc. .. Article image appears when sharing items via mail, Facebook etc. Re-added Copy to share menu choices. Change-Id: Iac6307f19a79118ea0f9285fb8ced4abe878424a --- M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m 1 file changed, 16 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index 5ad353d..b1e3740 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -16,6 +16,7 @@ #import NSString+Extras.h #import Article+Convenience.h #import ShareMenuSavePageActivity.h +#import Article+Convenience.h typedef NS_ENUM(NSInteger, BottomMenuItemTag) { BOTTOM_MENU_BUTTON_UNKNOWN = 0, @@ -120,6 +121,7 @@ { NSString *title = @; NSURL *desktopURL = nil; +UIImage *image = nil; NSManagedObjectID *articleID = [articleDataContext_.mainContext getArticleIDForTitle: [SessionSingleton sharedInstance].currentArticleTitle @@ -129,20 +131,30 @@ if (article) { desktopURL = [article desktopURL]; title = article.title; +image = [article getThumbnailUsingContext:articleDataContext_.mainContext]; } } if (!desktopURL) { -NSLog(@Could not retrieve desktop URL for article.) +NSLog(@Could not retrieve desktop URL for article.); return; } ShareMenuSavePageActivity *shareMenuSavePageActivity = [[ShareMenuSavePageActivity alloc] init]; - + +NSMutableArray *activityItemsArray = @[title, desktopURL].mutableCopy; +if (image) { +[activityItemsArray addObject:image]; +} + UIActivityViewController *shareActivityVC = -[[UIActivityViewController alloc] initWithActivityItems: @[title, desktopURL] +[[UIActivityViewController alloc] initWithActivityItems: activityItemsArray applicationActivities: @[shareMenuSavePageActivity]]; -NSMutableArray *exclusions = @[UIActivityTypeCopyToPasteboard].mutableCopy; +NSMutableArray *exclusions = @[ +UIActivityTypePrint, +UIActivityTypeAssignToContact, +UIActivityTypeSaveToCameraRoll +].mutableCopy; if (NSFoundationVersionNumber NSFoundationVersionNumber_iOS_6_1) { [exclusions addObject:UIActivityTypeAirDrop]; -- To view, visit https://gerrit.wikimedia.org/r/135719 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac6307f19a79118ea0f9285fb8ced4abe878424a Gerrit-PatchSet: 3 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update README: converting svgs to pngs - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update README: converting svgs to pngs .. Update README: converting svgs to pngs Change-Id: I75a6f0fb66f367d5140ba4d207dbf7de632583a7 --- M README.md 1 file changed, 12 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 09c958f..77fdbe8 100644 --- a/README.md +++ b/README.md @@ -176,13 +176,22 @@ various output resolutions via a script. This rasterization is not part of the main build process, so needs to be re-run when adding new icons. +=== Setup === +Install sh python module: +* sudo easy_install sh + Ensure you have librsvg and the 'rsvg-convert' command: * On Ubuntu, run sudo apt-get install librsvg2-bin * On Mac OS X using Homebrew, run brew install librsvg -In wikipedia project subdirectory, run: -* ./convertify.bash +You also need to have ImageMagick (for flipping of icons): +* On Mac OS X using Homebrew, run brew install imagemagick -Original files from icon-sources/*.svg are rendered and copied into the res/ +=== Convert === + +Run: +* python scripts/convert-icons.py + +Original files from icon-svgs/*/*.svg are rendered and copied into the res/ subdirectories. Note that they are not automatically added to git! -- To view, visit https://gerrit.wikimedia.org/r/135805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I75a6f0fb66f367d5140ba4d207dbf7de632583a7 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND bsitzm...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not override MobileFrontend fonts - change (mediawiki...MobileApp)
Brion VIBBER has submitted this change and it was merged. Change subject: Do not override MobileFrontend fonts .. Do not override MobileFrontend fonts We could experiment with OpenSans later on, but for now, the designers want the fonts to be consistent across Mobile Web and Apps. Change-Id: I0f58910753029d9c89f5cf814177afc967237ce7 --- M less/overrides.less 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/less/overrides.less b/less/overrides.less index 8848e10..c1e3de8 100644 --- a/less/overrides.less +++ b/less/overrides.less @@ -1,5 +1,4 @@ body { - font-family: Open Sans, sans-serif; padding-top: 48px; } -- To view, visit https://gerrit.wikimedia.org/r/135941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0f58910753029d9c89f5cf814177afc967237ce7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-use Link styles from MobileFrontend - change (mediawiki...MobileApp)
Brion VIBBER has submitted this change and it was merged. Change subject: Re-use Link styles from MobileFrontend .. Re-use Link styles from MobileFrontend Change-Id: I929028190d3b445dff5d94858254914193c60109 --- M MobileApp.php A less/links.less M less/overrides.less 3 files changed, 30 insertions(+), 6 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/MobileApp.php b/MobileApp.php index d0bc7ee..eb6e9b6 100644 --- a/MobileApp.php +++ b/MobileApp.php @@ -39,7 +39,8 @@ '../MobileFrontend/less/common/reset.less', '../MobileFrontend/less/content/main.less', '../MobileFrontend/less/content/hacks.less', - 'less/overrides.less' + 'less/overrides.less', + 'less/links.less' ); $wgResourceModules['mobile.app.pagestyle'] = array( diff --git a/less/links.less b/less/links.less new file mode 100644 index 000..98c4069 --- /dev/null +++ b/less/links.less @@ -0,0 +1,28 @@ +/* Copied over from MobileFrontend. + FIXME: Remove when MobileFrontend CSS is componentized */ +@import mediawiki.mixins.less; +@import minerva.variables.less; +@import minerva.mixins.less; + +a { + text-decoration: none; + color: #002bb8; +} + +a:visited { + color: #5a3696; +} + +a:active { + color: #faa700; +} + +a:hover { + text-decoration: underline; +} + +a.new, +a.new:visited, +a.new:hover { + color: @redBase; +} diff --git a/less/overrides.less b/less/overrides.less index c1e3de8..3799435 100644 --- a/less/overrides.less +++ b/less/overrides.less @@ -1,8 +1,3 @@ body { padding-top: 48px; } - -a { - color: #347BFF; - text-decoration: none; -} -- To view, visit https://gerrit.wikimedia.org/r/135954 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I929028190d3b445dff5d94858254914193c60109 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Workaround for breakage on 'Great Eastern Highway' featured ... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/139884 Change subject: Workaround for breakage on 'Great Eastern Highway' featured article with video thumb .. Workaround for breakage on 'Great Eastern Highway' featured article with video thumb Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22 --- M WikipediaMetro/WikipediaMetroTest/js/default.js 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/win8/wikipedia refs/changes/84/139884/1 diff --git a/WikipediaMetro/WikipediaMetroTest/js/default.js b/WikipediaMetro/WikipediaMetroTest/js/default.js index 284b89c..c746d83 100644 --- a/WikipediaMetro/WikipediaMetroTest/js/default.js +++ b/WikipediaMetro/WikipediaMetroTest/js/default.js @@ -1045,7 +1045,12 @@ // Skip a link containing an image continue; } -title = extractWikiTitle($link.attr('href')); +try { +title = extractWikiTitle($link.attr('href')); +} catch (e) { +// Skip weirdly broken links +continue; +} break; } if ($imgs.length) { -- To view, visit https://gerrit.wikimedia.org/r/139884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22 Gerrit-PatchSet: 1 Gerrit-Project: apps/win8/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Workaround for breakage on 'Great Eastern Highway' featured ... - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Workaround for breakage on 'Great Eastern Highway' featured article with video thumb .. Workaround for breakage on 'Great Eastern Highway' featured article with video thumb Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22 --- M WikipediaMetro/WikipediaMetroTest/js/default.js 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/WikipediaMetro/WikipediaMetroTest/js/default.js b/WikipediaMetro/WikipediaMetroTest/js/default.js index 284b89c..c746d83 100644 --- a/WikipediaMetro/WikipediaMetroTest/js/default.js +++ b/WikipediaMetro/WikipediaMetroTest/js/default.js @@ -1045,7 +1045,12 @@ // Skip a link containing an image continue; } -title = extractWikiTitle($link.attr('href')); +try { +title = extractWikiTitle($link.attr('href')); +} catch (e) { +// Skip weirdly broken links +continue; +} break; } if ($imgs.length) { -- To view, visit https://gerrit.wikimedia.org/r/139884 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6bcee0eb9e73ec53d22fedec998ac3520af5fc22 Gerrit-PatchSet: 1 Gerrit-Project: apps/win8/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump internal app version to 1.1.0.36 - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/139892 Change subject: Bump internal app version to 1.1.0.36 .. Bump internal app version to 1.1.0.36 Change-Id: Ieb415d8efb29599d35890037cde28113be645f62 --- M WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml M WikipediaMetro/WikipediaMetroTest/package.appxmanifest 2 files changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/win8/wikipedia refs/changes/92/139892/1 diff --git a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml index 1f21adc..f98b415 100644 --- a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml +++ b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml @@ -1,7 +1,6 @@ ?xml version=1.0 encoding=utf-8? StoreAssociation xmlns=http://schemas.microsoft.com/appx/2010/storeassociation; PublisherCN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5/Publisher - NamespacePrefixWikimediaFoundation/NamespacePrefix PublisherDisplayNameWikimedia Foundation/PublisherDisplayName GeneratePackageHashhttp://www.w3.org/2001/04/xmlenc#sha256/GeneratePackageHash SupportedLocales @@ -367,17 +366,17 @@ PackageInfo OsMinVersion6.3.0.0/OsMinVersion PackageArchitectureNeutral/PackageArchitecture -PackageMaxArchitectureVersion1.1.0.34/PackageMaxArchitectureVersion +PackageMaxArchitectureVersion1.1.0.35/PackageMaxArchitectureVersion /PackageInfo PackageInfo OsMinVersion6.3.0.0/OsMinVersion PackageArchitectureNeutral/PackageArchitecture -PackageMaxArchitectureVersion1.1.0.34/PackageMaxArchitectureVersion +PackageMaxArchitectureVersion1.1.0.35/PackageMaxArchitectureVersion /PackageInfo PackageInfo OsMinVersion6.3.0.0/OsMinVersion PackageArchitectureNeutral/PackageArchitecture -PackageMaxArchitectureVersion1.1.0.34/PackageMaxArchitectureVersion +PackageMaxArchitectureVersion1.1.0.35/PackageMaxArchitectureVersion /PackageInfo /BundleInfo /PackageInfoList diff --git a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest index 20aba09..ce5f3c4 100644 --- a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest +++ b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest @@ -1,6 +1,6 @@ ?xml version=1.0 encoding=utf-8? Package xmlns=http://schemas.microsoft.com/appx/2010/manifest; xmlns:m2=http://schemas.microsoft.com/appx/2013/manifest; - Identity Name=WikimediaFoundation.Wikipedia Version=1.1.0.35 Publisher=CN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5 / + Identity Name=WikimediaFoundation.Wikipedia Version=1.1.0.36 Publisher=CN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5 / Properties DisplayNameWikipedia/DisplayName PublisherDisplayNameWikimedia Foundation/PublisherDisplayName -- To view, visit https://gerrit.wikimedia.org/r/139892 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb415d8efb29599d35890037cde28113be645f62 Gerrit-PatchSet: 1 Gerrit-Project: apps/win8/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump internal app version to 1.1.0.36 - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Bump internal app version to 1.1.0.36 .. Bump internal app version to 1.1.0.36 Change-Id: Ieb415d8efb29599d35890037cde28113be645f62 --- M WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml M WikipediaMetro/WikipediaMetroTest/package.appxmanifest 2 files changed, 4 insertions(+), 5 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml index 1f21adc..f98b415 100644 --- a/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml +++ b/WikipediaMetro/WikipediaMetroTest/Package.StoreAssociation.xml @@ -1,7 +1,6 @@ ?xml version=1.0 encoding=utf-8? StoreAssociation xmlns=http://schemas.microsoft.com/appx/2010/storeassociation; PublisherCN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5/Publisher - NamespacePrefixWikimediaFoundation/NamespacePrefix PublisherDisplayNameWikimedia Foundation/PublisherDisplayName GeneratePackageHashhttp://www.w3.org/2001/04/xmlenc#sha256/GeneratePackageHash SupportedLocales @@ -367,17 +366,17 @@ PackageInfo OsMinVersion6.3.0.0/OsMinVersion PackageArchitectureNeutral/PackageArchitecture -PackageMaxArchitectureVersion1.1.0.34/PackageMaxArchitectureVersion +PackageMaxArchitectureVersion1.1.0.35/PackageMaxArchitectureVersion /PackageInfo PackageInfo OsMinVersion6.3.0.0/OsMinVersion PackageArchitectureNeutral/PackageArchitecture -PackageMaxArchitectureVersion1.1.0.34/PackageMaxArchitectureVersion +PackageMaxArchitectureVersion1.1.0.35/PackageMaxArchitectureVersion /PackageInfo PackageInfo OsMinVersion6.3.0.0/OsMinVersion PackageArchitectureNeutral/PackageArchitecture -PackageMaxArchitectureVersion1.1.0.34/PackageMaxArchitectureVersion +PackageMaxArchitectureVersion1.1.0.35/PackageMaxArchitectureVersion /PackageInfo /BundleInfo /PackageInfoList diff --git a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest index 20aba09..ce5f3c4 100644 --- a/WikipediaMetro/WikipediaMetroTest/package.appxmanifest +++ b/WikipediaMetro/WikipediaMetroTest/package.appxmanifest @@ -1,6 +1,6 @@ ?xml version=1.0 encoding=utf-8? Package xmlns=http://schemas.microsoft.com/appx/2010/manifest; xmlns:m2=http://schemas.microsoft.com/appx/2013/manifest; - Identity Name=WikimediaFoundation.Wikipedia Version=1.1.0.35 Publisher=CN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5 / + Identity Name=WikimediaFoundation.Wikipedia Version=1.1.0.36 Publisher=CN=2180B9A4-DDFD-4BFD-8D7E-EADC9C394EF5 / Properties DisplayNameWikipedia/DisplayName PublisherDisplayNameWikimedia Foundation/PublisherDisplayName -- To view, visit https://gerrit.wikimedia.org/r/139892 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieb415d8efb29599d35890037cde28113be645f62 Gerrit-PatchSet: 1 Gerrit-Project: apps/win8/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial 'garbage collection' of unused cached images when cl... - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Initial 'garbage collection' of unused cached images when cleaning history .. Initial 'garbage collection' of unused cached images when cleaning history Images linked from sections were saved into the database, but not deleted automatically when their section was removed because they might be used in multiple articles. Adds a convenience method [image deleteIfUnused] to kill out the old images if still unused after the cascading deletes remove the sections. Change-Id: I6755ec0490e16d1d46fbb34e61c4d947858989a1 --- M wikipedia/Categories/Image+Convenience.h M wikipedia/Categories/Image+Convenience.m M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 6 files changed, 43 insertions(+), 8 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/Image+Convenience.h b/wikipedia/Categories/Image+Convenience.h index 4a40cef..b484dcb 100644 --- a/wikipedia/Categories/Image+Convenience.h +++ b/wikipedia/Categories/Image+Convenience.h @@ -8,4 +8,10 @@ // Retrieves the highest resolution image in the core data store with same name as this image. -(Image *)getHighestResolutionImageWithSameNameUsingContext:(NSManagedObjectContext *)context; +/** + * Check if this image is still in use, and if not remove it and its backing data. + * You'll still have to actually save updates on the managed object context! + */ +-(void)deleteIfUnused; + @end diff --git a/wikipedia/Categories/Image+Convenience.m b/wikipedia/Categories/Image+Convenience.m index 48ab314..4109ac4 100644 --- a/wikipedia/Categories/Image+Convenience.m +++ b/wikipedia/Categories/Image+Convenience.m @@ -28,4 +28,14 @@ return (images.count == 1) ? images[0] : self; } +-(void)deleteIfUnused +{ +int count = (int)self.sectionImage.count; +NSLog(@section image = %@ is referenced by %d sections, self.fileName, count); +if (count 1) { +NSLog(@deleting unused image %@, self.fileName); +[self.managedObjectContext deleteObject:self]; +} +} + @end diff --git a/wikipedia/View Controllers/History/HistoryViewController.m b/wikipedia/View Controllers/History/HistoryViewController.m index 0aede61..ffdc30f 100644 --- a/wikipedia/View Controllers/History/HistoryViewController.m +++ b/wikipedia/View Controllers/History/HistoryViewController.m @@ -18,6 +18,7 @@ #import TopMenuContainerView.h #import TopMenuViewController.h #import UIViewController+StatusBarHeight.h +#import Image+Convenience.h #define HISTORY_THUMBNAIL_WIDTH 110 #define HISTORY_RESULT_HEIGHT 66 @@ -201,7 +202,6 @@ history.article.thumbnailImage.fileName ); */ - if ([history.dateVisited isToday]) { [today addObject:history.objectID]; }else if ([history.dateVisited isYesterday]) { @@ -255,6 +255,7 @@ //NSLog(@GARBAGE COUNT = %lu, (unsigned long)garbage.count); //NSLog(@GARBAGE = %@, garbage); if (garbage.count == 0) return; +NSMutableArray *imagesToCollect = [[NSMutableArray alloc] init]; [articleDataContext_.mainContext performBlockAndWait:^(){ for (NSManagedObjectID *historyID in garbage) { @@ -271,16 +272,34 @@ // Article deletes don't cascade to images (intentionally) so delete these manually. if (thumb) [articleDataContext_.mainContext deleteObject:thumb]; - -//TODO: add code for deleting images which were only referenced by this article + +if (article) { +// Section images might be used in multiple articles, so list them up +// and kill them only after we've cleaned up the sections and can confirm +// they are no longer used... +for (Section *section in article.section) { +for (SectionImage *sectionImage in section.sectionImage) { +Image *image = sectionImage.image; +[imagesToCollect addObject:image]; +} +} +} // Delete the article if (article) [articleDataContext_.mainContext deleteObject:article]; - } + NSError *error = nil; [articleDataContext_.mainContext save:error]; -if (error) NSLog(@GARBAGE error = %@, error); +if (error) NSLog(@GARBAGE pass 1 error = %@, error); + +// Now clean up the images that aren't used in remaining pages +for (Image *image in imagesToCollect) { +[image deleteIfUnused]; +} +// and save again... +[articleDataContext_.mainContext save:error]; +if (error) NSLog(@GARBAGE pass 2 error = %@, error); }]; } diff --git a/wikipedia/assets/abusefilter.css
[MediaWiki-commits] [Gerrit] Fix for other placeholder text clipping. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for other placeholder text clipping. .. Fix for other placeholder text clipping. Change-Id: I6591b8cc9b6f72598921affc5889d7baed4c57c2 --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/View Controllers/EditSummary/EditSummaryViewController.m 2 files changed, 23 insertions(+), 17 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard b/wikipedia/Base.lproj/Main_iPhone.storyboard index 50fe4cb..02f7337 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1381,6 +1381,13 @@ fontDescription key=fontDescription type=system pointSize=16/ textInputTraits key=textInputTraits/ /textField +label opaque=NO clipsSubviews=YES userInteractionEnabled=NO alpha=0.74978 contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Label lineBreakMode=tailTruncation baselineAdjustment=alignBaselines minimumScaleFactor=0.25006 adjustsLetterSpacingToFitWidth=YES translatesAutoresizingMaskIntoConstraints=NO id=XkB-Xo-Xq0 userLabel=Autofit placeholder label +rect key=frame x=28 y=27 width=272 height=40/ +autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ +fontDescription key=fontDescription type=system pointSize=16/ +color key=textColor white=0.40002 alpha=1 colorSpace=calibratedWhite/ +nil key=highlightedColor/ +/label view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=Ub0-Zs-IUe userLabel=Horizontal Line rect key=frame x=0.0 y=94 width=320 height=1/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ @@ -1392,16 +1399,21 @@ /subviews color key=backgroundColor white=1 alpha=1 colorSpace=custom customColorSpace=calibratedWhite/ constraints +constraint firstItem=zbB-Ch-Nmn firstAttribute=leading secondItem=XkB-Xo-Xq0 secondAttribute=leading constant=-8 id=7nx-9C-TuI/ +constraint firstItem=zbB-Ch-Nmn firstAttribute=top secondItem=XkB-Xo-Xq0 secondAttribute=top id=Ccm-9a-shU/ constraint firstItem=zbB-Ch-Nmn firstAttribute=leading secondItem=fDF-LW-sbk secondAttribute=leading constant=20 symbolic=YES id=DDL-Qp-VzY/ constraint firstItem=Ub0-Zs-IUe firstAttribute=leading secondItem=fDF-LW-sbk secondAttribute=leading id=Ijy-t7-Wqd/ constraint firstItem=Ub0-Zs-IUe firstAttribute=top secondItem=zbB-Ch-Nmn secondAttribute=bottom constant=27 id=SRP-0O-Du6/ constraint firstAttribute=trailing secondItem=Ub0-Zs-IUe secondAttribute=trailing id=U9z-3z-BFi/ constraint firstItem=zbB-Ch-Nmn firstAttribute=top secondItem=NGG-Fq-knG secondAttribute=bottom constant=27 id=kYA-bA-BLI/ +constraint firstItem=zbB-Ch-Nmn firstAttribute=bottom secondItem=XkB-Xo-Xq0 secondAttribute=bottom id=lzE-ZA-GLa/ constraint firstAttribute=trailing secondItem=zbB-Ch-Nmn secondAttribute=trailing constant=20 symbolic=YES id=o7I-HE-nM6/ +constraint firstItem=zbB-Ch-Nmn firstAttribute=trailing secondItem=XkB-Xo-Xq0 secondAttribute=trailing id=yu9-O7-vx0/ /constraints /view connections outlet property=bottomLineHeightConstraint destination=Xx4-4t-Xde id=Gc9-c3-JVo/ +outlet property=placeholderLabel destination=XkB-Xo-Xq0 id=HKw-dG-tTT/ outlet property=summaryTextField destination=zbB-Ch-Nmn id=4Ju-Yr-tC6/ /connections /viewController diff --git a/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m b/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m index 11fe53a..2f1bd2b 100644 --- a/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m +++ b/wikipedia/View Controllers/EditSummary/EditSummaryViewController.m @@ -16,6 +16,8 @@ @property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomLineHeightConstraint; +@property (weak, nonatomic) IBOutlet UILabel *placeholderLabel; + @end @implementation EditSummaryViewController @@ -35,8 +37,7
[MediaWiki-commits] [Gerrit] Periodically remove old / unused article and associated data. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Periodically remove old / unused article and associated data. .. Periodically remove old / unused article and associated data. Change-Id: I82711860b0017f95d250e86d7a3a2e0b4b0bc5ac --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m M wikipedia/Categories/Article+Convenience.h M wikipedia/Categories/Article+Convenience.m A wikipedia/Housekeeping/CoreDataHousekeeping.h A wikipedia/Housekeeping/CoreDataHousekeeping.m M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 8 files changed, 201 insertions(+), 25 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index e1f4ac3..2b503ed 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -81,6 +81,7 @@ 048A26771906268100395F53 /* PaddedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 048A26761906268100395F53 /* PaddedLabel.m */; }; 0493C2D419526A0100EBB973 /* WikiFont-Glyphs.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0493C2D319526A0100EBB973 /* WikiFont-Glyphs.ttf */; }; 0493C2D619526FFE00EBB973 /* WikiFont-Glyphs-iOS.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0493C2D519526FFE00EBB973 /* WikiFont-Glyphs-iOS.ttf */; }; + 0493C2CC1952373100EBB973 /* CoreDataHousekeeping.m in Sources */ = {isa = PBXBuildFile; fileRef = 0493C2CB1952373100EBB973 /* CoreDataHousekeeping.m */; }; 049566C218F5F4CB0058EA12 /* ZeroConfigState.m in Sources */ = {isa = PBXBuildFile; fileRef = 049566C118F5F4CB0058EA12 /* ZeroConfigState.m */; }; 04992BC018B687AF00A6C22B /* SearchOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 04992BBF18B687AF00A6C22B /* SearchOp.m */; }; 04992BC418B6971F00A6C22B /* SearchThumbUrlsOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 04992BC318B6971F00A6C22B /* SearchThumbUrlsOp.m */; }; @@ -319,6 +320,8 @@ 0493C2D219525F8E00EBB973 /* WikiGlyph_Chars_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WikiGlyph_Chars_iOS.h; sourceTree = group; }; 0493C2D319526A0100EBB973 /* WikiFont-Glyphs.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = WikiFont-Glyphs.ttf; sourceTree = group; }; 0493C2D519526FFE00EBB973 /* WikiFont-Glyphs-iOS.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = WikiFont-Glyphs-iOS.ttf; sourceTree = group; }; + 0493C2CA1952373100EBB973 /* CoreDataHousekeeping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreDataHousekeeping.h; sourceTree = group; }; + 0493C2CB1952373100EBB973 /* CoreDataHousekeeping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreDataHousekeeping.m; sourceTree = group; }; 049566C018F5F4CB0058EA12 /* ZeroConfigState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZeroConfigState.h; sourceTree = group; }; 049566C118F5F4CB0058EA12 /* ZeroConfigState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZeroConfigState.m; sourceTree = group; }; 04992BBE18B687AF00A6C22B /* SearchOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchOp.h; sourceTree = group; }; @@ -920,6 +923,15 @@ path = PaddedLabel; sourceTree = group; }; + 0493C2C91952373100EBB973 /* Housekeeping */ = { + isa = PBXGroup; + children = ( + 0493C2CA1952373100EBB973 /* CoreDataHousekeeping.h */, + 0493C2CB1952373100EBB973 /* CoreDataHousekeeping.m */, + ); + path = Housekeeping; + sourceTree = group; + }; 049566BF18F5F4CB0058EA12 /* Zero */ = { isa = PBXGroup; children = ( @@ -1372,6 +1384,7 @@ D4B0ADFF19365F4600F0AC90 /* EventLogging */, 0442F57C1900718600F55DF9 /* Fonts */, 04D34DA31863D2D600610A87 /* HTML Parsing */, + 0493C2C91952373100EBB973 /* Housekeeping */, 0466F44C183A30CC00EA1FD7 /* Images */, 0463639518A844380049EE4F /* Keychain */,
[MediaWiki-commits] [Gerrit] Slight increase to canned edit summary button height. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Slight increase to canned edit summary button height. .. Slight increase to canned edit summary button height. Deleted cruft font. Progressive text buttons bold text per Jared. Change-Id: Id15670a702cda22fb87167ac6305ece206a26d8d --- D wikipedia/Fonts/WikiFont-iOS.ttf M wikipedia/MenuButton/MenuButton.h M wikipedia/MenuButton/MenuButton.m M wikipedia/MenuLabel/MenuLabel.h M wikipedia/MenuLabel/MenuLabel.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m 7 files changed, 34 insertions(+), 13 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Fonts/WikiFont-iOS.ttf b/wikipedia/Fonts/WikiFont-iOS.ttf deleted file mode 100644 index 7510ba9..000 --- a/wikipedia/Fonts/WikiFont-iOS.ttf +++ /dev/null Binary files differ diff --git a/wikipedia/MenuButton/MenuButton.h b/wikipedia/MenuButton/MenuButton.h index fff2a59..a75b9b8 100755 --- a/wikipedia/MenuButton/MenuButton.h +++ b/wikipedia/MenuButton/MenuButton.h @@ -9,6 +9,7 @@ - (instancetype)initWithText: (NSString *)text fontSize: (CGFloat)size +bold: (BOOL)bold color: (UIColor *)color padding: (UIEdgeInsets)padding margin: (UIEdgeInsets)margin; diff --git a/wikipedia/MenuButton/MenuButton.m b/wikipedia/MenuButton/MenuButton.m index 8ecd1f2..f24e407 100755 --- a/wikipedia/MenuButton/MenuButton.m +++ b/wikipedia/MenuButton/MenuButton.m @@ -17,6 +17,8 @@ @property (nonatomic) CGFloat fontSize; +@property (nonatomic) BOOL fontBold; + @property (nonatomic) UIEdgeInsets padding; @property (nonatomic) UIEdgeInsets margin; @@ -27,16 +29,17 @@ - (instancetype)initWithCoder:(NSCoder *)coder { -return [self initWithText:@ fontSize:16 color:[UIColor blackColor] padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero]; +return [self initWithText:@ fontSize:16 bold:NO color:[UIColor blackColor] padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero]; } - (instancetype)init { -return [self initWithText:@ fontSize:16 color:[UIColor blackColor] padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero]; +return [self initWithText:@ fontSize:16 bold:NO color:[UIColor blackColor] padding:UIEdgeInsetsZero margin:UIEdgeInsetsZero]; } - (instancetype)initWithText: (NSString *)text fontSize: (CGFloat)size +bold: (BOOL)bold color: (UIColor *)color padding: (UIEdgeInsets)padding margin: (UIEdgeInsets)margin @@ -49,7 +52,8 @@ self.text = text; self.enabled = NO; self.clipsToBounds = YES; -self.label = [[MenuLabel alloc] initWithText:text fontSize:size color:color padding:padding]; +self.fontBold = bold; +self.label = [[MenuLabel alloc] initWithText:text fontSize:size bold:bold color:color padding:padding]; self.color = color; self.oldColor = color; [self addSubview:self.label]; diff --git a/wikipedia/MenuLabel/MenuLabel.h b/wikipedia/MenuLabel/MenuLabel.h index cea051b..072f9ea 100755 --- a/wikipedia/MenuLabel/MenuLabel.h +++ b/wikipedia/MenuLabel/MenuLabel.h @@ -7,6 +7,7 @@ - (instancetype)initWithText: (NSString *)text fontSize: (CGFloat)size +bold: (BOOL)bold color: (UIColor *)color padding: (UIEdgeInsets)padding; diff --git a/wikipedia/MenuLabel/MenuLabel.m b/wikipedia/MenuLabel/MenuLabel.m index 7a4d264..e008d52 100755 --- a/wikipedia/MenuLabel/MenuLabel.m +++ b/wikipedia/MenuLabel/MenuLabel.m @@ -11,6 +11,8 @@ @property (nonatomic) CGFloat fontSize; +@property (nonatomic) BOOL fontBold; + @property (nonatomic) UIEdgeInsets padding; @end @@ -19,16 +21,17 @@ - (instancetype)init { -return [self initWithText:@ fontSize:16 color:[UIColor blackColor] padding:UIEdgeInsetsZero]; +return [self initWithText:@ fontSize:16 bold:NO color:[UIColor blackColor] padding:UIEdgeInsetsZero]; } - (instancetype)initWithCoder:(NSCoder *)coder { -return [self initWithText:@ fontSize:16 color:[UIColor blackColor] padding:UIEdgeInsetsZero]; +return [self initWithText:@ fontSize:16 bold:NO color:[UIColor blackColor] padding:UIEdgeInsetsZero]; } - (instancetype)initWithText: (NSString *)text fontSize: (CGFloat)size +bold: (BOOL)bold color: (UIColor *)color padding: (UIEdgeInsets)padding { @@ -36,6 +39,7 @@ if (self) { self.translatesAutoresizingMaskIntoConstraints = NO; self.padding = padding; +self.fontBold = bold; self.color =
[MediaWiki-commits] [Gerrit] Made login use back arrow if presented in editing workflow. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Made login use back arrow if presented in editing workflow. .. Made login use back arrow if presented in editing workflow. Account creation uses back arrow if presented in login workflow. Save and login workflows now use new check button styling from mockups. Change-Id: I9e404f68c3754926d38cb860ecd2fd7b9a3d3f74 --- M wikipedia/MenuLabel/MenuLabel.m M wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m M wikipedia/View Controllers/Login/LoginViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 6 files changed, 62 insertions(+), 31 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/MenuLabel/MenuLabel.m b/wikipedia/MenuLabel/MenuLabel.m index e008d52..1c41045 100755 --- a/wikipedia/MenuLabel/MenuLabel.m +++ b/wikipedia/MenuLabel/MenuLabel.m @@ -2,6 +2,7 @@ // Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! #import MenuLabel.h +#import WikiGlyph_Chars.h @interface MenuLabel () @@ -64,12 +65,24 @@ -(void)setText:(NSString *)text { UIFont *font = (self.fontBold) ? [UIFont boldSystemFontOfSize:self.fontSize] : [UIFont systemFontOfSize:self.fontSize]; -NSDictionary *attributes = + +NSMutableDictionary *attributes = @{ NSFontAttributeName: font, NSForegroundColorAttributeName : self.color - }; - + }.mutableCopy; + +// Quick hack to allow WikiGlyph check character buttons. +// (Would be nice to have a isWikiGlyph function which would determine if a +// single character string was a WikiGlyph rather than using isEqualToString.) +if ([text isEqualToString:WIKIGLYPH_TICK]) { +self.adjustsFontSizeToFitWidth = NO; +attributes[NSFontAttributeName] = [UIFont fontWithName:@WikiFont-Glyphs size:self.fontSize]; +NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; +paragraphStyle.alignment = NSTextAlignmentCenter; +attributes[NSParagraphStyleAttributeName] = paragraphStyle; +} + self.attributedText = [[NSAttributedString alloc] initWithString: text attributes: attributes]; diff --git a/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m b/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m index 718eb99..6c1dea2 100644 --- a/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m +++ b/wikipedia/View Controllers/AccountCreation/AccountCreationViewController.m @@ -115,10 +115,7 @@ -(void)highlightCheckButton:(BOOL)highlight { WikiGlyphButton *checkButton = (WikiGlyphButton *)[ROOT.topMenuViewController getNavBarItem:NAVBAR_BUTTON_CHECK]; - -checkButton.backgroundColor = highlight ? WMF_COLOR_BLUE : [UIColor clearColor]; - -checkButton.color = highlight ? [UIColor whiteColor] : [UIColor blackColor]; +checkButton.enabled = highlight; } -(void)prepopulateTextFieldsForDebugging @@ -137,6 +134,8 @@ ROOT.topMenuViewController.navBarMode = NAVBAR_MODE_DEFAULT; [self highlightCheckButton:NO]; + +[self showAlert:@]; [super viewWillDisappear:animated]; } @@ -251,6 +250,7 @@ case NAVBAR_BUTTON_CHECK: [self save]; break; +case NAVBAR_BUTTON_X: case NAVBAR_BUTTON_ARROW_LEFT: [self hide]; break; diff --git a/wikipedia/View Controllers/Login/LoginViewController.m b/wikipedia/View Controllers/Login/LoginViewController.m index b25620a..cc123b9 100644 --- a/wikipedia/View Controllers/Login/LoginViewController.m +++ b/wikipedia/View Controllers/Login/LoginViewController.m @@ -79,10 +79,7 @@ -(void)highlightCheckButton:(BOOL)highlight { WikiGlyphButton *checkButton = (WikiGlyphButton *)[ROOT.topMenuViewController getNavBarItem:NAVBAR_BUTTON_CHECK]; - -checkButton.backgroundColor = highlight ? WMF_COLOR_GREEN : [UIColor clearColor]; - -checkButton.color = highlight ? [UIColor whiteColor] : [UIColor blackColor]; +checkButton.enabled = highlight; } // Handle nav bar taps. diff --git a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m index 1fac254..defc03e 100644 --- a/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m @@ -36,6 +36,7 @@ #import UIViewController+StatusBarHeight.h #import MenuButton.h +#import LoginViewController.h @interface TopMenuViewController (){ @@ -46,7 +47,6 @@ @property (strong,
[MediaWiki-commits] [Gerrit] Update to CSS - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141270 Change subject: Update to CSS .. Update to CSS Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c --- M wikipedia/assets/abusefilter.css M wikipedia/assets/preview.css M wikipedia/assets/styles.css 3 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/70/141270/1 diff --git a/wikipedia/assets/abusefilter.css b/wikipedia/assets/abusefilter.css index 89b5850..8ddf0bf 100644 --- a/wikipedia/assets/abusefilter.css +++ b/wikipedia/assets/abusefilter.css @@ -94,6 +94,11 @@ -webkit-box-sizing: border-box; box-sizing: border-box; } +div#centralNotice { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} button { border: none; background-color: transparent; diff --git a/wikipedia/assets/preview.css b/wikipedia/assets/preview.css index d792df7..cadde49 100644 --- a/wikipedia/assets/preview.css +++ b/wikipedia/assets/preview.css @@ -94,6 +94,11 @@ -webkit-box-sizing: border-box; box-sizing: border-box; } +div#centralNotice { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} button { border: none; background-color: transparent; diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 89b5850..8ddf0bf 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -94,6 +94,11 @@ -webkit-box-sizing: border-box; box-sizing: border-box; } +div#centralNotice { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} button { border: none; background-color: transparent; -- To view, visit https://gerrit.wikimedia.org/r/141270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5a6d3e45fae45dc21d34b45d67f669854ab910c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup some integer type conversion warnings - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/141271 Change subject: Cleanup some integer type conversion warnings .. Cleanup some integer type conversion warnings * NSInteger is 'int' on 32-bit and 'long' on 64-bit, so there were some fun warnings about usage in formatting strings where %d was being used when building for 64-bit device * Some warnings about enum types Change-Id: I4bea97dc4b80e44ed63336132100ce4440658e0c --- M wikipedia/Categories/NSString+Extras.m M wikipedia/Categories/NSString+FormattedAttributedString.m M wikipedia/Categories/Section+DisplayHtml.m M wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/View Controllers/WebView/WebViewController.m 6 files changed, 18 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/71/141271/1 diff --git a/wikipedia/Categories/NSString+Extras.m b/wikipedia/Categories/NSString+Extras.m index 74fc208..c1c5ed0 100644 --- a/wikipedia/Categories/NSString+Extras.m +++ b/wikipedia/Categories/NSString+Extras.m @@ -23,7 +23,7 @@ } uint8_t digest[CC_SHA1_DIGEST_LENGTH]; -CC_SHA1(data.bytes, data.length, digest); +CC_SHA1(data.bytes, (unsigned int)data.length, digest); NSMutableString *output = [NSMutableString stringWithCapacity:CC_SHA1_DIGEST_LENGTH * 2]; for (int i = 0; i CC_SHA1_DIGEST_LENGTH; i++) diff --git a/wikipedia/Categories/NSString+FormattedAttributedString.m b/wikipedia/Categories/NSString+FormattedAttributedString.m index cc320ea..6093dd6 100644 --- a/wikipedia/Categories/NSString+FormattedAttributedString.m +++ b/wikipedia/Categories/NSString+FormattedAttributedString.m @@ -15,7 +15,7 @@ for (NSUInteger i = 0; i substitutionStrings.count; i++) { NSRegularExpression *regex = -[NSRegularExpression regularExpressionWithPattern: [NSString stringWithFormat:@\\$%d+, i + 1] +[NSRegularExpression regularExpressionWithPattern: [NSString stringWithFormat:@\\$%lu+, (unsigned long)i + 1] options: 0 error: nil]; NSArray *matches = diff --git a/wikipedia/Categories/Section+DisplayHtml.m b/wikipedia/Categories/Section+DisplayHtml.m index 854963a..318b1e7 100644 --- a/wikipedia/Categories/Section+DisplayHtml.m +++ b/wikipedia/Categories/Section+DisplayHtml.m @@ -13,16 +13,16 @@ return [NSString stringWithFormat:@\ -div id=\section_heading_and_content_block_%d\\ +div id=\section_heading_and_content_block_%ld\\ %@\ -div id=\content_block_%d\\ +div id=\content_block_%ld\\ %@\ /div\ /div\ , - self.sectionId.integerValue, + (long)self.sectionId.integerValue, (isMainPage ? @ : [self getHeaderTag:isMainPage]), - self.sectionId.integerValue, + (long)self.sectionId.integerValue, self.html ]; } @@ -39,17 +39,17 @@ return [NSString stringWithFormat:@\ -h%d class=\section_heading\ data-id=\%d\ id=\%@\\ +h%ld class=\section_heading\ data-id=\%ld\ id=\%@\\ %@\ %@\ -/h%d\ +/h%ld\ , -headingTagSize, -self.sectionId.integerValue, +(long)headingTagSize, +(long)self.sectionId.integerValue, self.anchor, title, pencilAnchor, -headingTagSize +(long)headingTagSize ]; } @@ -78,8 +78,8 @@ -(NSString *)getEditPencilAnchor { return [NSString stringWithFormat: -@a class=\edit_section_button\ data-action=\edit_section\ data-id=\%d\/a, -self.sectionId.integerValue]; +@a class=\edit_section_button\ data-action=\edit_section\ data-id=\%ld\/a, +(long)self.sectionId.integerValue]; } @end diff --git a/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m b/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m index 124c413..9e2862b 100644 --- a/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m +++ b/wikipedia/View Controllers/ModalOverlay/ModalContentViewController.m @@ -64,7 +64,7 @@ [invocation invoke]; NSUInteger destNavBarMode; [invocation getReturnValue:destNavBarMode]; -self.navBarMode = destNavBarMode; +self.navBarMode = (NavBarMode)destNavBarMode; } selector = NSSelectorFromString(@navBarStyle); @@ -76,7 +76,7 @@ [invocation invoke]; NSUInteger destNavBarStyle; [invocation getReturnValue:destNavBarStyle]; -self.navBarStyle = destNavBarStyle; +self.navBarStyle = (NavBarStyle)destNavBarStyle; } } diff --git a/wikipedia/View
[MediaWiki-commits] [Gerrit] Ensure MCC/MNC enrichment for sampling only happens on mdot ... - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Ensure MCC/MNC enrichment for sampling only happens on mdot API. .. Ensure MCC/MNC enrichment for sampling only happens on mdot API. * bits was being hit first. * Without this change, MCC/MNC would be sent, but not observed server-side. Change-Id: I4172eb892daffd0148fcbbc3923c4fe8b54669e1 --- M wikipedia/Categories/NSURLRequest+DictionaryRequest.m 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m index cd285f4..44bf5e5 100644 --- a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m +++ b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m @@ -62,7 +62,10 @@ +(void) addMCCMNCToRequestIfAppropriate: (NSMutableURLRequest*) req { -if ([SessionSingleton sharedInstance].zeroConfigState.sentMCCMNC) { +/* MCC-MNC logging is only turned with an API hook */ +if ([SessionSingleton sharedInstance].zeroConfigState.sentMCCMNC || +[req.URL.host rangeOfString:@.m.wikipedia.org].location == NSNotFound || +[req.URL.relativePath rangeOfString:@/w/api.php].location == NSNotFound) { return; } else { CTCarrier *mno = [[[CTTelephonyNetworkInfo alloc] init] subscriberCellularProvider]; -- To view, visit https://gerrit.wikimedia.org/r/137515 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4172eb892daffd0148fcbbc3923c4fe8b54669e1 Gerrit-PatchSet: 3 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits