[MediaWiki-commits] [Gerrit] Bump ver to 4.0.1 - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151105 Change subject: Bump ver to 4.0.1 .. Bump ver to 4.0.1 Change-Id: I30f662e86b366a04180f0895de8d39a456c0664c --- M wikipedia/Wikipedia-Info.plist 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/05/151105/1 diff --git a/wikipedia/Wikipedia-Info.plist b/wikipedia/Wikipedia-Info.plist index a35092e..12de9a8 100644 --- a/wikipedia/Wikipedia-Info.plist +++ b/wikipedia/Wikipedia-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 4.0 + 4.0.1 CFBundleSignature CFBundleVersion - 4.0 + 4.0.1 LSRequiresIPhoneOS UIAppFonts -- To view, visit https://gerrit.wikimedia.org/r/151105 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30f662e86b366a04180f0895de8d39a456c0664c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Workaround crasher when lastmodified date is bogus - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151109 Change subject: Workaround crasher when lastmodified date is bogus .. Workaround crasher when lastmodified date is bogus We still need to track down the cause, will add reporting logic later Change-Id: I75d1dcbb8fd971c80d3bfd81419475078462544b --- M wikipedia/Data/Operations/DownloadSectionsOp.m 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/09/151109/1 diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m b/wikipedia/Data/Operations/DownloadSectionsOp.m index 228adc6..d815f72 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -113,6 +113,10 @@ NSString *lastmodifiedDateString = weakSelf.jsonRetrieved[@"mobileview"][@"lastmodified"]; NSDate *lastmodifiedDate = [lastmodifiedDateString getDateFromIso8601DateString]; +if (!lastmodifiedDate) { +NSLog(@"Bad lastmodified date, will show as recently modified as a workaround"); +lastmodifiedDate = [[NSDate alloc] init]; +} NSDictionary *lastmodifiedbyDict = weakSelf.jsonRetrieved[@"mobileview"][@"lastmodifiedby"]; NSString *lastmodifiedby = @""; -- To view, visit https://gerrit.wikimedia.org/r/151109 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75d1dcbb8fd971c80d3bfd81419475078462544b Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Manual import of translations from TWN - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Manual import of translations from TWN .. Manual import of translations from TWN Change-Id: I3eaaee9aca58d8cb44481c84cb5bdac45886ca2b --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/assets/bundle.js M wikipedia/bn.lproj/Localizable.strings M wikipedia/bn.lproj/Main_iPhone.strings M wikipedia/ce.lproj/Main_iPhone.strings A wikipedia/cs.lproj/InfoPlist.strings A wikipedia/cs.lproj/Localizable.strings A wikipedia/cs.lproj/Main_iPhone.strings M wikipedia/de.lproj/Main_iPhone.strings M wikipedia/diq.lproj/Main_iPhone.strings M wikipedia/es.lproj/Localizable.strings M wikipedia/es.lproj/Main_iPhone.strings M wikipedia/fr.lproj/Main_iPhone.strings M wikipedia/he.lproj/Main_iPhone.strings M wikipedia/hu.lproj/Main_iPhone.strings M wikipedia/id.lproj/Localizable.strings M wikipedia/id.lproj/Main_iPhone.strings M wikipedia/it.lproj/Localizable.strings M wikipedia/it.lproj/Main_iPhone.strings M wikipedia/lb.lproj/Main_iPhone.strings M wikipedia/mk.lproj/Main_iPhone.strings M wikipedia/nl.lproj/Localizable.strings M wikipedia/pl.lproj/Localizable.strings M wikipedia/pl.lproj/Main_iPhone.strings M wikipedia/pt.lproj/Main_iPhone.strings M wikipedia/qqq.lproj/Main_iPhone.strings M wikipedia/ro.lproj/Localizable.strings M wikipedia/ro.lproj/Main_iPhone.strings M wikipedia/ru.lproj/Main_iPhone.strings M wikipedia/sr-ec.lproj/Localizable.strings M wikipedia/sv.lproj/Localizable.strings M wikipedia/sv.lproj/Main_iPhone.strings A wikipedia/ta.lproj/Main_iPhone.strings M wikipedia/tr.lproj/Main_iPhone.strings M wikipedia/vi.lproj/Localizable.strings M wikipedia/vi.lproj/Main_iPhone.strings M wikipedia/zh-hans.lproj/Localizable.strings M wikipedia/zh-hans.lproj/Main_iPhone.strings M wikipedia/zh-hant.lproj/Localizable.strings M wikipedia/zh-hant.lproj/Main_iPhone.strings 40 files changed, 806 insertions(+), 214 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index fed55a2..c1bbcb4 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -1646,7 +1646,7 @@ ORGANIZATIONNAME = "Wikimedia Foundation"; TargetAttributes = { D4991434181D51DE00E6073C = { - DevelopmentTeam = D5RR3ZF62D; + DevelopmentTeam = AKK7J2GV64; }; }; }; diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index cee5d40..0d5d71a 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -573,4 +573,4 @@ } } -},{}]},{},[1,2,3,4,5,6,7,8]) +},{}]},{},[1,2,3,4,5,6,7,8]) \ No newline at end of file diff --git a/wikipedia/bn.lproj/Localizable.strings b/wikipedia/bn.lproj/Localizable.strings index 1120c6d..bb3872e 100644 --- a/wikipedia/bn.lproj/Localizable.strings +++ b/wikipedia/bn.lproj/Localizable.strings @@ -6,8 +6,7 @@ "article-languages-label" = "ভাষা নির্বাচন করুন"; "article-languages-cancel" = "বাতিল"; "article-languages-downloading" = "নিবন্ধের ভাষাসমূহ লোড হচ্ছে..."; -// Fuzzy -"article-languages-filter-placeholder" = "ছাকনী"; +"article-languages-filter-placeholder" = "ভাষা ছাকনী"; "history-label" = "সাম্প্রতিক"; "history-section-today" = "আজ"; "history-section-yesterday" = "গতকাল"; @@ -18,10 +17,8 @@ "zero-webpage-url" = "https://wikimediafoundation.org/wiki/Wikipedia_Zero_App_FAQ";; "zero-interstitial-title" = "উইকিপিডিয়া জিরো প্রস্থান হচ্ছে"; "zero-interstitial-leave-app" = "ডাটা চার্জ প্রযোজ্য হতে পারে। অন্য ওয়েবসাইটিতে যেতে চান?"; -// Fuzzy -"zero-interstitial-continue" = "অগ্রসর হোন"; -// Fuzzy -"zero-interstitial-cancel" = "বাতিল"; +"zero-interstitial-continue" = "ছেড়ে চলুন"; +"zero-interstitial-cancel" = "এখানে থাকুন"; "zero-learn-more" = "এই উইকিপিডিয়া অ্যাপের জন্য ডাটা চার্জ প্রযোজ্য নয়।"; "zero-learn-more-learn-more" = "আরও পড়ুন"; "zero-learn-more-no-thanks" = "খারিজ"; @@ -87,6 +84,7 @@ "main-menu-terms-of-use" = "ব্যবহারের শর্তাবলী"; "main-menu-rate-app" = "অ্যাপটি মূল্যায়ন করুন"; "main-menu-heading-zero" = "উইকিপিডিয়া জিরো"; +"main-menu-heading-legal" = "আইনী তথ্য"; "main-menu-show-today" = "আজ"; "saved-pages-title" = "সংরক্ষিত পাতা"; "page-history-title" = "পাতার ইতিহাস"; @@ -107,6 +105,7 @@ "edit-summary-choice-added-missing-info" = "অনুপস্থিত তথ্য যোগ করা হয়েছে"; "edit-summary-choice-other" = "অন্যান্য"; "edit-summary-field-placeholder-text" = "কীভাবে আপনি নিবন্ধনটি উন্নত করেছেন?"; +"edit-summary-title" = "কীভাবে আপনি পাতাটি উন্নত করেছেন?"; "fetching-random-article" = "অজানা নিবন্ধ আনা হচ্ছে"; "article-pull-to-refresh-prompt" = "নিবন্ধ পুনঃসতেজ করতে টানুন"; "article-pull-to-refr
[MediaWiki-commits] [Gerrit] here, have a change gerrit - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151146 Change subject: here, have a change gerrit .. here, have a change gerrit Change-Id: Ic997ecdd9515904142ace68b5af7493a62addbdc --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/46/151146/1 diff --git a/README.md b/README.md index 704acd6..d202cfe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (late 2013) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (late 2013-mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic997ecdd9515904142ace68b5af7493a62addbdc Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1 Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] here, have a change gerrit - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: here, have a change gerrit .. here, have a change gerrit Change-Id: Ic997ecdd9515904142ace68b5af7493a62addbdc --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 704acd6..d202cfe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (late 2013) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (late 2013-mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151146 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic997ecdd9515904142ace68b5af7493a62addbdc Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1 Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Here hvae another update gerrit - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151147 Change subject: Here hvae another update gerrit .. Here hvae another update gerrit Change-Id: I0aa78ff0328ed357204322c6b6de713e0a0f0f33 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/47/151147/1 diff --git a/README.md b/README.md index d202cfe..622bf23 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (late 2013-mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0aa78ff0328ed357204322c6b6de713e0a0f0f33 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1 Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Here hvae another update gerrit - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Here hvae another update gerrit .. Here hvae another update gerrit Change-Id: I0aa78ff0328ed357204322c6b6de713e0a0f0f33 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/README.md b/README.md index d202cfe..622bf23 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (late 2013-mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151147 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0aa78ff0328ed357204322c6b6de713e0a0f0f33 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1 Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Branch for v4.0? - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151151 Change subject: Branch for v4.0? .. Branch for v4.0? Change-Id: I77031b54343771899714f98223b79d94d96507bd --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/51/151151/1 diff --git a/README.md b/README.md index 704acd6..622bf23 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (late 2013) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77031b54343771899714f98223b79d94d96507bd Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0 Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Branch for v4.0? - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Branch for v4.0? .. Branch for v4.0? Change-Id: I77031b54343771899714f98223b79d94d96507bd --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 704acd6..622bf23 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (late 2013) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77031b54343771899714f98223b79d94d96507bd Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0 Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] another branch test? - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151153 Change subject: another branch test? .. another branch test? Change-Id: I3b10e466d4c3bc7caf8ebc207fb630afa31a73e6 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/53/151153/1 diff --git a/README.md b/README.md index 622bf23..bf92d4f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (mid 2014...) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b10e466d4c3bc7caf8ebc207fb630afa31a73e6 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] another branch test? - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: another branch test? .. another branch test? Change-Id: I3b10e466d4c3bc7caf8ebc207fb630afa31a73e6 --- M README.md 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/README.md b/README.md index 622bf23..bf92d4f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Wikipedia-iOS -New (mid 2014) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. +New (mid 2014...) native rewrite of the [Wikipedia reader application](https://www.mediawiki.org/wiki/Wikimedia_Apps/Wikipedia) for iOS. This version has not yet been deployed to the App Store -- the source of the older app currently in the store is in the [WikipediaMobile project on GitHub](https://github.com/wikimedia/WikipediaMobile). -- To view, visit https://gerrit.wikimedia.org/r/151153 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b10e466d4c3bc7caf8ebc207fb630afa31a73e6 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cherry-pick: More fixes related to the random crash fix. - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151183 Change subject: Cherry-pick: More fixes related to the random crash fix. .. Cherry-pick: More fixes related to the random crash fix. Change-Id: I8f6bf7484042db1d3f5c44144bf4c9eedc6b5f1c --- 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(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/83/151183/1 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/151183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f6bf7484042db1d3f5c44144bf4c9eedc6b5f1c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cherry-pick: More fixes related to the random crash fix. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Cherry-pick: More fixes related to the random crash fix. .. Cherry-pick: More fixes related to the random crash fix. Change-Id: I8f6bf7484042db1d3f5c44144bf4c9eedc6b5f1c --- 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/151183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f6bf7484042db1d3f5c44144bf4c9eedc6b5f1c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made refs panel lazy loaded. Disabled refs js hook for now. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Made refs panel lazy loaded. Disabled refs js hook for now. .. Made refs panel lazy loaded. Disabled refs js hook for now. Change-Id: I8237be404e271f6d37a9a22be2c33a973425ef02 --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/View Controllers/References/ReferenceVC.m M wikipedia/View Controllers/References/ReferencesVC.h M wikipedia/View Controllers/References/ReferencesVC.m M wikipedia/View Controllers/WebView/WebViewController.h M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M www/js/listeners.js 8 files changed, 69 insertions(+), 22 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 f8853c8..2f9eeb3 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1205,9 +1205,6 @@ - - - diff --git a/wikipedia/View Controllers/References/ReferenceVC.m b/wikipedia/View Controllers/References/ReferenceVC.m index f8e0d3c..c8c435c 100644 --- a/wikipedia/View Controllers/References/ReferenceVC.m +++ b/wikipedia/View Controllers/References/ReferenceVC.m @@ -18,6 +18,11 @@ @implementation ReferenceVC +-(void)dealloc +{ +NSLog(@"dealloc'ing REFERENCE VC!"); +} + - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString *domain = [SessionSingleton sharedInstance].currentArticleDomain; diff --git a/wikipedia/View Controllers/References/ReferencesVC.h b/wikipedia/View Controllers/References/ReferencesVC.h index b413baa..ec3c79a 100644 --- a/wikipedia/View Controllers/References/ReferencesVC.h +++ b/wikipedia/View Controllers/References/ReferencesVC.h @@ -12,6 +12,8 @@ @property (weak, nonatomic) WebViewController *webVC; +@property (assign) CGFloat panelHeight; + -(void)reset; @end diff --git a/wikipedia/View Controllers/References/ReferencesVC.m b/wikipedia/View Controllers/References/ReferencesVC.m index 3c8b48b..afb76b1 100644 --- a/wikipedia/View Controllers/References/ReferencesVC.m +++ b/wikipedia/View Controllers/References/ReferencesVC.m @@ -55,6 +55,7 @@ [super viewDidLoad]; // Do any additional setup after loading the view. +self.panelHeight = 0; self.refs = @[@""]; self.linkIds = @[]; self.linkText = @[]; @@ -305,7 +306,7 @@ CGRect r = [self.webVC.webView getScreenRectForHtmlElementWithId:elementId]; if (!CGRectIsNull(r)) { -CGFloat vSpaceAboveRefsPanel = self.webVC.view.bounds.size.height - self.view.bounds.size.height; +CGFloat vSpaceAboveRefsPanel = self.webVC.view.bounds.size.height - self.panelHeight; // Only scroll up if the refs link would be below the refs panel. if ((r.origin.y + r.size.height) > (vSpaceAboveRefsPanel)) { diff --git a/wikipedia/View Controllers/WebView/WebViewController.h b/wikipedia/View Controllers/WebView/WebViewController.h index 68ca8d9..c4fe24a 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.h +++ b/wikipedia/View Controllers/WebView/WebViewController.h @@ -13,7 +13,7 @@ @property (nonatomic) BOOL bottomMenuHidden; @property (nonatomic) BOOL referencesHidden; --(void)referencesShow; +-(void)referencesShow:(NSDictionary *)payload; -(void)referencesHide; // Reloads the current article from the core data cache. diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index b6cc728..18f5e7d 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -93,7 +93,7 @@ @property (nonatomic) BOOL unsafeToToggleTOC; @property (weak, nonatomic) BottomMenuViewController *bottomMenuViewController; -@property (weak, nonatomic) ReferencesVC *referencesVC; +@property (strong, nonatomic) ReferencesVC *referencesVC; @property (weak, nonatomic) IBOutlet UIView *referencesContainerView; @property (strong, nonatomic) NSLayoutConstraint *bottomBarViewBottomConstraint; @@ -145,6 +145,7 @@ [super viewDidLoad]; self.zeroStatusLabel.text = @""; +self.referencesVC = nil; self.sectionToEditId = 0; @@ -931,8 +932,7 @@ } //NSLog(@"referenceClicked: %@", payload); -weakSelf.referencesVC.payload = payload; -[weakSelf referencesShow]; +[weakSelf referencesShow:payload]; }]; @@ -1982,
[MediaWiki-commits] [Gerrit] Made refs panel lazy loaded. Disabled refs js hook for now. - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151200 Change subject: Made refs panel lazy loaded. Disabled refs js hook for now. .. Made refs panel lazy loaded. Disabled refs js hook for now. Change-Id: I8237be404e271f6d37a9a22be2c33a973425ef02 (cherry picked from commit 358dd833026fb64d526d8cfe550f0e3d9a002494) --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/View Controllers/References/ReferenceVC.m M wikipedia/View Controllers/References/ReferencesVC.h M wikipedia/View Controllers/References/ReferencesVC.m M wikipedia/View Controllers/WebView/WebViewController.h M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M www/js/listeners.js 8 files changed, 69 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/00/151200/1 diff --git a/wikipedia/Base.lproj/Main_iPhone.storyboard b/wikipedia/Base.lproj/Main_iPhone.storyboard index f8853c8..2f9eeb3 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1205,9 +1205,6 @@ - - - diff --git a/wikipedia/View Controllers/References/ReferenceVC.m b/wikipedia/View Controllers/References/ReferenceVC.m index f8e0d3c..c8c435c 100644 --- a/wikipedia/View Controllers/References/ReferenceVC.m +++ b/wikipedia/View Controllers/References/ReferenceVC.m @@ -18,6 +18,11 @@ @implementation ReferenceVC +-(void)dealloc +{ +NSLog(@"dealloc'ing REFERENCE VC!"); +} + - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString *domain = [SessionSingleton sharedInstance].currentArticleDomain; diff --git a/wikipedia/View Controllers/References/ReferencesVC.h b/wikipedia/View Controllers/References/ReferencesVC.h index b413baa..ec3c79a 100644 --- a/wikipedia/View Controllers/References/ReferencesVC.h +++ b/wikipedia/View Controllers/References/ReferencesVC.h @@ -12,6 +12,8 @@ @property (weak, nonatomic) WebViewController *webVC; +@property (assign) CGFloat panelHeight; + -(void)reset; @end diff --git a/wikipedia/View Controllers/References/ReferencesVC.m b/wikipedia/View Controllers/References/ReferencesVC.m index 3c8b48b..afb76b1 100644 --- a/wikipedia/View Controllers/References/ReferencesVC.m +++ b/wikipedia/View Controllers/References/ReferencesVC.m @@ -55,6 +55,7 @@ [super viewDidLoad]; // Do any additional setup after loading the view. +self.panelHeight = 0; self.refs = @[@""]; self.linkIds = @[]; self.linkText = @[]; @@ -305,7 +306,7 @@ CGRect r = [self.webVC.webView getScreenRectForHtmlElementWithId:elementId]; if (!CGRectIsNull(r)) { -CGFloat vSpaceAboveRefsPanel = self.webVC.view.bounds.size.height - self.view.bounds.size.height; +CGFloat vSpaceAboveRefsPanel = self.webVC.view.bounds.size.height - self.panelHeight; // Only scroll up if the refs link would be below the refs panel. if ((r.origin.y + r.size.height) > (vSpaceAboveRefsPanel)) { diff --git a/wikipedia/View Controllers/WebView/WebViewController.h b/wikipedia/View Controllers/WebView/WebViewController.h index 68ca8d9..c4fe24a 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.h +++ b/wikipedia/View Controllers/WebView/WebViewController.h @@ -13,7 +13,7 @@ @property (nonatomic) BOOL bottomMenuHidden; @property (nonatomic) BOOL referencesHidden; --(void)referencesShow; +-(void)referencesShow:(NSDictionary *)payload; -(void)referencesHide; // Reloads the current article from the core data cache. diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index b6cc728..18f5e7d 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -93,7 +93,7 @@ @property (nonatomic) BOOL unsafeToToggleTOC; @property (weak, nonatomic) BottomMenuViewController *bottomMenuViewController; -@property (weak, nonatomic) ReferencesVC *referencesVC; +@property (strong, nonatomic) ReferencesVC *referencesVC; @property (weak, nonatomic) IBOutlet UIView *referencesContainerView; @property (strong, nonatomic) NSLayoutConstraint *bottomBarViewBottomConstraint; @@ -145,6 +145,7 @@ [super viewDidLoad]; self.zeroStatusLabel.text = @""; +self.referencesVC = nil; self.sectionToEditId = 0; @@ -931,8 +932,7 @@ } //NSLog(@"referenceClicked: %@", payload); -weakSelf.referencesVC.pay
[MediaWiki-commits] [Gerrit] Made refs panel lazy loaded. Disabled refs js hook for now. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Made refs panel lazy loaded. Disabled refs js hook for now. .. Made refs panel lazy loaded. Disabled refs js hook for now. Change-Id: I8237be404e271f6d37a9a22be2c33a973425ef02 (cherry picked from commit 358dd833026fb64d526d8cfe550f0e3d9a002494) --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/View Controllers/References/ReferenceVC.m M wikipedia/View Controllers/References/ReferencesVC.h M wikipedia/View Controllers/References/ReferencesVC.m M wikipedia/View Controllers/WebView/WebViewController.h M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M www/js/listeners.js 8 files changed, 69 insertions(+), 22 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 f8853c8..2f9eeb3 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1205,9 +1205,6 @@ - - - diff --git a/wikipedia/View Controllers/References/ReferenceVC.m b/wikipedia/View Controllers/References/ReferenceVC.m index f8e0d3c..c8c435c 100644 --- a/wikipedia/View Controllers/References/ReferenceVC.m +++ b/wikipedia/View Controllers/References/ReferenceVC.m @@ -18,6 +18,11 @@ @implementation ReferenceVC +-(void)dealloc +{ +NSLog(@"dealloc'ing REFERENCE VC!"); +} + - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { NSString *domain = [SessionSingleton sharedInstance].currentArticleDomain; diff --git a/wikipedia/View Controllers/References/ReferencesVC.h b/wikipedia/View Controllers/References/ReferencesVC.h index b413baa..ec3c79a 100644 --- a/wikipedia/View Controllers/References/ReferencesVC.h +++ b/wikipedia/View Controllers/References/ReferencesVC.h @@ -12,6 +12,8 @@ @property (weak, nonatomic) WebViewController *webVC; +@property (assign) CGFloat panelHeight; + -(void)reset; @end diff --git a/wikipedia/View Controllers/References/ReferencesVC.m b/wikipedia/View Controllers/References/ReferencesVC.m index 3c8b48b..afb76b1 100644 --- a/wikipedia/View Controllers/References/ReferencesVC.m +++ b/wikipedia/View Controllers/References/ReferencesVC.m @@ -55,6 +55,7 @@ [super viewDidLoad]; // Do any additional setup after loading the view. +self.panelHeight = 0; self.refs = @[@""]; self.linkIds = @[]; self.linkText = @[]; @@ -305,7 +306,7 @@ CGRect r = [self.webVC.webView getScreenRectForHtmlElementWithId:elementId]; if (!CGRectIsNull(r)) { -CGFloat vSpaceAboveRefsPanel = self.webVC.view.bounds.size.height - self.view.bounds.size.height; +CGFloat vSpaceAboveRefsPanel = self.webVC.view.bounds.size.height - self.panelHeight; // Only scroll up if the refs link would be below the refs panel. if ((r.origin.y + r.size.height) > (vSpaceAboveRefsPanel)) { diff --git a/wikipedia/View Controllers/WebView/WebViewController.h b/wikipedia/View Controllers/WebView/WebViewController.h index 68ca8d9..c4fe24a 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.h +++ b/wikipedia/View Controllers/WebView/WebViewController.h @@ -13,7 +13,7 @@ @property (nonatomic) BOOL bottomMenuHidden; @property (nonatomic) BOOL referencesHidden; --(void)referencesShow; +-(void)referencesShow:(NSDictionary *)payload; -(void)referencesHide; // Reloads the current article from the core data cache. diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index b6cc728..18f5e7d 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -93,7 +93,7 @@ @property (nonatomic) BOOL unsafeToToggleTOC; @property (weak, nonatomic) BottomMenuViewController *bottomMenuViewController; -@property (weak, nonatomic) ReferencesVC *referencesVC; +@property (strong, nonatomic) ReferencesVC *referencesVC; @property (weak, nonatomic) IBOutlet UIView *referencesContainerView; @property (strong, nonatomic) NSLayoutConstraint *bottomBarViewBottomConstraint; @@ -145,6 +145,7 @@ [super viewDidLoad]; self.zeroStatusLabel.text = @""; +self.referencesVC = nil; self.sectionToEditId = 0; @@ -931,8 +932,7 @@ } //NSLog(@"referenceClicked: %@", payload); -weakSelf.referencesVC.payload = payload; -[weakSelf referencesShow]; +
[MediaWiki-commits] [Gerrit] v4.0.1-rc branch point (hopefully not broken) - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151202 Change subject: v4.0.1-rc branch point (hopefully not broken) .. v4.0.1-rc branch point (hopefully not broken) Change-Id: I822a232201855c1afae916de55c3ec00939d060d --- M Wikipedia.xcodeproj/project.pbxproj 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/02/151202/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index c1bbcb4..439a8ee 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -2249,8 +2249,8 @@ ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "wikipedia/Wikipedia-Prefix.pch"; HEADER_SEARCH_PATHS = ( @@ -2344,8 +2344,8 @@ ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "wikipedia/Wikipedia-Prefix.pch"; HEADER_SEARCH_PATHS = ( @@ -2367,8 +2367,8 @@ ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "wikipedia/Wikipedia-Prefix.pch"; HEADER_SEARCH_PATHS = ( -- To view, visit https://gerrit.wikimedia.org/r/151202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I822a232201855c1afae916de55c3ec00939d060d Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc-nonbroken Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] v4.0.1-rc branch point (hopefully not broken) - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: v4.0.1-rc branch point (hopefully not broken) .. v4.0.1-rc branch point (hopefully not broken) Change-Id: I822a232201855c1afae916de55c3ec00939d060d --- M Wikipedia.xcodeproj/project.pbxproj 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index c1bbcb4..439a8ee 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -2249,8 +2249,8 @@ ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "wikipedia/Wikipedia-Prefix.pch"; HEADER_SEARCH_PATHS = ( @@ -2344,8 +2344,8 @@ ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "wikipedia/Wikipedia-Prefix.pch"; HEADER_SEARCH_PATHS = ( @@ -2367,8 +2367,8 @@ ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CODE_SIGN_IDENTITY = "iPhone Developer"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Wikimedia Foundation (AKK7J2GV64)"; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "wikipedia/Wikipedia-Prefix.pch"; HEADER_SEARCH_PATHS = ( -- To view, visit https://gerrit.wikimedia.org/r/151202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I822a232201855c1afae916de55c3ec00939d060d Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc-nonbroken Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Null protection for section op. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Null protection for section op. .. Null protection for section op. Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 --- M wikipedia/Data/Operations/DownloadSectionsOp.m 1 file changed, 2 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 d815f72..dbdc6bb 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -113,7 +113,7 @@ NSString *lastmodifiedDateString = weakSelf.jsonRetrieved[@"mobileview"][@"lastmodified"]; NSDate *lastmodifiedDate = [lastmodifiedDateString getDateFromIso8601DateString]; -if (!lastmodifiedDate) { +if (!lastmodifiedDate || [lastmodifiedDate isNull]) { NSLog(@"Bad lastmodified date, will show as recently modified as a workaround"); lastmodifiedDate = [[NSDate alloc] init]; } @@ -147,6 +147,7 @@ protectionStatus = protectionDict[@"edit"][0]; } } +if (!protectionStatus || [protectionStatus isNull]) protectionStatus = @""; NSMutableDictionary *output = @{ @"sections": outputSections, -- To view, visit https://gerrit.wikimedia.org/r/151259 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Null protection for section op. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Null protection for section op. .. Null protection for section op. Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 (cherry picked from commit fcadf7f2d6cc116e3975a7ae788f3553d5168502) --- M wikipedia/Data/Operations/DownloadSectionsOp.m 1 file changed, 2 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 d815f72..dbdc6bb 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -113,7 +113,7 @@ NSString *lastmodifiedDateString = weakSelf.jsonRetrieved[@"mobileview"][@"lastmodified"]; NSDate *lastmodifiedDate = [lastmodifiedDateString getDateFromIso8601DateString]; -if (!lastmodifiedDate) { +if (!lastmodifiedDate || [lastmodifiedDate isNull]) { NSLog(@"Bad lastmodified date, will show as recently modified as a workaround"); lastmodifiedDate = [[NSDate alloc] init]; } @@ -147,6 +147,7 @@ protectionStatus = protectionDict[@"edit"][0]; } } +if (!protectionStatus || [protectionStatus isNull]) protectionStatus = @""; NSMutableDictionary *output = @{ @"sections": outputSections, -- To view, visit https://gerrit.wikimedia.org/r/151260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc-nonbroken Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Null protection for section op. - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151260 Change subject: Null protection for section op. .. Null protection for section op. Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 (cherry picked from commit fcadf7f2d6cc116e3975a7ae788f3553d5168502) --- M wikipedia/Data/Operations/DownloadSectionsOp.m 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/60/151260/1 diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m b/wikipedia/Data/Operations/DownloadSectionsOp.m index d815f72..dbdc6bb 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -113,7 +113,7 @@ NSString *lastmodifiedDateString = weakSelf.jsonRetrieved[@"mobileview"][@"lastmodified"]; NSDate *lastmodifiedDate = [lastmodifiedDateString getDateFromIso8601DateString]; -if (!lastmodifiedDate) { +if (!lastmodifiedDate || [lastmodifiedDate isNull]) { NSLog(@"Bad lastmodified date, will show as recently modified as a workaround"); lastmodifiedDate = [[NSDate alloc] init]; } @@ -147,6 +147,7 @@ protectionStatus = protectionDict[@"edit"][0]; } } +if (!protectionStatus || [protectionStatus isNull]) protectionStatus = @""; NSMutableDictionary *output = @{ @"sections": outputSections, -- To view, visit https://gerrit.wikimedia.org/r/151260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: v4.0.1-rc-nonbroken Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Manual import of translations from TWN - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Manual import of translations from TWN .. Manual import of translations from TWN Change-Id: I771c3bec329145d6807b387c594e89e81f6324e0 --- M wikipedia/ast.lproj/InfoPlist.strings M wikipedia/ast.lproj/Localizable.strings M wikipedia/ast.lproj/Main_iPhone.strings M wikipedia/br.lproj/Localizable.strings M wikipedia/br.lproj/Main_iPhone.strings M wikipedia/ca.lproj/Localizable.strings M wikipedia/ca.lproj/Main_iPhone.strings M wikipedia/cs.lproj/Localizable.strings M wikipedia/de.lproj/Localizable.strings M wikipedia/es.lproj/Localizable.strings M wikipedia/fr.lproj/Localizable.strings M wikipedia/he.lproj/Localizable.strings M wikipedia/id.lproj/Localizable.strings M wikipedia/it.lproj/Localizable.strings M wikipedia/lb.lproj/Localizable.strings M wikipedia/mk.lproj/Localizable.strings M wikipedia/nl.lproj/Localizable.strings M wikipedia/nl.lproj/Main_iPhone.strings M wikipedia/pl.lproj/Localizable.strings M wikipedia/pl.lproj/Main_iPhone.strings M wikipedia/pt.lproj/Localizable.strings M wikipedia/pt.lproj/Main_iPhone.strings M wikipedia/ro.lproj/Localizable.strings M wikipedia/ru.lproj/Localizable.strings M wikipedia/sco.lproj/Localizable.strings M wikipedia/sr-ec.lproj/Localizable.strings M wikipedia/sr-ec.lproj/Main_iPhone.strings M wikipedia/sv.lproj/Localizable.strings M wikipedia/tr.lproj/Localizable.strings M wikipedia/zh-hans.lproj/Localizable.strings 30 files changed, 263 insertions(+), 65 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/ast.lproj/InfoPlist.strings b/wikipedia/ast.lproj/InfoPlist.strings index 5ca6de0..c512b72 100644 --- a/wikipedia/ast.lproj/InfoPlist.strings +++ b/wikipedia/ast.lproj/InfoPlist.strings @@ -2,4 +2,4 @@ // Exported from translatewiki.net // Author: Xuacu -"CFBundleDisplayName" = "Uiquipedia"; +"CFBundleDisplayName" = "Wikipedia"; diff --git a/wikipedia/ast.lproj/Localizable.strings b/wikipedia/ast.lproj/Localizable.strings index f4891e8..9074827 100644 --- a/wikipedia/ast.lproj/Localizable.strings +++ b/wikipedia/ast.lproj/Localizable.strings @@ -90,6 +90,13 @@ "main-menu-send-feedback" = "Unviar comentariu sobro la app"; "main-menu-show-page-history" = "Historial de los cambios a $1"; "main-menu-credits" = "Créditos"; +"main-menu-zero-faq" = "FAQ de Wikipedia Zero"; +"main-menu-privacy-policy" = "Política d'intimidá"; +"main-menu-terms-of-use" = "Condiciones d'usu"; +"main-menu-rate-app" = "Calificar app"; +"main-menu-heading-zero" = "Wikipedia Zero"; +"main-menu-heading-legal" = "Xíriga llegal"; +"main-menu-show-today" = "Güei"; "saved-pages-title" = "Páxines guardaes"; "page-history-title" = "Historial de la páxina"; "page-history-downloading" = "Cargando l'historial de la páxina..."; @@ -132,6 +139,8 @@ "timestamp-days" = "hai %d díes"; "timestamp-months" = "hai %d meses"; "timestamp-years" = "hai %d años"; +"lastmodified-by-user" = "Cambiada $1 por $2"; +"lastmodified-by-anon" = "Cambiada $1 por un usuariu anónimu"; "button-next" = "Siguiente"; "button-done" = "Fecho"; "button-save" = "Guardar"; @@ -139,6 +148,8 @@ "onboarding-login" = "Identificase"; "onboarding-already-have-account" = "¿Yá tienes una cuenta? $1"; "onboarding-skip" = "Saltar"; +"onboarding-wikipedia" = "Wikipedia"; +"onboarding-free-encyclopedia" = "La enciclopedia llibre"; "preference_title_eventlogging_opt_in" = "Unviar informes d'usu"; "preference_summary_eventlogging_opt_in" = "Permite a Wikimedia collechar información tocante a cómo uses la app p'ameyorala"; "page_protected_autoconfirmed" = "Esta páxina ta semiprotexida."; @@ -149,3 +160,12 @@ "license-footer-text" = "El conteníu ta disponible baxo $1"; "license-footer-name" = "CC-BY-SA 3.0"; "table-of-contents-heading" = "Conteníu"; +"abuse-filter-warning-heading" = "Esto nun paez una edición constructiva. ¿Tas seguro de que quies guardala?"; +"abuse-filter-warning-subheading" = "La to edición pue contener unu o más de los siguientes:"; +"abuse-filter-warning-caps" = "Escribir TOO EN MAYÚSCULES"; +"abuse-filter-warning-blanking" = "Dexar en blanco los artículos o facer spam"; +"abuse-filter-warning-irrelevant" = "Enllaces o imaxes esternos irrelevantes"; +"abuse-filter-warning-repeat" = "Caráuteres reptíos"; +"abuse-filter-disallow-heading" = "Nun pues guardar esta edición. Por favor vuelvi atrás y cámbiala."; +"abuse-filter-disallow-unconstructive" = "Un filtru automático identificó esta edición como potencialmente non constructiva o como intentu de vandalismu."; +"abuse-filter-disallow-notable" = "Wikipedia ye una enciclopedia y sólo cabe equí el conteníu neutral y notable."; diff --git a/wikipedia/ast.lproj/Main_iPhone.strings b/wikipedia/ast.lproj/Main_iPhone.strings index 5750769..c43b42e 100644 --- a/wikipedia/ast.lproj/Main_iPhone.strings +++ b/wikipedia/ast.lproj/Main_iPhone.strings @@ -2,7 +2,2
[MediaWiki-commits] [Gerrit] Work in progress: accessibility fixes - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/151788 Change subject: Work in progress: accessibility fixes .. Work in progress: accessibility fixes * adds localizable accessibility labels to wiki glyph buttons * adds button and link traits to some places where they belong Lots more to improve still... Bug: 69120 Change-Id: I9ddb8b277194afc947dd04a2bf810892dfc419a1 --- M wikipedia/MenuButton/MenuButton.m M wikipedia/MenuButton/WikiGlyphButton.m M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m M wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 8 files changed, 60 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/88/151788/1 diff --git a/wikipedia/MenuButton/MenuButton.m b/wikipedia/MenuButton/MenuButton.m index 4d93521..8d3bebf 100755 --- a/wikipedia/MenuButton/MenuButton.m +++ b/wikipedia/MenuButton/MenuButton.m @@ -57,6 +57,8 @@ [self addSubview:self.label]; self.margin = margin; [self constrainLabel]; +self.isAccessibilityElement = YES; +self.accessibilityTraits = UIAccessibilityTraitButton; } return self; } diff --git a/wikipedia/MenuButton/WikiGlyphButton.m b/wikipedia/MenuButton/WikiGlyphButton.m index 80f18a8..31709dc 100644 --- a/wikipedia/MenuButton/WikiGlyphButton.m +++ b/wikipedia/MenuButton/WikiGlyphButton.m @@ -30,6 +30,8 @@ self.clipsToBounds = YES; self.label = [[WikiGlyphLabel alloc] init]; self.label.translatesAutoresizingMaskIntoConstraints = NO; +self.isAccessibilityElement = YES; +self.accessibilityTraits = UIAccessibilityTraitButton; [self addSubview:self.label]; [self constrainLabel]; } @@ -43,6 +45,11 @@ { _enabled = enabled; self.alpha = (enabled) ? 1.0 : 0.2; +if (enabled) { +self.accessibilityTraits = self.accessibilityTraits & (~UIAccessibilityTraitNotEnabled); +} else { +self.accessibilityTraits = self.accessibilityTraits | UIAccessibilityTraitNotEnabled; +} } -(void)constrainLabel diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index d4660d3..7113632 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -63,6 +63,7 @@ color: buttonColor size: buttonTextSize baselineOffset: baseLineOffset]; +self.backButton.accessibilityLabel = MWLocalizedString(@"menu-back-accessibility-label", nil); self.backButton.tag = BOTTOM_MENU_BUTTON_PREVIOUS; [self.forwardButton.label setWikiText: isRTL ? IOS_WIKIGLYPH_BACKWARD : IOS_WIKIGLYPH_FORWARD @@ -70,6 +71,7 @@ size: buttonTextSize baselineOffset: baseLineOffset ]; +self.forwardButton.accessibilityLabel = MWLocalizedString(@"menu-forward-accessibility-label", nil); self.forwardButton.tag = BOTTOM_MENU_BUTTON_NEXT; // self.forwardButton.label.transform = CGAffineTransformMakeScale(-1, 1); @@ -79,6 +81,7 @@ baselineOffset: baseLineOffset + 1.0 ]; self.rightButton.tag = BOTTOM_MENU_BUTTON_SHARE; +self.rightButton.accessibilityLabel = MWLocalizedString(@"menu-share-accessibility-label", nil); self.allButtons = @[self.backButton, self.forwardButton, self.rightButton]; diff --git a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m index fc76834..c25bcd6 100644 --- a/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Primary/PrimaryMenuViewController.m @@ -73,6 +73,7 @@ size: 64 baselineOffset: 2.0 ]; +self.moreButton.accessibilityLabel = MWLocalizedString(@"menu-more-accessibility-label", nil); self.moreButton.label.textAlignment = [WikipediaAppUtils rtlSafeAlignment]; diff --git a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m index c69007e..cc4b487 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewControlle
[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 Gerrit-Reviewer: Brion VIBBER ___ 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 Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Yuvipanda 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 Gerrit-Reviewer: Brion VIBBER ___ 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 Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[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 Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dr0ptp4kt Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Instead of "send feedback", "send app feedback". - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Instead of "send feedback", "send app feedback". .. Instead of "send feedback", "send app feedback". * This is more consistent with Android. * Hopefully it would help in avoidance of off-topic feedback, too. Change-Id: I2301999e10fe8dc1db6f67822fd0f7c6f4344f73 --- M wikipedia/en.lproj/Localizable.strings 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index 6c5b9f3..b9720ea 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -89,7 +89,7 @@ "main-menu-current-article-save" = "Save $1 for offline reading"; "main-menu-random" = "Random"; "main-menu-feedback-heading" = "Feedback"; -"main-menu-send-feedback" = "Send feedback"; +"main-menu-send-feedback" = "Send app feedback"; "main-menu-show-page-history" = "History of changes to $1"; "main-menu-credits" = "Credits"; -- To view, visit https://gerrit.wikimedia.org/r/143159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2301999e10fe8dc1db6f67822fd0f7c6f4344f73 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dr0ptp4kt Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Comment out the onboarding always-on mode - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/144594 Change subject: Comment out the onboarding always-on mode .. Comment out the onboarding always-on mode We can uncomment the lines for testing now. :) Change-Id: I1ba2bb6c200a46af6d9b704b3d86ea5526ba8521 --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/94/144594/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index a6431d6..0f630e1 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -228,10 +228,10 @@ -//TODO: remove these two lines once we're done testing onboarding. +// Uncomment these lines only if testing onboarding! // These lines allow the onboarding to run on every app cold start. -[[NSUserDefaults standardUserDefaults] setObject:@YES forKey:@"ShowOnboarding"]; -[[NSUserDefaults standardUserDefaults] synchronize]; +//[[NSUserDefaults standardUserDefaults] setObject:@YES forKey:@"ShowOnboarding"]; +//[[NSUserDefaults standardUserDefaults] synchronize]; -- To view, visit https://gerrit.wikimedia.org/r/144594 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ba2bb6c200a46af6d9b704b3d86ea5526ba8521 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Table of contents refinements. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Table of contents refinements. .. Table of contents refinements. Change-Id: I5b2b728fb804034919460e7a5afd72fe3eb9ca56 --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m M wikipedia/View Controllers/TableOfContents/TOCViewController.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 6 files changed, 117 insertions(+), 65 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 cfd1212..7de9052 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1,5 +1,5 @@ - + @@ -108,7 +108,7 @@ - + @@ -1254,9 +1254,9 @@ - - + + diff --git a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m index 8e9c5d7..b5b559c 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m +++ b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m @@ -9,6 +9,9 @@ #import "WMF_Colors.h" #import "UIView+RemoveConstraints.h" #import "Section+LeadSection.h" +#import "NSString+FormattedAttributedString.h" +#import "WikipediaAppUtils.h" +#import "SessionSingleton.h" @interface TOCSectionCellView(){ @@ -16,12 +19,8 @@ @property (nonatomic, strong) UILabel *titleLabel; -@property (nonatomic) CGFloat indentMargin; -@property (nonatomic) CGFloat indentMarginMin; - -@property (nonatomic) CGFloat imageIndentMargin; -@property (nonatomic) CGFloat imageIndentMarginMin; -@property (nonatomic) CGFloat imageMargin; +@property (nonatomic) UIEdgeInsets cellMargin; +@property (nonatomic) UIEdgeInsets imageMargin; @property (nonatomic) CGSize imageSize; @property (nonatomic, strong) NSNumber *tocLevel; @@ -49,14 +48,9 @@ [self addSubview:self.titleLabel]; -self.indentMargin = 0.0f; -self.indentMarginMin = 6.0f; - -self.imageIndentMargin = 0.0f; -self.imageIndentMarginMin = 6.0f; - -self.imageMargin = 6.0f; -self.imageSize = CGSizeMake(60.0f, 40.0f); +self.cellMargin = UIEdgeInsetsMake(8, 12, 8, 10); +self.imageMargin = UIEdgeInsetsMake(5, 5, 5, 0); +self.imageSize = CGSizeMake(52.5f, 35.0f); self.isHighlighted = NO; @@ -73,31 +67,73 @@ -(void)setIsHighlighted:(BOOL)isHighlighted { if (isHighlighted) { -self.backgroundColor = WMF_COLOR_BLUE; +self.backgroundColor = [WMF_COLOR_BLUE colorWithAlphaComponent:0.6]; }else{ -self.backgroundColor = [UIColor darkGrayColor]; +self.backgroundColor = [UIColor colorWithRed:0.049 green:0.049 blue:0.049 alpha:1.0]; } if (isHighlighted) self.alpha = 1.0f; _isHighlighted = isHighlighted; + +[self adjustFontColorForHighlightedState]; +} + +-(void)adjustFontColorForHighlightedState +{ +// Only changes the text color. +NSMutableAttributedString *mutableString = +[[NSMutableAttributedString alloc] initWithAttributedString:self.titleLabel.attributedText]; + +UIColor *color = self.isHighlighted ? +[UIColor whiteColor] +: +[UIColor colorWithRed:0.573 green:0.58 blue:0.592 alpha:1]; + +[mutableString addAttributes: @{NSForegroundColorAttributeName : color} + range: NSMakeRange(0, self.titleLabel.attributedText.length)]; + +self.titleLabel.attributedText = mutableString; } -(NSAttributedString *)getAttributedStringForString:(NSString *)str isLeadSection:(BOOL)isLeadSection { -NSUInteger fontSize = (isLeadSection) ? 22 : 15; - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; paragraphStyle.alignment = NSTextAlignmentLeft; -return [[NSMutableAttributedString alloc] -initWithString:str attributes: @{ - NSFontAttributeName : [UIFont systemFontOfSize:fontSize], -
[MediaWiki-commits] [Gerrit] Add footer-divider.png (whoops!) - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/144614 Change subject: Add footer-divider.png (whoops!) .. Add footer-divider.png (whoops!) Change-Id: Ic3caff095f09a6405b48ad6fe8654195dabb60ee --- A wikipedia/assets/footer-divider.png 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/14/144614/1 diff --git a/wikipedia/assets/footer-divider.png b/wikipedia/assets/footer-divider.png new file mode 100644 index 000..2d6bbae --- /dev/null +++ b/wikipedia/assets/footer-divider.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/144614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic3caff095f09a6405b48ad6fe8654195dabb60ee Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Launch videos in VLC app on iOS if installed - change (mediawiki...TimedMediaHandler)
Brion VIBBER has submitted this change and it was merged. Change subject: Launch videos in VLC app on iOS if installed .. Launch videos in VLC app on iOS if installed iOS does not support ogg/webm. Direct people to install iOS app instead, and direct them to view videos in that instead. This is meant as a somewhat short term solution. After the kaltura player update (whenever that happens), it may make sense to replace this sort of thing with ogv.js, or perhaps keep this vlc triggering code. Either way, in the near term this is a relative simple fix that would help us reach 11.4% of our user base. One minor issue: If you don't have the VLC app installed, you will get a safari cannot open the page dialog box when we try to open with vlc. I couldn't find anyway around it. I don't think its a big deal, since in that case we cannot play the video anyways, so an error is not out of place. Bug: 61095 Change-Id: I6c3b5d8aadbd69577df3fe513f780f69708450d5 --- M MwEmbedModules/EmbedPlayer/EmbedPlayer.php M MwEmbedModules/EmbedPlayer/i18n/en.json M MwEmbedModules/EmbedPlayer/i18n/qqq.json A MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerVLCApp.js M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js M MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js M MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js 7 files changed, 147 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/MwEmbedModules/EmbedPlayer/EmbedPlayer.php b/MwEmbedModules/EmbedPlayer/EmbedPlayer.php index 66f6c32..c60d41c 100644 --- a/MwEmbedModules/EmbedPlayer/EmbedPlayer.php +++ b/MwEmbedModules/EmbedPlayer/EmbedPlayer.php @@ -64,6 +64,10 @@ "mw.EmbedPlayerGeneric" => array( 'scripts'=> "resources/mw.EmbedPlayerGeneric.js" ), "mw.EmbedPlayerJava" => array( 'scripts'=> "resources/mw.EmbedPlayerJava.js"), "mw.EmbedPlayerNative" => array( 'scripts'=> "resources/mw.EmbedPlayerNative.js" ), + "mw.EmbedPlayerVLCApp" => array( + 'scripts'=> "resources/mw.EmbedPlayerVLCApp.js", + 'dependencies' => array( 'mediawiki.Uri' ) + ), "mw.EmbedPlayerImageOverlay" => array( 'scripts'=> "resources/mw.EmbedPlayerImageOverlay.js" ), "mw.EmbedPlayerVlc" => array( 'scripts'=> "resources/mw.EmbedPlayerVlc.js" ), diff --git a/MwEmbedModules/EmbedPlayer/i18n/en.json b/MwEmbedModules/EmbedPlayer/i18n/en.json index 3534011..d3221a2 100644 --- a/MwEmbedModules/EmbedPlayer/i18n/en.json +++ b/MwEmbedModules/EmbedPlayer/i18n/en.json @@ -49,6 +49,7 @@ "mwe-embedplayer-ogg-player-h264Native": "HTML5 H.264 player", "mwe-embedplayer-ogg-player-webmNative": "HTML5 WebM player", "mwe-embedplayer-ogg-player-oggPlugin": "Generic Ogg plugin", +"mwe-embedplayer-ogg-player-vlcAppPlayer": "VLC for iOS app", "mwe-embedplayer-ogg-player-quicktime-mozilla": "QuickTime plugin", "mwe-embedplayer-ogg-player-quicktime-activex": "QuickTime ActiveX", "mwe-embedplayer-ogg-player-cortado": "Java Cortado", @@ -77,5 +78,11 @@ "mwe-embedplayer-video-3gp": "3GP video", "mwe-embedplayer-video-mpeg": "MPEG video", "mwe-embedplayer-video-msvideo": "AVI video", -"mwe-embedplayer-missing-source": "No source video was found" -} \ No newline at end of file +"mwe-embedplayer-missing-source": "No source video was found", +"mwe-embedplayer-vlcapp-intro": "In order to view videos from this site on an iPhone or iPad, you need the free $1.", +"mwe-embedplayer-vlcapp-vlcapplinktext": "VLC app", +"mwe-embedplayer-vlcapp-downloadapp": "Download the VLC app from the App Store", +"mwe-embedplayer-vlcapp-openvideo": "Open this video in the VLC app", +"mwe-embedplayer-vlcapp-downloadvideo": "Download this video", +"mwe-embedplayer-vlcapp-vlcapppopup": "To play videos on this site, you need the free VLC app. Install now?" +} diff --git a/MwEmbedModules/EmbedPlayer/i18n/qqq.json b/MwEmbedModules/EmbedPlayer/i18n/qqq.json index cf3c762..df06a9b 100644 --- a/MwEmbedModules/EmbedPlayer/i18n/qqq.json +++ b/MwEmbedModules/EmbedPlayer/i18n/qqq.json @@ -22,6 +22,7 @@ "mwe-embedplayer-close_btn": "{{Identical|Close}}", "mwe-embedplayer-ogg-player-mp3Native": "name of mp3 player in configuration screen", "mwe-embedplayer-ogg-player-aacNative": "name of AAC player in configuration screen", + "mwe-embedplayer-ogg-player-VLCApp": "Name for launching video in external VLC app, in the media player configuration screen. Only shown on iPhones/iPads" "mwe-embedplayer-ogg-player-cortado": "{{optional}}", "mwe-embedplayer-ogg-player-selected": "{{Identical|Selected}}", "mwe-embedplayer-for_best_experience": "Shown when user's br
[MediaWiki-commits] [Gerrit] Hide images in toc for now. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Hide images in toc for now. .. Hide images in toc for now. Toc sub-section entries now indented (up to 3 sections deep). Change-Id: I2b6a0697edc2d2aeec324f67096567312b10b8f0 --- M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m M wikipedia/View Controllers/WebView/WebViewController.m 2 files changed, 52 insertions(+), 19 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m index b5b559c..4368001 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m +++ b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m @@ -25,6 +25,8 @@ @property (nonatomic, strong) NSNumber *tocLevel; +@property (nonatomic) BOOL showImages; + @end @implementation TOCSectionCellView @@ -33,24 +35,27 @@ { self = [super init]; if (self) { +self.showImages = NO; + self.tocLevel = @(0); self.sectionId = nil; - self.sectionImageIds = @[]; self.sectionImageViews = [@[] mutableCopy]; self.titleLabel = [[UILabel alloc] init]; self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO; -self.titleLabel.numberOfLines = 10; +self.titleLabel.numberOfLines = 0; +self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; self.titleLabel.textColor = [UIColor colorWithWhite:1.0 alpha:1.0]; self.titleLabel.backgroundColor = [UIColor clearColor]; //self.titleLabel.layer.borderWidth = 1.0f; [self addSubview:self.titleLabel]; - -self.cellMargin = UIEdgeInsetsMake(8, 12, 8, 10); -self.imageMargin = UIEdgeInsetsMake(5, 5, 5, 0); -self.imageSize = CGSizeMake(52.5f, 35.0f); + +CGFloat topAndBottomSpace = 15; +self.cellMargin = UIEdgeInsetsMake(topAndBottomSpace, 12, topAndBottomSpace, 10); +self.imageMargin = UIEdgeInsetsMake(5, 5, topAndBottomSpace, 0); +self.imageSize = CGSizeMake(45.0f, 30.0f); self.isHighlighted = NO; @@ -96,16 +101,20 @@ self.titleLabel.attributedText = mutableString; } --(NSAttributedString *)getAttributedStringForString:(NSString *)str isLeadSection:(BOOL)isLeadSection +-(NSAttributedString *)getAttributedStringForString:(NSString *)str isLeadSection:(BOOL)isLeadSection isFirstLevel:(BOOL)isFirstLevel { NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; paragraphStyle.alignment = NSTextAlignmentLeft; +paragraphStyle.lineSpacing = 2.5; if (!isLeadSection) { - + +//UIFont *font = isFirstLevel ? [UIFont boldSystemFontOfSize:17] : [UIFont systemFontOfSize:17]; +UIFont *font = [UIFont systemFontOfSize:17]; + return [[NSMutableAttributedString alloc] initWithString:str attributes: @{ - NSFontAttributeName : [UIFont systemFontOfSize:15], + NSFontAttributeName : font, NSParagraphStyleAttributeName : paragraphStyle, NSStrokeWidthAttributeName : @0.0f, //@-1.0f, NSStrokeColorAttributeName : [UIColor blackColor], @@ -113,13 +122,17 @@ }]; }else{ +NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; +paragraphStyle.lineSpacing = 8; + NSDictionary *topAttributes = @{ -NSFontAttributeName : [UIFont systemFontOfSize:10], -NSKernAttributeName : @(1.5), -NSForegroundColorAttributeName : [UIColor whiteColor] +NSFontAttributeName : [UIFont systemFontOfSize:10.5], +NSKernAttributeName : @(1.25), +NSForegroundColorAttributeName : [UIColor whiteColor], +NSParagraphStyleAttributeName : paragraphStyle }; NSDictionary *bottomAttributes = @{ -NSFontAttributeName : [UIFont fontWithName:@"Times New Roman" size:22], +NSFontAttributeName : [UIFont fontWithName:@"Times New Roman" size:24], NSForegroundColorAttributeName : [UIColor whiteColor] }; @@ -142,7 +155,10 @@ string = [string getStringWithoutHTML]; -return [self getAttributedStringForString:string isLeadSection:[section isLeadSection]]; +//NSLog(@"section.level = %@", section.level); +BOOL isFirstLevel = [section.level isEqualToString:@"2"]; + +return [self getAttributedStringForString:string isLeadSection:[section isLeadSection] isFirst
[MediaWiki-commits] [Gerrit] Link directly to mobile site in CC-BY-SA 3.0 link - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Link directly to mobile site in CC-BY-SA 3.0 link .. Link directly to mobile site in CC-BY-SA 3.0 link Bug: 67650 Change-Id: I609d87808d3d97b91b980270ab5fb3a50c6550b9 --- 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 a83561b..be74c62 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1702,7 +1702,7 @@ NSString *dir = lang.dir; NSString *licenseName = MWLocalizedString(@"license-footer-name", nil); -NSString *licenseLink = [NSString stringWithFormat:@"https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\";>%@", licenseName]; +NSString *licenseLink = [NSString stringWithFormat:@"https://en.m.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License\";>%@", licenseName]; NSString *licenseText = [MWLocalizedString(@"license-footer-text", nil) stringByReplacingOccurrencesOfString:@"$1" withString:licenseLink]; return [NSString stringWithFormat:@"%@", dir, licenseText]; -- To view, visit https://gerrit.wikimedia.org/r/144628 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I609d87808d3d97b91b980270ab5fb3a50c6550b9 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Legoktm Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for line wrapping in TOC in iOS 6. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for line wrapping in TOC in iOS 6. .. Fix for line wrapping in TOC in iOS 6. Faster (hopefully) performance in iOS 6 as well. Change-Id: I157e535bc12f3a0e87a1986fa61a26cf58694dfd --- M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m M wikipedia/View Controllers/TableOfContents/TOCViewController.m 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m index 4368001..442d676 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m +++ b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m @@ -12,12 +12,13 @@ #import "NSString+FormattedAttributedString.h" #import "WikipediaAppUtils.h" #import "SessionSingleton.h" +#import "PaddedLabel.h" @interface TOCSectionCellView(){ } -@property (nonatomic, strong) UILabel *titleLabel; +@property (nonatomic, strong) PaddedLabel *titleLabel; @property (nonatomic) UIEdgeInsets cellMargin; @property (nonatomic) UIEdgeInsets imageMargin; @@ -42,7 +43,7 @@ self.sectionImageIds = @[]; self.sectionImageViews = [@[] mutableCopy]; -self.titleLabel = [[UILabel alloc] init]; +self.titleLabel = [[PaddedLabel alloc] init]; self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO; self.titleLabel.numberOfLines = 0; self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; diff --git a/wikipedia/View Controllers/TableOfContents/TOCViewController.m b/wikipedia/View Controllers/TableOfContents/TOCViewController.m index 88600cd..3e71af0 100644 --- a/wikipedia/View Controllers/TableOfContents/TOCViewController.m +++ b/wikipedia/View Controllers/TableOfContents/TOCViewController.m @@ -80,21 +80,23 @@ -(void)viewWillDisappear:(BOOL)animated { [self.funnel logClose]; +/* [[NSNotificationCenter defaultCenter] removeObserver: self name: @"SectionImageRetrieved" object: nil]; - +*/ [super viewWillDisappear:animated]; } -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - +/* [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(sectionImageRetrieved:) name: @"SectionImageRetrieved" object: nil]; +*/ [self.funnel logOpen]; } -- To view, visit https://gerrit.wikimedia.org/r/144729 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I157e535bc12f3a0e87a1986fa61a26cf58694dfd Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: pull to refresh refactor - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/144735 Change subject: Work in progress: pull to refresh refactor .. Work in progress: pull to refresh refactor Refactored pull-to-refresh logic out of WebViewController into PullToRefreshViewController, which can be subclassed and reused. Child class needs to override methods to get the scroll view, return appropriate strings for the label, and perform action on completion. Note that this sets the scroll view's delegate to the view controller, so if doing additional scroll view delegate stuff you may need to call a parent method to avoid losing the pull to refresh behavior. Change-Id: I7c4a69f5598f9bd359567074992ce4253d4df6ee --- M Wikipedia.xcodeproj/project.pbxproj A wikipedia/View Controllers/PullToRefresh/PullToRefreshViewController.h A wikipedia/View Controllers/PullToRefresh/PullToRefreshViewController.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.h M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M wikipedia/View Controllers/WebView/WebViewController.h M wikipedia/View Controllers/WebView/WebViewController.m 7 files changed, 320 insertions(+), 127 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/35/144735/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index e5a637d..3071683 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -169,6 +169,7 @@ D4991449181D51DE00E6073C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D4991448181D51DE00E6073C /* AppDelegate.m */; }; D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* Main_iPhone.storyboard */; }; D4991454181D51DE00E6073C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; }; + D49B2ED2196C687C002F035D /* PullToRefreshViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D49B2ED1196C687C002F035D /* PullToRefreshViewController.m */; }; D4B0AE0219365F7C00F0AC90 /* EventLoggingFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D4B0AE0119365F7C00F0AC90 /* EventLoggingFunnel.m */; }; D4B0AE051936604700F0AC90 /* EditFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D4B0AE041936604700F0AC90 /* EditFunnel.m */; }; D4B0AE0819366A0A00F0AC90 /* CreateAccountFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D4B0AE0719366A0A00F0AC90 /* CreateAccountFunnel.m */; }; @@ -669,6 +670,8 @@ D4991462181D51DF00E6073C /* Wikipedia-Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Wikipedia-Tests-Info.plist"; sourceTree = ""; }; D4991464181D51DF00E6073C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Wikipedia_Tests.m; sourceTree = ""; }; + D49B2ED0196C687C002F035D /* PullToRefreshViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PullToRefreshViewController.h; path = PullToRefresh/PullToRefreshViewController.h; sourceTree = ""; }; + D49B2ED1196C687C002F035D /* PullToRefreshViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PullToRefreshViewController.m; path = PullToRefresh/PullToRefreshViewController.m; sourceTree = ""; }; D4B0AE0019365F7C00F0AC90 /* EventLoggingFunnel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EventLoggingFunnel.h; path = EventLogging/EventLoggingFunnel.h; sourceTree = ""; }; D4B0AE0119365F7C00F0AC90 /* EventLoggingFunnel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = EventLoggingFunnel.m; path = EventLogging/EventLoggingFunnel.m; sourceTree = ""; }; D4B0AE031936604700F0AC90 /* EditFunnel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditFunnel.h; path = EventLogging/EditFunnel.h; sourceTree = ""; }; @@ -1103,6 +1106,7 @@ 04C43AB0183441A4006C643B /* View Controllers */ = { isa = PBXGroup; children = ( + D49B2ECF196C684F002F035D /* PullToRefresh */, 04A97E8418B81D440046B166 /* AccountCreation */, 04B7B9BA18B5569600A63551 /* Captcha *
[MediaWiki-commits] [Gerrit] Allow HTML5 tag (ruby support for East Asian typography). - change (mediawiki/core)
Brion VIBBER has submitted this change and it was merged. Change subject: Allow HTML5 tag (ruby support for East Asian typography). .. Allow HTML5 tag (ruby support for East Asian typography). We currently allow , , , and but not the W3C HTML5 element. Fix that. (Note that and are new additions to HTML5 which currently appear in the W3C but not the WHATWG version of the HTML5 spec. Support for these has already been merged in gecko and webkit and the editor plans to update the WHATWG spec.) Bug: 67042 Change-Id: I8c0e65d782b6d23057a9723b87323b28e8bf8852 --- M includes/Sanitizer.php M includes/parser/CoreParserFunctions.php M tests/parser/parserTests.txt 3 files changed, 47 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 6a568c2..ec17a08 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -383,7 +383,7 @@ 'h2', 'h3', 'h4', 'h5', 'h6', 'cite', 'code', 'em', 's', 'strike', 'strong', 'tt', 'var', 'div', 'center', 'blockquote', 'ol', 'ul', 'dl', 'table', 'caption', 'pre', - 'ruby', 'rt', 'rb', 'rp', 'p', 'span', 'abbr', 'dfn', + 'ruby', 'rb', 'rp', 'rt', 'rtc', 'p', 'span', 'abbr', 'dfn', 'kbd', 'samp', 'data', 'time', 'mark' ); $htmlsingle = array( @@ -1685,10 +1685,10 @@ # http://www.whatwg.org/html/text-level-semantics.html#the-ruby-element 'ruby' => $common, # rbc - # rtc 'rb' => $common, - 'rt' => $common, #array_merge( $common, array( 'rbspan' ) ), 'rp' => $common, + 'rt' => $common, #array_merge( $common, array( 'rbspan' ) ), + 'rtc' => $common, # MathML root element, where used for extensions # 'title' may not be 100% valid here; it's XHTML diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index cde7a2d..79c8ade 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -378,7 +378,7 @@ // list of disallowed tags for DISPLAYTITLE // these will be escaped even though they are allowed in normal wiki text $bad = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'blockquote', 'ol', 'ul', 'li', 'hr', - 'table', 'tr', 'th', 'td', 'dl', 'dd', 'caption', 'p', 'ruby', 'rb', 'rt', 'rp', 'br' ); + 'table', 'tr', 'th', 'td', 'dl', 'dd', 'caption', 'p', 'ruby', 'rb', 'rt', 'rtc', 'rp', 'br' ); // disallow some styles that could be used to bypass $wgRestrictDisplayTitle if ( $wgRestrictDisplayTitle ) { diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index e4d9324..6097370 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -1087,7 +1087,7 @@ !! end -## a,rtc not permitted +## a not permitted ## i,b,br omitted !! test Text-level semantic html elements in wikitext @@ -1109,7 +1109,7 @@ text text text -明日(Ashita) +明日(Ashita あした) text text text @@ -1132,7 +1132,7 @@ text text text -明日(Ashita) +明日(Ashita あした) text text text @@ -1140,6 +1140,46 @@ !! end +# test cases taken from +# http://www.w3.org/TR/html5/text-level-semantics.html#the-ruby-element +!! test +Ruby markup (W3C-style) +!! wikitext +; Mono-ruby for individual base characters +: 日に本ほん語ご +; Group ruby +: 今日きょう +; Jukugo ruby +: 法華経ほけきょう +; Inline ruby +: 東京(とうきょう) +; Double-sided ruby +: 旧金山jiùjīnshānSan Francisco + + +♥HeartCœur +☘ShamrockTrèfle +✶StarÉtoile + +!! html + Mono-ruby for individual base characters + 日に本ほん語ご + Group ruby + 今日きょう + Jukugo ruby + 法華経ほけきょう + Inline ruby + 東京(とうきょう) + Double-sided ruby + 旧金山jiùjīnshānSan Francisco + +♥HeartCœur +☘ShamrockTrèfle +✶StarÉtoile + + +!! end + !! test Non-word characters don't terminate tag names (bug 17663, 40670, 52022) !! wikitext -- To view, visit https://gerrit.wikimedia.org/r/141742 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8c0e65d782b6d23057a9723b87323b28e8bf8852 Gerrit-PatchSet: 6 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Amire80 Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Cscott Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Divec Gerrit-Reviewer: GWicke Gerrit-Reviewer: Liangent Gerrit-Reviewer: jenkins-
[MediaWiki-commits] [Gerrit] Footer style updates from Vibha - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/144811 Change subject: Footer style updates from Vibha .. Footer style updates from Vibha Change-Id: I02aac1dbba6d214873e3a2cc6e985bff1464890c --- M wikipedia/assets/footer.css M www/less/langbutton.less 2 files changed, 33 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/11/144811/1 diff --git a/wikipedia/assets/footer.css b/wikipedia/assets/footer.css index 76ddafb..c722c8d 100644 --- a/wikipedia/assets/footer.css +++ b/wikipedia/assets/footer.css @@ -8,6 +8,7 @@ background-image: url(footer-divider.png); background-repeat: no-repeat; background-size: 284px 12px; + margin-top: 24px; } .mw-footer-divider[dir=rtl] { -webkit-transform: scaleX(-1); @@ -18,10 +19,13 @@ -webkit-appearance: none; display: table; width: 100%; - color: #808080; - font-size: 14px; + color: #333; padding: 12px; - margin-bottom: 16px; + margin-top: 20px; +} +.mw-footer-button + .mw-footer-button { + padding-top: 0; + margin-bottom: 12px; } .mw-footer-button > div { display: table-row; @@ -34,27 +38,31 @@ display: inline-block; vertical-align: text-top; text-align: center; - width: 40px; - height: 40px; - border-radius: 20px; + width: 44px; + height: 44px; + border-radius: 22px; font-family: "WikiFont"; - font-size: 24px; + font-size: 26px; color: white; - background-color: #808080; + background-color: #333; } .mw-footer-button[dir=ltr] > div > span { text-align: left; + padding-left: 6px; } .mw-footer-button[dir=rtl] > div > span { text-align: right; + padding-right: 6px; } .mw-footer-button > div > span + span { padding-left: 12px; padding-right: 12px; + line-height: 1.25em; } .mw-license-footer { text-align: center; font-size: 10px; + margin-top: 24px; margin-bottom: 24px; } diff --git a/www/less/langbutton.less b/www/less/langbutton.less index d7d2d50..85b7868 100644 --- a/www/less/langbutton.less +++ b/www/less/langbutton.less @@ -10,6 +10,7 @@ background-image: url(footer-divider.png); background-repeat: no-repeat; background-size: 284px 12px; + margin-top: 24px; } .mw-footer-divider[dir=rtl] { -webkit-transform: scaleX(-1); @@ -23,11 +24,15 @@ display: table; width: 100%; -color: #808080; -font-size: 14px; +color: #333; padding: 12px; -margin-bottom: 16px; + +margin-top: 20px; +} +.mw-footer-button + .mw-footer-button { + padding-top: 0; + margin-bottom: 12px; } .mw-footer-button>div { display: table-row; @@ -41,32 +46,36 @@ vertical-align: text-top; text-align: center; -width: 40px; -height: 40px; -border-radius: 20px; +width: 44px; +height: 44px; +border-radius: 22px; font-family: "WikiFont"; -font-size: 24px; +font-size: 26px; color: white; -background-color: #808080; +background-color: #333; } .mw-footer-button[dir=ltr]>div>span { text-align: left; +padding-left: 6px; } .mw-footer-button[dir=rtl]>div>span { text-align: right; +padding-right: 6px; } .mw-footer-button>div>span+span { padding-left: 12px; padding-right: 12px; + line-height: 1.25em; } .mw-license-footer { text-align: center; font-size: 10px; +margin-top: 24px; margin-bottom: 24px; } -- To view, visit https://gerrit.wikimedia.org/r/144811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I02aac1dbba6d214873e3a2cc6e985bff1464890c Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: pull to refresh UI on Saved Pages - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/144846 Change subject: Work in progress: pull to refresh UI on Saved Pages .. Work in progress: pull to refresh UI on Saved Pages Adds classes: * RefreshProgressViewController - progress+cancel subcontainer * SavedPagesRefreshState - hanging off SessionSingleton, encapsulates the live state of the refresh operation, allows start/stop and monitoring status via KVO properties Updates to SavedPagesViewController to contain the progress view and show/hide it as necessary via the pull to refresh system. Todo: * show the message that you can pull to refresh * fix misplaced/mis-z-indexed pull2refresh marker after release * actually implement the refresh operations! Change-Id: I4f686a586bc3ee70ee7ef2a76c3b2d937ffb10eb --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/Base.lproj/Main_iPhone.storyboard A wikipedia/Session/SavedPagesRefreshState.h A wikipedia/Session/SavedPagesRefreshState.m M wikipedia/Session/SessionSingleton.h M wikipedia/Session/SessionSingleton.m M wikipedia/View Controllers/PullToRefresh/PullToRefreshViewController.m A wikipedia/View Controllers/RefreshProgressViewController.h A wikipedia/View Controllers/RefreshProgressViewController.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 12 files changed, 360 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/46/144846/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 3071683..26d6313 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -170,6 +170,8 @@ D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* Main_iPhone.storyboard */; }; D4991454181D51DE00E6073C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; }; D49B2ED2196C687C002F035D /* PullToRefreshViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D49B2ED1196C687C002F035D /* PullToRefreshViewController.m */; }; + D49B2ED8196C85FC002F035D /* RefreshProgressViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D49B2ED7196C85FC002F035D /* RefreshProgressViewController.m */; }; + D49B2EDB196C9B84002F035D /* SavedPagesRefreshState.m in Sources */ = {isa = PBXBuildFile; fileRef = D49B2EDA196C9B84002F035D /* SavedPagesRefreshState.m */; }; D4B0AE0219365F7C00F0AC90 /* EventLoggingFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D4B0AE0119365F7C00F0AC90 /* EventLoggingFunnel.m */; }; D4B0AE051936604700F0AC90 /* EditFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D4B0AE041936604700F0AC90 /* EditFunnel.m */; }; D4B0AE0819366A0A00F0AC90 /* CreateAccountFunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = D4B0AE0719366A0A00F0AC90 /* CreateAccountFunnel.m */; }; @@ -672,6 +674,10 @@ D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Wikipedia_Tests.m; sourceTree = ""; }; D49B2ED0196C687C002F035D /* PullToRefreshViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PullToRefreshViewController.h; path = PullToRefresh/PullToRefreshViewController.h; sourceTree = ""; }; D49B2ED1196C687C002F035D /* PullToRefreshViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PullToRefreshViewController.m; path = PullToRefresh/PullToRefreshViewController.m; sourceTree = ""; }; + D49B2ED6196C85FC002F035D /* RefreshProgressViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefreshProgressViewController.h; sourceTree = ""; }; + D49B2ED7196C85FC002F035D /* RefreshProgressViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RefreshProgressViewController.m; sourceTree = ""; }; + D49B2ED9196C9B84002F035D /* SavedPagesRefreshState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedPagesRefreshState.h; sourceTree = ""; }; + D49B2EDA196C9B84002F035D /* SavedPagesRefreshState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavedPagesRefreshState.m; sourceTree = ""; }; D4B0AE0019365F7C00F0AC90 /* EventLoggingFunnel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.
[MediaWiki-commits] [Gerrit] Remove redlinks - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145138 Change subject: Remove redlinks .. Remove redlinks (transform code nicked from Android side since it's already done) (we should move some of these transforms into common code at some point?) Change-Id: I3c4552eb9b1341995eebbb58108b4d6c37da8934 --- M wikipedia/assets/bundle.js M www/js/listeners.js M www/js/wikihacks.js 3 files changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/38/145138/1 diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 4e6beb0..349d10c 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -143,6 +143,7 @@ /* wikihacks.allowDivWidthsToFlow(); */ +wikihacks.hideRedLinks(); }); bridge.registerListener( "prepend", function( payload ) { @@ -321,7 +322,6 @@ } - exports.reduceWeirdWebkitMargin = function() { // See the "Tuna" article for tables having weird left margin. This removes it. var dds = document.getElementsByTagName('DD'); @@ -349,4 +349,15 @@ } } +exports.hideRedLinks = function() { +var redLinks = document.querySelectorAll( 'a.new' ); +for ( var i = 0; i < redLinks.length; i++ ) { +var redLink = redLinks[i]; +var replacementSpan = document.createElement( 'span' ); +replacementSpan.innerHTML = redLink.innerHTML; +replacementSpan.setAttribute( 'class', redLink.getAttribute( 'class' ) ); +redLink.parentNode.replaceChild( replacementSpan, redLink ); +} +} + },{}]},{},[1,2,3,4,5]) \ No newline at end of file diff --git a/www/js/listeners.js b/www/js/listeners.js index 4464330..f7b2bfa 100644 --- a/www/js/listeners.js +++ b/www/js/listeners.js @@ -47,6 +47,7 @@ /* wikihacks.allowDivWidthsToFlow(); */ +wikihacks.hideRedLinks(); }); bridge.registerListener( "prepend", function( payload ) { diff --git a/www/js/wikihacks.js b/www/js/wikihacks.js index f69124a..0e26db2 100644 --- a/www/js/wikihacks.js +++ b/www/js/wikihacks.js @@ -43,7 +43,6 @@ } - exports.reduceWeirdWebkitMargin = function() { // See the "Tuna" article for tables having weird left margin. This removes it. var dds = document.getElementsByTagName('DD'); @@ -70,3 +69,14 @@ thisAudio.style.display = 'none'; } } + +exports.hideRedLinks = function() { +var redLinks = document.querySelectorAll( 'a.new' ); +for ( var i = 0; i < redLinks.length; i++ ) { +var redLink = redLinks[i]; +var replacementSpan = document.createElement( 'span' ); +replacementSpan.innerHTML = redLink.innerHTML; +replacementSpan.setAttribute( 'class', redLink.getAttribute( 'class' ) ); +redLink.parentNode.replaceChild( replacementSpan, redLink ); +} +} -- To view, visit https://gerrit.wikimedia.org/r/145138 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c4552eb9b1341995eebbb58108b4d6c37da8934 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Terms of Use update for edit screen - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145152 Change subject: Terms of Use update for edit screen .. Terms of Use update for edit screen * Now mentions both 'Terms of Use' and CC-BY-SA 3.0 license * tapping on the message opens a popup action sheet offering links * selecting on opens the link in Safari Change-Id: I50373af7635f2cabb8238875b252c4bbd1cdda61 --- M wikipedia/View Controllers/Preview/PreviewLicenseView.h M wikipedia/View Controllers/Preview/PreviewLicenseView.m M wikipedia/View Controllers/Preview/PreviewLicenseView.xib M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings 5 files changed, 75 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/52/145152/1 diff --git a/wikipedia/View Controllers/Preview/PreviewLicenseView.h b/wikipedia/View Controllers/Preview/PreviewLicenseView.h index 7849fba..b1ca3ab 100644 --- a/wikipedia/View Controllers/Preview/PreviewLicenseView.h +++ b/wikipedia/View Controllers/Preview/PreviewLicenseView.h @@ -1,8 +1,10 @@ // Created by Monte Hurd on 4/25/14. +#import + @class PaddedLabel; -@interface PreviewLicenseView : UIView +@interface PreviewLicenseView : UIView @property (weak, nonatomic) IBOutlet PaddedLabel *licenseCCLabel; @property (weak, nonatomic) IBOutlet PaddedLabel *licenseTitleLabel; diff --git a/wikipedia/View Controllers/Preview/PreviewLicenseView.m b/wikipedia/View Controllers/Preview/PreviewLicenseView.m index ba8186d..7f3a341 100644 --- a/wikipedia/View Controllers/Preview/PreviewLicenseView.m +++ b/wikipedia/View Controllers/Preview/PreviewLicenseView.m @@ -10,18 +10,28 @@ //#import "NSString+Extras.h" -@interface PreviewLicenseView(){ -} +@interface PreviewLicenseView() @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topDividerHeight; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomDividerHeight; @property (nonatomic) BOOL hideTopDivider; @property (nonatomic) BOOL hideBottomDivider; +@property (readonly) UIActionSheet *sheet; @end -@implementation PreviewLicenseView +#define TERMS_LINK @"https://wikimediafoundation.org/wiki/Terms_of_Use"; +#define LICENSE_LINK @"https://creativecommons.org/licenses/by-sa/3.0/"; + +enum { +BUTTON_TERMS = 0, +BUTTON_LICENSE = 1 +} EnumActionSheetButtons; + +@implementation PreviewLicenseView { +UIActionSheet *_sheet; +} - (instancetype)initWithCoder:(NSCoder *)coder { @@ -37,8 +47,9 @@ { self.licenseTitleLabel.padding = UIEdgeInsetsMake(2, 0, 0, 0); -self.licenseTitleLabel.text = MWLocalizedString(@"wikitext-upload-save-license", nil); -[self underlineLicenseName:self.licenseTitleLabel]; +self.licenseTitleLabel.text = MWLocalizedString(@"wikitext-upload-save-terms-and-license", nil); +[self styleLinks:self.licenseTitleLabel]; +[self.licenseTitleLabel addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(termsLicenseLabelTapped:)]]; self.licenseLoginLabel.text = MWLocalizedString(@"wikitext-upload-save-anonymously-warning", nil); [self underlineSignIn:self.licenseLoginLabel]; @@ -68,7 +79,7 @@ return previewLicenseView; } --(void)underlineLicenseName:(UILabel *)label +-(void)styleLinks:(UILabel *)label { NSDictionary *baseAttributes = @{ @@ -76,7 +87,7 @@ NSFontAttributeName: label.font }; -NSDictionary *substitutionAttributes = +NSDictionary *linkAttributes = @{ //NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle), NSForegroundColorAttributeName: PREVIEW_BLUE_COLOR @@ -84,11 +95,52 @@ label.attributedText = [label.text attributedStringWithAttributes: baseAttributes - substitutionStrings: @[MWLocalizedString(@"wikitext-upload-save-license-name", nil)] -substitutionAttributes: @[substitutionAttributes] + substitutionStrings: @[MWLocalizedString(@"wikitext-upload-save-terms-name", nil), + MWLocalizedString(@"wikitext-upload-save-license-name", nil)] +substitutionAttributes: @[linkAttributes, linkAttributes] ]; } +-(void)termsLicenseLabelTapped:(UILabel *)label +{ +// @todo on iPad position this against the view +[self.sheet showInView:ROOT.view]; +} + +-(UIActionSheet *)sheet +{ +if (_sheet == nil) { +NSString *cancel; +if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { +cancel = MWLocalizedString(@"open-link-title", nil); +} else { +cancel = MWLocalizedString(@"open-link-cancel", nil); +} +_sheet = [[UIActionSheet alloc] initWithTitle:nil + delegate:self +
[MediaWiki-commits] [Gerrit] Shortened edit workflow login message. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Shortened edit workflow login message. .. Shortened edit workflow login message. Change-Id: I12370fe0554cc04b7292fd3f2e73c773fd1f7d7e --- 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 a40901f..9bf42a1 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -61,7 +61,7 @@ "wikitext-upload-save-sign-in" = "Log in"; "wikitext-upload-save-sign-in-benefits" = "So co-editors can connect with you & you can see what articles you edited."; "wikitext-upload-save-anonymously" = "Save anonymously"; -"wikitext-upload-save-anonymously-warning" = "Your edits will be attributed to the IP address of your device. If you $1 you will have more privacy."; +"wikitext-upload-save-anonymously-warning" = "Edits will be attributed to the IP address of your device. If you $1 you will have more privacy."; "wikitext-upload-save-terms-and-license" = "By saving, you agree to the $1, and to irrevocably release your contributions under the $2 license."; "wikitext-upload-save-terms-name" = "Terms of Use"; "wikitext-upload-save-license-name" = "CC BY-SA 3.0"; -- To view, visit https://gerrit.wikimedia.org/r/145163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12370fe0554cc04b7292fd3f2e73c773fd1f7d7e Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix a compiler warning about unknown symbol - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145363 Change subject: Fix a compiler warning about unknown symbol .. Fix a compiler warning about unknown symbol Change-Id: Ic4457fbe0feea915ffdc43a4ef0e74a68d225ea5 --- M wikipedia/View Controllers/Preview/PreviewLicenseView.m 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/63/145363/1 diff --git a/wikipedia/View Controllers/Preview/PreviewLicenseView.m b/wikipedia/View Controllers/Preview/PreviewLicenseView.m index 7f3a341..7824bf4 100644 --- a/wikipedia/View Controllers/Preview/PreviewLicenseView.m +++ b/wikipedia/View Controllers/Preview/PreviewLicenseView.m @@ -5,6 +5,7 @@ #import "WikipediaAppUtils.h" #import "NSString+FormattedAttributedString.h" #import "WikiGlyph_Chars.h" +#import "RootViewController.h" #define PREVIEW_BLUE_COLOR [UIColor colorWithRed:0.2 green:0.4784 blue:1.0 alpha:1.0] -- To view, visit https://gerrit.wikimedia.org/r/145363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4457fbe0feea915ffdc43a4ef0e74a68d225ea5 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fetch CSS resources from prod instead of labs - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fetch CSS resources from prod instead of labs .. Fetch CSS resources from prod instead of labs Change-Id: Icac68b29224416689860aa33abd2b83cde5fe072 --- M scripts/make-css-assets.bash M wikipedia/AssetsFile/AssetsFile.m 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/scripts/make-css-assets.bash b/scripts/make-css-assets.bash index d204a51..e3a59c3 100755 --- a/scripts/make-css-assets.bash +++ b/scripts/make-css-assets.bash @@ -2,7 +2,7 @@ #echo $PWD -PREFIX="http://bits.beta.wmflabs.org/en.wikipedia.beta.wmflabs.org/load.php?debug=true&lang=en&only=styles&skin=vector&version=&*&modules="; +PREFIX="http://bits.wikimedia.org/en.wikipedia.org/load.php?debug=true&lang=en&only=styles&skin=vector&modules="; cd "wikipedia/assets/" && { curl -o 'styles.css' "${PREFIX}mobile.app.pagestyles.ios" diff --git a/wikipedia/AssetsFile/AssetsFile.m b/wikipedia/AssetsFile/AssetsFile.m index 9a82d98..efab88e 100644 --- a/wikipedia/AssetsFile/AssetsFile.m +++ b/wikipedia/AssetsFile/AssetsFile.m @@ -60,13 +60,13 @@ urlString = @"https://bits.wikimedia.org/static-current/extensions/MobileApp/config/ios.json";; break; case ASSETS_FILE_CSS: -urlString = @"http://bits.beta.wmflabs.org/en.wikipedia.beta.wmflabs.org/load.php?debug=true&lang=en&modules=mobile.app.pagestyles.ios&only=styles&skin=vector&version=&*";; +urlString = @"https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=true&lang=en&modules=mobile.app.pagestyles.ios&only=styles&skin=vector";; break; case ASSETS_FILE_CSS_ABUSE_FILTER: -urlString = @"http://bits.beta.wmflabs.org/en.wikipedia.beta.wmflabs.org/load.php?debug=true&lang=en&modules=mobile.app.pagestyles.ios&only=styles&skin=vector&version=&*";; +urlString = @"https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=true&lang=en&modules=mobile.app.pagestyles.ios&only=styles&skin=vector";; break; case ASSETS_FILE_CSS_PREVIEW: -urlString = @"http://bits.beta.wmflabs.org/en.wikipedia.beta.wmflabs.org/load.php?debug=true&lang=en&modules=mobile.app.preview&only=styles&skin=vector&version=&*";; +urlString = @"https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=true&lang=en&modules=mobile.app.preview&only=styles&skin=vector";; break; default: break; -- To view, visit https://gerrit.wikimedia.org/r/143067 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icac68b29224416689860aa33abd2b83cde5fe072 Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mhurd ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] File page cleanup hacks - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/145424 Change subject: File page cleanup hacks .. File page cleanup hacks * hide edit section pencils that don't work * disable tapping on the actual image's link * make other links on the file page work, opening Safari Change-Id: I6f04c2e1295e3e61bc1aaf1864ac115ad584124f --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M www/js/listeners.js M www/js/wikihacks.js 4 files changed, 62 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/24/145424/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index b6da02b..71d3050 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -895,14 +895,13 @@ domain: [SessionSingleton sharedInstance].currentArticleDomain discoveryMethod: DISCOVERY_METHOD_LINK invalidatingCache: NO]; -}else if ([href hasPrefix:@"//"]) { -href = [@"http:" stringByAppendingString:href]; +} else if ([href hasPrefix:@"http:"] || [href hasPrefix:@"https:"] || [href hasPrefix:@"//"]) { +// A standard external link, either explicitly http(s) or left protocol-relative on web meaning http(s) +if ([href hasPrefix:@"//"]) { +// Expand protocol-relative link to https -- secure by default! +href = [@"https:" stringByAppendingString:href]; +} -NSString *msg = [NSString stringWithFormat:@"To do: add code for navigating to external link: %@", href]; -[weakSelf.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"alert('%@')", msg]]; - -} else if ([href hasPrefix:@"http:"] || [href hasPrefix:@"https:"]) { -// A standard link. // TODO: make all of the stuff above parse the URL into parts // unless it's /wiki/ or #anchor style. // Then validate if it's still in Wikipedia land and branch appropriately. diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 349d10c..b31f0c0 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -144,6 +144,7 @@ wikihacks.allowDivWidthsToFlow(); */ wikihacks.hideRedLinks(); +wikihacks.tweakFilePage(); }); bridge.registerListener( "prepend", function( payload ) { @@ -360,4 +361,31 @@ } } +exports.tweakFilePage = function() { +var filetoc = document.getElementById( 'filetoc' ); +if (filetoc) { +// We're on a File: page! Do some quick hacks. +// In future, replace entire thing with a custom view most of the time. +var content = document.getElementById( 'content' ); + +// Hide edit sections +var editSections = content.querySelectorAll('.edit_section_button'); +for (var i = 0; i < editSections.length; i++) { +editSections[i].style.display = 'none'; +} + +var fullImageLink = content.querySelector('.fullImageLink a'); +if (fullImageLink) { +// Don't replace the a with a span, as it will break styles +// Just disable clicking. +fullImageLink.addEventListener( 'touchstart', function( event ) { +event.preventDefault(); +} ); +fullImageLink.addEventListener( 'click', function( event ) { +event.preventDefault(); +} ); +} +} +} + },{}]},{},[1,2,3,4,5]) \ No newline at end of file diff --git a/www/js/listeners.js b/www/js/listeners.js index f7b2bfa..019198e 100644 --- a/www/js/listeners.js +++ b/www/js/listeners.js @@ -48,6 +48,7 @@ wikihacks.allowDivWidthsToFlow(); */ wikihacks.hideRedLinks(); +wikihacks.tweakFilePage(); }); bridge.registerListener( "prepend", function( payload ) { diff --git a/www/js/wikihacks.js b/www/js/wikihacks.js index 0e26db2..455bf5b 100644 --- a/www/js/wikihacks.js +++ b/www/js/wikihacks.js @@ -80,3 +80,30 @@ redLink.parentNode.replaceChild( replacementSpan, redLink ); } } + +exports.tweakFilePage = function() { +var filetoc = document.getElementById( 'filetoc' ); +if (filetoc) { +// We're on a File: page! Do some quick hacks. +// In future, replace entire thing with a custom view most of the time. +var content = document.getElementById( 'content' ); + +// Hide edit sections +var editSections = content.querySelectorAll('.edit_section_button'); +for (var i = 0; i < editSections.length; i++) { +editSections[i].style.display = 'none'; +} + +var fullImageLink = content.querySelector('.fu
[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); +i
[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]])
[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), url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMCIgaGVpZ2h0PSIxMCI+PGRlZnM+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNLS45NTgtNC4yNTljLTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2IDAgLjM5NC4xNDMuNzM2LjMzNiAxLjA0OWwtLjA3LjA1NmMtLjM3My0uNTEzLS45NTQtLjg2Ny0xLjYzNi0uODY3LTEuMTM0IDAtMi4wNTYuOTIyLTIuMDU2IDIuMDU2cy45MjIgMi4wNTYgMi4wNTYgMi4wNTZjLjU5NiAwIDEuMTIxLS4yNjUgMS40OTYtLjY3MS0uMDc1LjIxMy0uMTI2LjQzMy0uMTI2LjY3MSAwIDEuMTM0LjkyMiAyLjA1NiAyLjA1NiAyLjA1NnMyLjA1Ni0uOTIyIDIuMDU2LTIuMDU2YzAtLjQ3Ni0uMTg5LS44OTYtLjQ2Mi0xLjI0NS44MTMuMTU4IDEuNjI3LjQ3NyAyLjIyNCAxLjM5OS0uNDQzLS40NDMtLjcyNy0xLjI0OC0uNzI3LTIuMzM2bC0uMzc4LS4wMjguMzUtLjAxNGMwLTEuMDg3LjI3LTEuODkzLjcxMy0yLjMzNi0uNTc1Ljg4OS0xLjM1NCAxLjIxNi0yLjE0IDEuMzg1LjI0My0uMzM3LjQyLS43MjguNDItMS4xNzUgMC0xLjEzNC0uOTIyLTIuMDU2LTIuMDU2LTIuMDU2eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PG1hcmtlciBvcmllbnQ9ImF1dG8iIG92ZXJmbG93PSJ2aXNpYmxlIj48cGF0aCBkPSJNMC0yLjgyOGwtMi44MjggMi44MjggMi44MjggMi44MjggMi44MjgtMi44MjgtMi44MjgtMi44Mjh6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSJOYU4iLz48L21hcmtlcj48bWFya2VyIG9yaWVudD0iYXV0byIgb3ZlcmZsb3c9InZpc2libGUiPjxwYXRoIGQ9Ik0xMCAwbDQtNC0xNCA0IDE0IDQtNC00eiIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iTmFOIi8+PC9tYXJrZXI+PC9kZWZzPjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzA2YyIgZD0iTS41IDMuNTE4aDUuOTgydjUuOTgyaC01Ljk4MnoiLz4
[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 @@ - + @@ -1124,7 +1124,7 @@ - + @@ -1420,7 +1420,7 @@ - + @@ -1430,7 +1430,7 @@ - + -- To view, visit https://gerrit.wikimedia.org/r/145682 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I09a31cb1106a33c0feeb8eb9afdf6b8a324b95d2 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[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 + + * + * 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; + $valuecont = $line; + $value .= $valuecont; + } else { + if ( $line === ''
[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 @@ @prop
[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 ___ 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 ___ 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"; + +
[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 = CGRe
[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 Gerrit-Reviewer: Brion VIBBER ___ 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. +
[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
[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.
[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 Gerrit-Reviewer: Brion VIBBER ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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 ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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/Laun
[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 Gerrit-Reviewer: Brion VIBBER ___ 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 = ""; }; 0415581B18ADFA5C00B81A59 /* UIImage+ColorMask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ColorMask.m"; sourceTree = ""; }; 041A3B5818E11ED90079FF1C /* LanguagesCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesCell.h; sourceTree = ""; }; - 041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesCell.m; sourceTree = ""; }; + 041A3B5918E11ED90079FF1C /* LanguagesCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = LanguagesCell.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 041A3B5C18E11ED90079FF1C /* LanguagesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LanguagesViewController.h; sourceTree = ""; }; 041A3B5D18E11ED90079FF1C /* LanguagesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LanguagesViewController.m; sourceTree = ""; }; 041C55D01950B27D006CE0EF /* EditSummaryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditSummaryViewController.h; sourceTree = ""; }; - 041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditSummaryViewController.m; sourceTree = ""; }; + 041C55D11950B27D006CE0EF /* EditSummaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = EditSummaryViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 04272E781940EEBC00CC682F /* AssetsFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsFile.h; sourceTree = ""; }; 04272E791940EEBC00CC682F /* AssetsFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AssetsFile.m; sourceTree = ""; }; 04272E7A1940EEBC00CC682F /* AssetsFileEnum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetsFileEnum.h; sourceTree = ""; }; 04292FEF185FBA70002A13FC /* SearchResultCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchResultCell.h; sourceTree = ""; }; - 04292FF0185FBA70002A13FC /* SearchResultCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchResultCell.m; sourceTree = ""; }; + 04292FF0185FBA70002A13FC /* SearchResultCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEndi
[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 Gerrit-Reviewer: Brion VIBBER ___ 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:@"" @"" @"%@" -@"%@%@" +@"%@" @"" -@"", dir, recent, icon, lm, by]; +@"", 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 ___ 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 ___ 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 ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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/asset
[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 @@ + + + + + + + @@ -1392,16 +1399,21 @@ + + + + + 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 @@ [super viewDidLoad]; // Do any additional setup after loading the view. -self.summaryTextField.attributedPlaceholder = -[self getAttributedPlaceholderForString:MWLocalizedString(@"edit-summary-field-placeholder-text", nil)]; +self.placeholderLabel.text = MWLocalizedString(@"edit-summary-field-placeholder-text", nil); self.summaryTextField.textColor = [UIColor darkGrayColor]; self.summaryTextField.returnKeyType = UIReturnKeyDone; @@ -59,6 +60,13 @@ - (void)textFieldDidChange :(NSNotification *)notification { [self updateDoneButtonState]; + +[self updatePlaceholderLabelState]; +} + +-(void)updatePlaceholderLabelState +{ +self.placeholderLabel.hidden = ([self.summaryTextField.text length] == 0) ? NO : YES; } -(void)updateDoneButtonState @@ -74,21 +82,6 @@ { NSUInteger newLength = [textField.text length] + [string length] - range.length; return (newLength > MAX_SUMMARY_LENGTH) ? NO : YES; -} - --(NSAttributedString *)getAttributedPlaceholderForString:(NSString *)string -{ -NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:string]; - -[str addAttribute:NSFontAttributeName -value:[UIFont systemFontOfSize:12.0] -range:NSMakeRange(0, str.length)]; - -[str addAttribute:NSForegroundColorAttributeName -value:[UIColor colorWithWhite:0.55 alpha:1.0] -range:NSMakeRange(0, str.length)]; - -return str; } -(void)viewDidAppear:(BOOL)animated @@ -109,6 +102,7 @@ self.summaryTextField.text = self.summaryText; [self updateDoneButtonState]; +[self updatePlaceholderLabelState]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldDidChange:) name:@"UITextFieldTextDidChangeNotification" object:self.summaryTextField]; } -- To view, visit https://gerrit.wikimedia.org/r/140590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6591b8cc9b6f72598921affc5889d7baed4c57c2 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[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 = ""; }; 0493C2D319526A0100EBB973 /* WikiFont-Glyphs.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "WikiFont-Glyphs.ttf"; sourceTree = ""; }; 0493C2D519526FFE00EBB973 /* WikiFont-Glyphs-iOS.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "WikiFont-Glyphs-iOS.ttf"; sourceTree = ""; }; + 0493C2CA1952373100EBB973 /* CoreDataHousekeeping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreDataHousekeeping.h; sourceTree = ""; }; + 0493C2CB1952373100EBB973 /* CoreDataHousekeeping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreDataHousekeeping.m; sourceTree = ""; }; 049566C018F5F4CB0058EA12 /* ZeroConfigState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZeroConfigState.h; sourceTree = ""; }; 049566C118F5F4CB0058EA12 /* ZeroConfigState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZeroConfigState.m; sourceTree = ""; }; 04992BBE18B687AF00A6C22B /* SearchOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchOp.h; sourceTree = ""; }; @@ -920,6 +923,15 @@ path = PaddedLabel; sourceTree = ""; }; + 0493C2C91952373100EBB973 /* Housekeeping */ = { + isa = PBXGroup; + children = ( + 0493C2CA1952373100EBB973 /* CoreDataHousekeeping.h */, + 0493C2CB1952373100EBB973 /* CoreDataHousekeeping.m */, + ); + path = Housekeeping; + sourceTree = ""; + }; 049566BF18F5F4CB0058EA12 /* Zero */ = { isa = PBXGroup; children = ( @@ -1372,6 +1384,7 @@ D4B0ADFF19365F4600F0AC90 /* EventLogging */, 0442F57C1900718600F55DF9 /* Fonts */, 04D34DA31863D2D600610A87 /* HTML Parsing */, + 0493C2C91952373100EBB973 /* Housekeeping */, 0466F44C183A30CC00EA1FD7 /* Images */, 0463639518A844380049EE4F /* Keychain */, 04B60509193522650007185A /* MenuButton */
[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;
[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
[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 ___ 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:@"\ -\ +\ %@\ -\ +\ %@\ \ \ ", - 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:@"\ -\ +\ %@\ %@\ -\ +\ ", -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: -@"", -self.sectionId.integerValue]; +@"", +(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 Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 0e1963f..27b2e56 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -195,7 +195,7 @@ -(SecondaryMenuRowIndex)getIndexOfRow:(NSDictio
[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 ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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 Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Mhurd ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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:@"\ -\ +\ %@\ -\ +\ %@\ \ \ ", - 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:@"\ -\ +\ %@\ %@\ -\ +\ ", -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: -@"", -self.sectionId.integerValue]; +@"", +(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 Controllers/Navigation/Secondary/SecondaryMenuViewController.m index 0e1963f..27b2e56 100644 --- a/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Secondary/SecondaryMenuViewController.m @@ -195,7 +195,7 @@ -(SecondaryMenuRowIndex)getIndexOfRow:(NSDictionary *)row { -return ((NSNumber *)row[@"tag"]).integ
[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 ___ 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 Gerrit-Reviewer: Brion VIBBER ___ 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; +N
[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 ___ 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 = ""; }; D4B0AE0D19366A5400F0AC90 /* LoginFunnel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LoginFunnel.m; path = EventLogging/LoginFunnel.m; sourceTree = ""; }; D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = ""; }; + D4CA33D71959FDEC0093588B /* ArticleData 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "ArticleData 2.xcdatamodel"; sourceTree = ""; }; D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = ""; }; 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 = ""; 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 #import @@ -8,6 +13,7 @@ @interface Article : NSMa
[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 Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dr0ptp4kt Gerrit-Reviewer: Mhurd ___ 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 = ""; }; D44F637A18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; path = "zh-hant.lproj/InfoPlist.strings"; sourceTree = ""; }; D44F637B18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; path = "zh-hant.lproj/Main_iPhone.strings"; sourceTree = ""; }; + D4679060195AD36D00C4E44D /* bn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bn; path = bn.lproj/Localizable.strings; sourceTree = ""; }; + D4679061195AD37A00C4E44D /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = ""; }; + D4679062195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679063195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Main_iPhone.strings; sourceTree = ""; }; + D4679064195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679065195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Localizable.strings; sourceTree = ""; }; + D4679066195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Main_iPhone.strings; sourceTree = ""; }; + D4679067195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679068195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Localizable.strings; sourceTree = ""; }; + D4679069195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Main_iPhone.strings; sourceTree = ""; }; + D467906A195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/InfoPlist.strings; sourceTree = ""; }; + D467906B195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/Main_iPhone.strings; sourceTree = ""; }; + D467906C195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/InfoPlist.strings; sourceTree = ""; }; + D467906D195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Localizable.strings; sourceTree = ""; }; + D467906E195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Main_iPhone.strings; sourceTree = ""; }; + D467906F195AD3CE00C4E44D /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = ""; }; + D4679070195AD3DC00C4E44D /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; + D4679071195AD3E600C4E44D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; + D4679072195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679073195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; lastKnownFileT
[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 = ""; }; D44F637A18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; path = "zh-hant.lproj/InfoPlist.strings"; sourceTree = ""; }; D44F637B18DA794000EAD1DD /* zh-hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-hant"; path = "zh-hant.lproj/Main_iPhone.strings"; sourceTree = ""; }; + D4679060195AD36D00C4E44D /* bn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bn; path = bn.lproj/Localizable.strings; sourceTree = ""; }; + D4679061195AD37A00C4E44D /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = ""; }; + D4679062195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679063195AD38700C4E44D /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Main_iPhone.strings; sourceTree = ""; }; + D4679064195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679065195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Localizable.strings; sourceTree = ""; }; + D4679066195AD39C00C4E44D /* diq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = diq; path = diq.lproj/Main_iPhone.strings; sourceTree = ""; }; + D4679067195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679068195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Localizable.strings; sourceTree = ""; }; + D4679069195AD3A900C4E44D /* fo */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fo; path = fo.lproj/Main_iPhone.strings; sourceTree = ""; }; + D467906A195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/InfoPlist.strings; sourceTree = ""; }; + D467906B195AD3B300C4E44D /* frp */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = frp; path = frp.lproj/Main_iPhone.strings; sourceTree = ""; }; + D467906C195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/InfoPlist.strings; sourceTree = ""; }; + D467906D195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Localizable.strings; sourceTree = ""; }; + D467906E195AD3BE00C4E44D /* hrx */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = hrx; path = hrx.lproj/Main_iPhone.strings; sourceTree = ""; }; + D467906F195AD3CE00C4E44D /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = id.lproj/Localizable.strings; sourceTree = ""; }; + D4679070195AD3DC00C4E44D /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = ""; }; + D4679071195AD3E600C4E44D /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; + D4679072195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/InfoPlist.strings; sourceTree = ""; }; + D4679073195AD3F000C4E44D /* kn */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = kn; path = kn.lproj/Loc
[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 Controllers/Navigation/S
[MediaWiki-commits] [Gerrit] Followup fix to fawiki AbuseFilter config - change (operations/mediawiki-config)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/152033 Change subject: Followup fix to fawiki AbuseFilter config .. Followup fix to fawiki AbuseFilter config Array needs to be set, not have another array appended as an item. Bug: 69073 Change-Id: I6385f4897bd1aca33f963cc6e4ef1c82c54c7259 --- M docroot/bits/WikipediaMobileFirefoxOS M wmf-config/abusefilter.php 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/33/152033/1 diff --git a/docroot/bits/WikipediaMobileFirefoxOS b/docroot/bits/WikipediaMobileFirefoxOS index 197eb24..cf4550e 16 --- a/docroot/bits/WikipediaMobileFirefoxOS +++ b/docroot/bits/WikipediaMobileFirefoxOS -Subproject commit 197eb243543e88827401ee47f69cf98bdbfd0cf9 +Subproject commit cf4550ee40eead816c4bb0d7aae2403d016b97a4 diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php index 99c74e6..fb0f050 100644 --- a/wmf-config/abusefilter.php +++ b/wmf-config/abusefilter.php @@ -166,7 +166,7 @@ $wgGroupPermissions['sysop']['abusefilter-view-private'] = true; $wgGroupPermissions['sysop']['abusefilter-revert'] = true; $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true; - $wgAbuseFilterAvailableActions[] = array( 'flag', 'throttle', 'warn', 'disallow', 'blockautopromote', 'block', 'degroup', 'tag', 'rangeblock' ); + $wgAbuseFilterAvailableActions = array( 'flag', 'throttle', 'warn', 'disallow', 'blockautopromote', 'block', 'degroup', 'tag', 'rangeblock' ); $wgAbuseFilterAnonBlockDuration = '3 months'; $wgAbuseFilterBlockDuration = 'indefinite'; $wgAbuseFilterNotifications = false; -- To view, visit https://gerrit.wikimedia.org/r/152033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6385f4897bd1aca33f963cc6e4ef1c82c54c7259 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: add extensible metadata to search results ... - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/152727 Change subject: Work in progress: add extensible metadata to search results & API .. Work in progress: add extensible metadata to search results & API * Adds getMetadata() on SearchResult base class ** currently includes the non-default existing fields as examples ** also includes the newest Cirrus-specific fields, will want to migrate those * If srprop=metadata passed to list=search, this array gets included if non-empty ** appears as subelement of in XML ** appears as 'metadata':{} key in JSON Change-Id: I88ee54b52dbd320d8f6a9cc4ae3fd7ed634a7d50 --- M includes/api/ApiQuerySearch.php M includes/search/SearchResult.php 2 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/152727/1 diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 5ed5873..90131a7 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -179,6 +179,9 @@ if ( isset( $prop['hasrelated'] ) && $result->hasRelated() ) { $vals['hasrelated'] = ''; } + if ( isset( $prop['metadata'] ) && $result->getMetadata() ) { + $vals['metadata'] = $result->getMetadata(); + } // Add item to results and see whether it fits $fit = $apiResult->addValue( array( 'query', $this->getModuleName() ), @@ -294,6 +297,7 @@ 'sectiontitle', 'sectionsnippet', 'hasrelated', + 'metadata', ), ApiBase::PARAM_ISMULTI => true, ), diff --git a/includes/search/SearchResult.php b/includes/search/SearchResult.php index d51bff7..7d41a96 100644 --- a/includes/search/SearchResult.php +++ b/includes/search/SearchResult.php @@ -265,4 +265,46 @@ function isFileMatch() { return false; } + + /** +* Get additional metadata fields, totally extensible by the engine. +* Exposed to API search query only when asking for 'srprop=metadata' +* +* Recommend using key => string pairs, keep it simple! +* +* @return array +*/ + function getMetadata() { + // Old fields that aren't in the default set + // Not sure if we want to keep these? But good to demo with. + $metadata = array(); + if ( $this->getTitleSnippet() !== '') { + $metadata['titleSnippet'] = $this->getTitleSnippet(); + } + if ( $this->getRedirectTitle() != '' ) { + $metadata['redirectTitle'] = $this->getRedirectTitle(); + } + if ( $this->getRedirectSnippet() != '' ) { + $metadata['redirectSnippet'] = $this->getRedirectSnippet(); + } + if ( $this->getSectionTitle() !== null ) { + $metadata['sectionTitle'] = $this->getSectionTitle()->getFragment(); + } + if ( $this->getSectionSnippet() != '') { + $metadata['sectionSnippet'] = $this->getSectionSnippet(); + } + if ( $this->hasRelated() ) { + $metadata['sectionSnippet'] = ''; + } + + // New fields, definitely want these going in here + // Probably will kill the old getters/setters + if ( $this->isFileMatch() ) { + $metadata['isFileMatch'] = ''; + } + if ( $this->getInterwikiNamespaceText() !== '' ) { + $metadata['interwikiNamespaceText'] = $this->getInterwikiNamespaceText(); + } + return $metadata; + } } -- To view, visit https://gerrit.wikimedia.org/r/152727 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88ee54b52dbd320d8f6a9cc4ae3fd7ed634a7d50 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Re-enable references panel. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Re-enable references panel. .. Re-enable references panel. Change-Id: I03519019e62b32625cbd4dd4d0384d9020c6d66d --- M wikipedia/View Controllers/References/ReferenceVC.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M www/js/listeners.js 4 files changed, 24 insertions(+), 10 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/References/ReferenceVC.m b/wikipedia/View Controllers/References/ReferenceVC.m index c8c435c..660bc5e 100644 --- a/wikipedia/View Controllers/References/ReferenceVC.m +++ b/wikipedia/View Controllers/References/ReferenceVC.m @@ -136,7 +136,7 @@ [self.referenceWebView loadHTMLString:html baseURL:[NSURL URLWithString:@""]]; -CGFloat topInset = 32; +CGFloat topInset = 35; CGFloat bottomInset = (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1) ? 0 : topInset; diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index 18f5e7d..c178b5c 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -2126,6 +2126,17 @@ [self updateReferencesHeightAndBottomConstraints]; } +-(BOOL)didFindReferencesInPayload:(NSDictionary *)payload +{ +NSArray *refs = payload[@"refs"]; +if (!refs || (refs.count == 0)) return NO; +if (refs.count == 1) { +NSString *firstRef = refs[0]; +if ([firstRef isEqualToString:@""]) return NO; +} +return YES; +} + -(void)referencesShow:(NSDictionary *)payload { if (!self.referencesHidden){ @@ -2134,6 +2145,15 @@ return; } +// Don't show refs panel if reference data has yet to be retrieved. The +// reference parsing javascript can't parse until the reference section html has +// been retrieved. If user taps a reference link while the non-lead sections are +// still being retrieved we need to just not show the panel rather than showing a +// useless blank panel. +if (![self didFindReferencesInPayload:payload]) { +return; +} + self.referencesVC = [self.navigationController.storyboard instantiateViewControllerWithIdentifier:@"ReferencesVC"]; self.referencesVC.webVC = self; diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 990bb7a..0d5d71a 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -242,13 +242,10 @@ if ( anchorTarget && (anchorTarget.tagName === "A") ) { var href = anchorTarget.getAttribute( "href" ); -/* if ( refs.isReference( href ) ) { // Handle reference links with a popup view instead of scrolling about! refs.sendNearbyReferences( anchorTarget ); -} else -*/ -if ( href[0] === "#" ) { +} else if ( href[0] === "#" ) { // If it is a link to an anchor in the current page, just scroll to it document.getElementById( href.substring( 1 ) ).scrollIntoView(); } else { @@ -576,4 +573,4 @@ } } -},{}]},{},[1,2,3,4,5,6,7,8]) +},{}]},{},[1,2,3,4,5,6,7,8]) \ No newline at end of file diff --git a/www/js/listeners.js b/www/js/listeners.js index aaec41f..be833bf 100644 --- a/www/js/listeners.js +++ b/www/js/listeners.js @@ -146,13 +146,10 @@ if ( anchorTarget && (anchorTarget.tagName === "A") ) { var href = anchorTarget.getAttribute( "href" ); -/* if ( refs.isReference( href ) ) { // Handle reference links with a popup view instead of scrolling about! refs.sendNearbyReferences( anchorTarget ); -} else -*/ -if ( href[0] === "#" ) { +} else if ( href[0] === "#" ) { // If it is a link to an anchor in the current page, just scroll to it document.getElementById( href.substring( 1 ) ).scrollIntoView(); } else { -- To view, visit https://gerrit.wikimedia.org/r/152091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03519019e62b32625cbd4dd4d0384d9020c6d66d Gerrit-PatchSet: 3 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd Gerrit-Reviewer: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Untested tweak for Chinese variants on Android app - change (translatewiki)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/153031 Change subject: Untested tweak for Chinese variants on Android app .. Untested tweak for Chinese variants on Android app Bug: 69304 Change-Id: I06d4ef059e72d15ed9fd00986ac9d0d9bb7ddd8d --- M groups/Wikimedia/WikimediaMobile-android.yaml 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/31/153031/1 diff --git a/groups/Wikimedia/WikimediaMobile-android.yaml b/groups/Wikimedia/WikimediaMobile-android.yaml index 8799e3a..e90aff1 100644 --- a/groups/Wikimedia/WikimediaMobile-android.yaml +++ b/groups/Wikimedia/WikimediaMobile-android.yaml @@ -8,6 +8,8 @@ FILES: class: AndroidXmlFFS codeMap: + zh-hans: zh-rCN + zh-hant: zh-rTW qqq: qq MANGLER: @@ -195,7 +197,8 @@ - yi - yo - za - - zh + - zh-hans + - zh-hant - zu --- BASIC: -- To view, visit https://gerrit.wikimedia.org/r/153031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I06d4ef059e72d15ed9fd00986ac9d0d9bb7ddd8d Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: allow pinch-zoom on image viewer overlay - change (mediawiki...MobileFrontend)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/153543 Change subject: Work in progress: allow pinch-zoom on image viewer overlay .. Work in progress: allow pinch-zoom on image viewer overlay Switches position:fixed to position:absolute in ImageOverlay, and adds an Overlay property 'allowZoom' which can be set to true to disable the disabling of scroll and zoom behavior. Briefly tested on iOS 7.1 simulator. May explode on other systems. Bug: 69414 Change-Id: I6de82009409a28c46b36be13f67129c30f4e0891 --- M javascripts/common/Overlay.js M javascripts/modules/mediaViewer/ImageOverlay.js M less/modules/mediaViewer.less 3 files changed, 16 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/43/153543/1 diff --git a/javascripts/common/Overlay.js b/javascripts/common/Overlay.js index d30f969..3991df4 100644 --- a/javascripts/common/Overlay.js +++ b/javascripts/common/Overlay.js @@ -25,6 +25,10 @@ * @type {Boolean} */ fullScreen: true, + /** +* @type {Boolean} +*/ + allowZoom: false, /** * use '#mw-mf-viewport' rather than 'body' - for some reasons this has @@ -88,7 +92,9 @@ ( $overlayContent.scrollTop() === 0 && startY < y ) || ( $overlayContent.scrollTop() === contentLenght && startY > y ) ) { - ev.preventDefault(); + if ( !self.allowZoom ) { + ev.preventDefault(); + } } } ); @@ -138,7 +144,9 @@ if ( M.isIos ) { $window .on( 'touchmove.ios', function( ev ) { - ev.preventDefault(); + if ( !self.allowZoom ) { + ev.preventDefault(); + } } ) .on( 'resize.ios', function() { self._resizeContent( $window.height() ); diff --git a/javascripts/modules/mediaViewer/ImageOverlay.js b/javascripts/modules/mediaViewer/ImageOverlay.js index 43362f1..5e450f0 100644 --- a/javascripts/modules/mediaViewer/ImageOverlay.js +++ b/javascripts/modules/mediaViewer/ImageOverlay.js @@ -14,6 +14,7 @@ className: 'overlay media-viewer', template: M.template.get( 'modules/ImageOverlay.hogan' ), closeOnBack: true, + allowZoom: true, defaults: { detailsMsg: mw.msg( 'mobile-frontend-media-details' ), @@ -56,6 +57,7 @@ show: function() { this._super(); this._positionImage(); + M.unlockViewport(); }, _positionImage: function() { diff --git a/less/modules/mediaViewer.less b/less/modules/mediaViewer.less index 42a3b6b..abe09e8 100644 --- a/less/modules/mediaViewer.less +++ b/less/modules/mediaViewer.less @@ -6,13 +6,13 @@ padding-top: 0; .main { - height: auto; - position: relative; + position: absolute; width: 100%; + height: 100%; } .image-wrapper { - position: fixed; + position: absolute; left: 0; right: 0; top: 0; @@ -56,7 +56,7 @@ .details { bottom: 0; height: auto; - position: fixed; + position: absolute; width: 100%; padding: 8px 10px; margin: 0; -- To view, visit https://gerrit.wikimedia.org/r/153543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6de82009409a28c46b36be13f67129c30f4e0891 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Brion VIBBER ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] offhost_backups should only copy gzipped db dumps - change (operations/puppet[production])
Brion VIBBER has uploaded a new change for review. Change subject: offhost_backups should only copy gzipped db dumps .. offhost_backups should only copy gzipped db dumps Change-Id: Iaa7beb31919204b2042d561acbb2c3807937ceca --- M files/misc/scripts/offhost_backups 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/35/39335/1 -- To view, visit https://gerrit.wikimedia.org/r/39335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa7beb31919204b2042d561acbb2c3807937ceca Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Brion VIBBER Gerrit-Reviewer: Jgreen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits