[MediaWiki-commits] [Gerrit] Made details page license selectable for new images. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Made details page license selectable for new images. .. Made details page license selectable for new images. Change-Id: Ib1061e91647310ee8ba9bfd2ea116b65c8b97560 --- M Commons-iOS.xcodeproj/project.pbxproj M Commons-iOS/CommonsApp.m M Commons-iOS/DetailScrollViewController.m M Commons-iOS/FileUpload.h M Commons-iOS/FileUpload.m M Commons-iOS/FileUpload.xcdatamodeld/.xccurrentversion M Commons-iOS/FileUpload.xcdatamodeld/FileUpload 3.xcdatamodel/contents A Commons-iOS/FileUpload.xcdatamodeld/FileUpload 4.xcdatamodel/contents 8 files changed, 192 insertions(+), 44 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS.xcodeproj/project.pbxproj b/Commons-iOS.xcodeproj/project.pbxproj index 07c631c..e01e242 100644 --- a/Commons-iOS.xcodeproj/project.pbxproj +++ b/Commons-iOS.xcodeproj/project.pbxproj @@ -341,6 +341,7 @@ 0417D9E9176E666B00081D8C /* GalleryMultiSelectCollectionVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryMultiSelectCollectionVC.m; sourceTree = group; }; 0417D9EE176EB0081D8C /* GalleryMultiSelectAlbumCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GalleryMultiSelectAlbumCell.h; sourceTree = group; }; 0417D9EF176EB00100081D8C /* GalleryMultiSelectAlbumCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryMultiSelectAlbumCell.m; sourceTree = group; }; + 0438EF0317FCCB96005F8BF5 /* FileUpload 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = file; path = FileUpload 4.xcdatamodel; sourceTree = group; }; 044A0C3A170F6504003395DD /* GradientButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientButton.h; sourceTree = group; }; 044A0C3B170F6504003395DD /* GradientButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GradientButton.m; sourceTree = group; }; 0451C8601739A2CC00C2D03B /* FetchImageOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchImageOperation.h; sourceTree = group; }; @@ -1997,11 +1998,12 @@ D41B99ED16B1CB2E0045BEB5 /* FileUpload.xcdatamodeld */ = { isa = XCVersionGroup; children = ( + 0438EF0317FCCB96005F8BF5 /* FileUpload 4.xcdatamodel */, D41BFA46173AF10600472EC7 /* FileUpload 3.xcdatamodel */, D4C5B4201720BCD700C40532 /* FileUpload 2.xcdatamodel */, D41B99EE16B1CB2E0045BEB5 /* FileUpload.xcdatamodel */, ); - currentVersion = D41BFA46173AF10600472EC7 /* FileUpload 3.xcdatamodel */; + currentVersion = 0438EF0317FCCB96005F8BF5 /* FileUpload 4.xcdatamodel */; path = FileUpload.xcdatamodeld; sourceTree = group; versionGroupType = wrapper.xcdatamodel; diff --git a/Commons-iOS/CommonsApp.m b/Commons-iOS/CommonsApp.m index fb4ac60..907c52d 100644 --- a/Commons-iOS/CommonsApp.m +++ b/Commons-iOS/CommonsApp.m @@ -683,6 +683,9 @@ if (_currentUploadOp.isLoggedIn) { record.progress = @0.0f; + +// In case license somehow is not set by now... +if (record.license == nil) record.license = @cc-by-sa-3.0; MWPromise *upload = [_currentUploadOp uploadFile:fileName withFileData:fileData @@ -763,12 +766,12 @@ NSString *format = @== {{int:filedesc}} ==\n @{{Information\n|description=%@\n|source={{own}}\n|author=[[User:%@|%2$@]]\n|date=%@}}\n @== {{int:license-header}} ==\n - @{{self|cc-by-sa-3.0}}\n + @{{self|%@}}\n @\n @{{Uploaded from Mobile|platform=iOS|version=%@}}\n @%@; NSString *cats = [self formatCategories:record]; -NSString *desc = [NSString stringWithFormat:format, record.desc, self.username, [self formatDescriptionDate:record], self.version, cats]; +NSString *desc = [NSString stringWithFormat:format, record.desc, self.username, [self formatDescriptionDate:record], record.license, self.version, cats]; return desc; } diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index 5f0058c..bf9b2a0 100644 --- a/Commons-iOS/DetailScrollViewController.m +++
[MediaWiki-commits] [Gerrit] Diplay license name (instead of abbreviation) for uploaded i... - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Diplay license name (instead of abbreviation) for uploaded images. .. Diplay license name (instead of abbreviation) for uploaded images. Change-Id: I31db020086dca60f66b87112d2506af0ae27af58 --- M Commons-iOS/DetailScrollViewController.m 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index bf9b2a0..66dbddf 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -439,8 +439,12 @@ license = [license uppercaseString]; } +selectedLicenseIndex_ = [self getSelectedRecordLicenseIndex]; + // Update licenseDefaultLabel to show name of found license -self.licenseDefaultLabel.text = license; +//self.licenseDefaultLabel.text = [NSString stringWithFormat:@%@ - %@, selectableLicenses_[selectedLicenseIndex_][@description], license]; + +self.licenseDefaultLabel.text = selectableLicenses_[selectedLicenseIndex_][@description]; } #pragma mark - License choices @@ -540,7 +544,8 @@ } index++; } -return index; +// If no match was found assume the first entry in selectableLicenses_ is the default one +return 0; } -(void)setLicenseSelectionIndication:(UILabelDynamicHeight *)label -- To view, visit https://gerrit.wikimedia.org/r/88166 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31db020086dca60f66b87112d2506af0ae27af58 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moved delete button to bottom of details slider. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Moved delete button to bottom of details slider. .. Moved delete button to bottom of details slider. This made room for moving the uploads button to the right of the navigation bar which is better as having the upload button centered made it look more like a title than an actionable item. (per Jared Vibha) Change-Id: I0bc19f682e6fdbe099e7864da5a8cecfdea970ce --- M Commons-iOS/DetailScrollViewController.h M Commons-iOS/DetailScrollViewController.m M Commons-iOS/GalleryMultiSelectCollectionVC.m M Commons-iOS/MyUploadsViewController.m M Commons-iOS/en.lproj/MainStoryboard.storyboard M Commons-iOS/messages/messages-en.json M Commons-iOS/messages/messages-qqq.json 7 files changed, 100 insertions(+), 25 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/DetailScrollViewController.h b/Commons-iOS/DetailScrollViewController.h index dd18ff0..e4bcccd 100644 --- a/Commons-iOS/DetailScrollViewController.h +++ b/Commons-iOS/DetailScrollViewController.h @@ -30,7 +30,6 @@ @property (weak, nonatomic) IBOutlet UILabelDynamicHeight *descriptionTextLabel; @property (weak, nonatomic) IBOutlet UILabel *descriptionLabel; @property (weak, nonatomic) IBOutlet UILabel *descriptionPlaceholder; -@property (weak, nonatomic) IBOutlet UIBarButtonItem *deleteButton; @property (weak, nonatomic) IBOutlet UIBarButtonItem *actionButton; @property (weak, nonatomic) IBOutlet UIBarButtonItem *uploadButton; @property (weak, nonatomic) IBOutlet UIBarButtonItem *shareButton; @@ -47,11 +46,14 @@ @property (weak, nonatomic) IBOutlet UILabelDynamicHeight *categoryDefaultLabel; @property (weak, nonatomic) IBOutlet UILabelDynamicHeight *licenseDefaultLabel; +@property (weak, nonatomic) IBOutlet UILabel *deleteLabel; +@property (weak, nonatomic) IBOutlet UILabelDynamicHeight *deleteButton; @property (weak, nonatomic) IBOutlet UIView *titleContainer; @property (weak, nonatomic) IBOutlet UIView *descriptionContainer; @property (weak, nonatomic) IBOutlet UIView *licenseContainer; @property (weak, nonatomic) IBOutlet UIView *categoryContainer; +@property (weak, nonatomic) IBOutlet UIView *deleteContainer; @property (weak, nonatomic) IBOutlet UIView *scrollContainer; diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index 9e3b7f0..1e726d1 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -146,6 +146,9 @@ self.licenseLabel.text = [MWMessage forKey:@details-license-label].text; self.categoryLabel.text = [MWMessage forKey:@details-category-label].text; + +self.deleteLabel.text = [MWMessage forKey:@details-deletion-label].text; +self.deleteButton.text = [MWMessage forKey:@details-deletion-button].text; self.descriptionTextView.backgroundColor = DETAIL_EDITABLE_TEXTBOX_BACKGROUND_COLOR; self.descriptionTextLabel.backgroundColor = [UIColor clearColor]; @@ -189,6 +192,7 @@ self.titleLabel.textColor = DETAIL_LABEL_COLOR; self.licenseLabel.textColor = DETAIL_LABEL_COLOR; self.categoryLabel.textColor = DETAIL_LABEL_COLOR; +self.deleteLabel.textColor = DETAIL_LABEL_COLOR; [self.view setMultipleTouchEnabled:NO]; @@ -236,6 +240,7 @@ self.descriptionContainer.backgroundColor = containerColor; self.licenseContainer.backgroundColor = containerColor; self.categoryContainer.backgroundColor = containerColor; +self.deleteContainer.backgroundColor = containerColor; // Show Loading... label for licenses self.licenseDefaultLabel.text = [MWMessage forKey:@details-license-loading].text; @@ -248,6 +253,8 @@ // Apply the style used by category labels to the category Loading... placeholder [self styleDetailsLabel:self.categoryDefaultLabel]; + +[self configureDeleteButton]; //[self.view randomlyColorSubviews]; } @@ -592,7 +599,6 @@ [self.titleTextField removeConstraint:self.titleTextFieldHeightConstraint]; self.descriptionTextLabel.hidden = NO; -self.deleteButton.enabled = NO; // fixme in future, support deleting uploaded items self.actionButton.enabled = YES; // open link or share on the web self.uploadButton.enabled = NO; // fixme either hide or replace with action button? @@ -607,6 +613,7 @@ self.ccByImage.hidden = YES; self.ccSaImage.hidden = YES; +[self hideDeleteButton]; // either use HTML http://commons.wikimedia.org/wiki/Commons:Machine-readable_data // or pick apart the standard templates } else { @@ -620,7 +627,10 @@ self.descriptionTextView.hidden = NO;
[MediaWiki-commits] [Gerrit] Made nav back buttons more consistent between iOS 6 and 7. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Made nav back buttons more consistent between iOS 6 and 7. .. Made nav back buttons more consistent between iOS 6 and 7. Change-Id: I0d76c2f223694c82840c7d2aacbf053330a297bc --- M Commons-iOS.xcodeproj/project.pbxproj M Commons-iOS/CategorySearchTableViewController.m M Commons-iOS/CommonsApp.h M Commons-iOS/CommonsApp.m M Commons-iOS/GalleryMultiSelectCollectionVC.m M Commons-iOS/ImageScrollViewController.m M Commons-iOS/LoginViewController.m M Commons-iOS/MyUploadsViewController.m M Commons-iOS/SettingsViewController.m A Commons-iOS/clear.png 10 files changed, 74 insertions(+), 67 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS.xcodeproj/project.pbxproj b/Commons-iOS.xcodeproj/project.pbxproj index e01e242..dde04d0 100644 --- a/Commons-iOS.xcodeproj/project.pbxproj +++ b/Commons-iOS.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 0417D9E417698AF200081D8C /* PictureOfDayCycler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0417D9E317698AF200081D8C /* PictureOfDayCycler.m */; }; 0417D9EA176E666B00081D8C /* GalleryMultiSelectCollectionVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 0417D9E9176E666B00081D8C /* GalleryMultiSelectCollectionVC.m */; }; 0417D9F0176EB00100081D8C /* GalleryMultiSelectAlbumCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0417D9EF176EB00100081D8C /* GalleryMultiSelectAlbumCell.m */; }; + 0438EF0517FE20BA005F8BF5 /* clear.png in Resources */ = {isa = PBXBuildFile; fileRef = 0438EF0417FE20BA005F8BF5 /* clear.png */; }; 044A0C3C170F6504003395DD /* GradientButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 044A0C3B170F6504003395DD /* GradientButton.m */; }; 0451C8621739A2CC00C2D03B /* FetchImageOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0451C8611739A2CC00C2D03B /* FetchImageOperation.m */; }; 0451C865173B3D3800C2D03B /* SpeedGovernor.m in Sources */ = {isa = PBXBuildFile; fileRef = 0451C864173B3D3800C2D03B /* SpeedGovernor.m */; }; @@ -341,7 +342,8 @@ 0417D9E9176E666B00081D8C /* GalleryMultiSelectCollectionVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryMultiSelectCollectionVC.m; sourceTree = group; }; 0417D9EE176EB0081D8C /* GalleryMultiSelectAlbumCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GalleryMultiSelectAlbumCell.h; sourceTree = group; }; 0417D9EF176EB00100081D8C /* GalleryMultiSelectAlbumCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GalleryMultiSelectAlbumCell.m; sourceTree = group; }; - 0438EF0317FCCB96005F8BF5 /* FileUpload 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = file; path = FileUpload 4.xcdatamodel; sourceTree = group; }; + 0438EF0317FCCB96005F8BF5 /* FileUpload 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = FileUpload 4.xcdatamodel; sourceTree = group; }; + 0438EF0417FE20BA005F8BF5 /* clear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = clear.png; path = Commons-iOS/clear.png; sourceTree = SOURCE_ROOT; }; 044A0C3A170F6504003395DD /* GradientButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GradientButton.h; sourceTree = group; }; 044A0C3B170F6504003395DD /* GradientButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GradientButton.m; sourceTree = group; }; 0451C8601739A2CC00C2D03B /* FetchImageOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FetchImageOperation.h; sourceTree = group; }; @@ -954,6 +956,7 @@ isa = PBXGroup; children = ( 04AC5A7517A1D66800A06997 /* Bundled Pictures of Day */, + 0438EF0417FE20BA005F8BF5 /* clear.png */, 048C8B9E17FB71520082EB28 /* categoryHamburger.png */, 04E6617917614AB0003F35AD /* copyl...@2x.png */, 04E6617A17614AB0003F35AD /* copyleft.png */, @@ -1463,6 +1466,7 @@ 04E6617C17614AB0003F35AD /* copyleft.png in Resources */, 30DC441B178D42E60081555A /* cc-by-white.png in Resources */, 30DC441C178D42E60081555A /* cc-by-wh...@2x.png in Resources */, + 0438EF0517FE20BA005F8BF5 /* clear.png in
[MediaWiki-commits] [Gerrit] Fix gallery top spacing for iOS 7. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix gallery top spacing for iOS 7. .. Fix gallery top spacing for iOS 7. Change-Id: Ib2cd282c5e2953c18fe524337fbe2d85d4d13027 --- M Commons-iOS/GalleryMultiSelectCollectionVC.m 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/GalleryMultiSelectCollectionVC.m b/Commons-iOS/GalleryMultiSelectCollectionVC.m index 01fef2b..b09b2f0 100644 --- a/Commons-iOS/GalleryMultiSelectCollectionVC.m +++ b/Commons-iOS/GalleryMultiSelectCollectionVC.m @@ -10,6 +10,7 @@ #import AssetsLibrary/AssetsLibrary.h #import MWI18N/MWI18N.h #import CommonsApp.h +//#import UIView+Debugging.h #pragma mark - Defines @@ -56,6 +57,8 @@ cellScale_ = 1.0f / scale; imageMargin_ = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? GALLERY_IPAD_IMAGE_BORDER_WIDTH : GALLERY_NON_IPAD_IMAGE_BORDER_WIDTH; + +self.wantsFullScreenLayout = YES; } - (id)initWithCoder:(NSCoder *)coder @@ -131,6 +134,8 @@ [self.view addGestureRecognizer:swipeRecognizer_]; [self addNavBar]; + +//[self.view randomlyColorSubviews]; } -(void)setSpacing @@ -140,12 +145,12 @@ UICollectionViewFlowLayout *collectionViewLayout = (UICollectionViewFlowLayout*)self.collectionView.collectionViewLayout; if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) { -collectionViewLayout.sectionInset = UIEdgeInsetsMake(60.0f, 15.0f, 60.0f, 15.0f); +collectionViewLayout.sectionInset = UIEdgeInsetsMake(80.0f, 15.0f, 60.0f, 15.0f); collectionViewLayout.minimumInteritemSpacing = 10.0f; // Adds more space for the album labels collectionViewLayout.minimumLineSpacing = (self.galleryMode == GALLERY_SHOW_ALL_ALBUMS) ? 70.0f : 10.0f; }else{ -collectionViewLayout.sectionInset = UIEdgeInsetsMake(80.0f, 40.0f, 80.0f, 40.0f); +collectionViewLayout.sectionInset = UIEdgeInsetsMake(100.0f, 40.0f, 80.0f, 40.0f); collectionViewLayout.minimumInteritemSpacing = 40.0f; // Adds more space for the album labels collectionViewLayout.minimumLineSpacing = (self.galleryMode == GALLERY_SHOW_ALL_ALBUMS) ? 90.0f : 55.0f; @@ -154,7 +159,7 @@ -(void)addNavBar { -navBar_ = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, 0.0f, self.view.frame.size.width, 44.0f)]; +navBar_ = [[UINavigationBar alloc] initWithFrame: CGRectMake(0.0f, [[CommonsApp singleton] getStatusBarHeight], self.view.frame.size.width, 44.0f)]; navBar_.autoresizingMask = UIViewAutoresizingFlexibleWidth; navBar_.barStyle = UIBarStyleBlackTranslucent; [super.view addSubview:navBar_]; -- To view, visit https://gerrit.wikimedia.org/r/88171 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2cd282c5e2953c18fe524337fbe2d85d4d13027 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed the Deletion heading above the slider delete button. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Removed the Deletion heading above the slider delete button. .. Removed the Deletion heading above the slider delete button. Change-Id: Ib93b2dac80f34fc9e903ae4e498bb05afed656c6 --- M Commons-iOS/DetailScrollViewController.h M Commons-iOS/DetailScrollViewController.m M Commons-iOS/en.lproj/MainStoryboard.storyboard M Commons-iOS/messages/messages-en.json M Commons-iOS/messages/messages-qqq.json 5 files changed, 4 insertions(+), 21 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/DetailScrollViewController.h b/Commons-iOS/DetailScrollViewController.h index e4bcccd..dfb313e 100644 --- a/Commons-iOS/DetailScrollViewController.h +++ b/Commons-iOS/DetailScrollViewController.h @@ -46,7 +46,6 @@ @property (weak, nonatomic) IBOutlet UILabelDynamicHeight *categoryDefaultLabel; @property (weak, nonatomic) IBOutlet UILabelDynamicHeight *licenseDefaultLabel; -@property (weak, nonatomic) IBOutlet UILabel *deleteLabel; @property (weak, nonatomic) IBOutlet UILabelDynamicHeight *deleteButton; @property (weak, nonatomic) IBOutlet UIView *titleContainer; diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index 1e726d1..09fca92 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -146,8 +146,6 @@ self.licenseLabel.text = [MWMessage forKey:@details-license-label].text; self.categoryLabel.text = [MWMessage forKey:@details-category-label].text; - -self.deleteLabel.text = [MWMessage forKey:@details-deletion-label].text; self.deleteButton.text = [MWMessage forKey:@details-deletion-button].text; self.descriptionTextView.backgroundColor = DETAIL_EDITABLE_TEXTBOX_BACKGROUND_COLOR; @@ -192,7 +190,6 @@ self.titleLabel.textColor = DETAIL_LABEL_COLOR; self.licenseLabel.textColor = DETAIL_LABEL_COLOR; self.categoryLabel.textColor = DETAIL_LABEL_COLOR; -self.deleteLabel.textColor = DETAIL_LABEL_COLOR; [self.view setMultipleTouchEnabled:NO]; diff --git a/Commons-iOS/en.lproj/MainStoryboard.storyboard b/Commons-iOS/en.lproj/MainStoryboard.storyboard index 3c2e5b2..9a04a8e 100644 --- a/Commons-iOS/en.lproj/MainStoryboard.storyboard +++ b/Commons-iOS/en.lproj/MainStoryboard.storyboard @@ -1236,7 +1236,7 @@ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=ehb-uI-yRM userLabel=Scroll Container -rect key=frame x=0.0 y=0.0 width=320 height=650/ +rect key=frame x=0.0 y=0.0 width=320 height=621/ autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/ subviews view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=jhZ-zd-ki7 userLabel=Title Container @@ -1397,18 +1397,11 @@ /constraints /view view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=zMN-gT-FuM userLabel=Delete Container -rect key=frame x=20 y=544 width=280 height=86/ +rect key=frame x=20 y=544 width=280 height=57/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews -label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Deletion lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=COf-gZ-FUh -rect key=frame x=20 y=20 width=240 height=21/ -autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ -fontDescription key=fontDescription type=boldSystem pointSize=17/ -color key=textColor cocoaTouchSystemColor=darkTextColor/ -nil key=highlightedColor/ -/label label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Delete
[MediaWiki-commits] [Gerrit] Made My Uploads page use back arrow for consistency. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Made My Uploads page use back arrow for consistency. .. Made My Uploads page use back arrow for consistency. Change-Id: Ieac074ed44902349613239fddb733ff33b960eed --- M Commons-iOS/LoginViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/LoginViewController.m b/Commons-iOS/LoginViewController.m index 893a1aa..6601d66 100644 --- a/Commons-iOS/LoginViewController.m +++ b/Commons-iOS/LoginViewController.m @@ -346,7 +346,7 @@ -(void)viewWillDisappear:(BOOL)animated{ UIBarButtonItem *backButton = [[UIBarButtonItem alloc] - initWithTitle: [MWMessage forKey:@login-title].text + initWithTitle: [[CommonsApp singleton] getBackButtonString] style: UIBarButtonItemStyleBordered target:nil action: nil]; -- To view, visit https://gerrit.wikimedia.org/r/88168 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieac074ed44902349613239fddb733ff33b960eed Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Scrolling details up no longer hides nav bar. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Scrolling details up no longer hides nav bar. .. Scrolling details up no longer hides nav bar. This keeps the upload button onscreen. Change-Id: Ia46d440558ec6c6d0710cdb617445c2aa5ca7e34 --- M Commons-iOS/DetailScrollViewController.m 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index 66dbddf..8af7afb 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -303,7 +303,7 @@ // (needed if details pushed another view controller while details was scrolled so far up that // it had caused the nav bar to be hidden - without this extra call to makeNavBarRunAwayFromDetails // here, when that pushed view gets popped, the nav would overlap the details) -[self makeNavBarRunAwayFromDetails]; +//[self makeNavBarRunAwayFromDetails]; } -(void)viewDidAppear:(BOOL)animated @@ -1561,7 +1561,7 @@ float scrollValue = self.view.frame.origin.y / (height - DETAIL_DOCK_DISTANCE_FROM_BOTTOM); -[self makeNavBarRunAwayFromDetails]; +//[self makeNavBarRunAwayFromDetails]; float minChangeToReport = 0.025f; if (fabsf((scrollValue - lastScrollValue)) minChangeToReport) { -- To view, visit https://gerrit.wikimedia.org/r/88167 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia46d440558ec6c6d0710cdb617445c2aa5ca7e34 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made category hamburger a bit lighter and taller for better ... - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Made category hamburger a bit lighter and taller for better contrast. .. Made category hamburger a bit lighter and taller for better contrast. Change-Id: I339a3ef21d957e7dee7781eb90f6b17ff9de88b6 --- M Commons-iOS/categoryHamburger.png 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/categoryHamburger.png b/Commons-iOS/categoryHamburger.png index 9445b88..a0a6953 100644 --- a/Commons-iOS/categoryHamburger.png +++ b/Commons-iOS/categoryHamburger.png Binary files differ -- To view, visit https://gerrit.wikimedia.org/r/88172 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I339a3ef21d957e7dee7781eb90f6b17ff9de88b6 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made text box not underlap nav bar when keyboard appears. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Made text box not underlap nav bar when keyboard appears. .. Made text box not underlap nav bar when keyboard appears. Needed based on previous commit which leaves nav bar in place when details is scrolled to top. Change-Id: I10fd0e6e16a925bd1bef8c24d0dd9dafce1aa419 --- M Commons-iOS/DetailScrollViewController.m M Commons-iOS/ImageScrollViewController.m 2 files changed, 6 insertions(+), 46 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index 8af7afb..9e3b7f0 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -298,12 +298,6 @@ if(!self.selectedRecord.complete.boolValue){ [self addNavBarBackgroundViewForTouchDetection]; } - -// Ensure nav bar isn't being underlapped by details -// (needed if details pushed another view controller while details was scrolled so far up that -// it had caused the nav bar to be hidden - without this extra call to makeNavBarRunAwayFromDetails -// here, when that pushed view gets popped, the nav would overlap the details) -//[self makeNavBarRunAwayFromDetails]; } -(void)viewDidAppear:(BOOL)animated @@ -328,7 +322,6 @@ [super viewWillDisappear:animated]; // Ensure the nav bar is visible -// (needed because makeNavBarRunAwayFromDetails method could have hidden the nav bar) [self.navigationController setNavigationBarHidden:NO animated:NO]; } @@ -774,34 +767,9 @@ self.delegate.navigationItem.prompt = nil; } --(void)makeNavBarRunAwayFromDetails -{ -// Calling setNavigationBarHidden: below causes subviews to be laid out. If the view was being -// dragged when this method is called this will cause the layout system to use the last value it -// had for self.viewTopConstraint.constant, which, during drag, doesn't get updated until the drag -// ends, so the pre-drag value is seen and the layout system makes self.view jump down to this -// position, which is not what we want at all. To prevent this, update self.viewTopConstraint.constant -// here. See the note in handleDetailsPan: concerning updating self.viewTopConstraint.constant -// for more details about the issue. (To reproduce the bug, use iOS 7, comment out the line below and -// drag the details page slider up until the top of it hits the navigation bar.) -self.viewTopConstraint.constant = self.view.frame.origin.y; - -// Prevent details from underlapping nav bar by hiding nav bar when details scrolled up so -// far that underlap would occur. And when details scrolled back down make nav bar re-appear. -if ([self verticalDistanceFromNavBar] 0.0f) { -if (!self.navigationController.navigationBarHidden) { -[self.navigationController setNavigationBarHidden:YES animated:YES]; -} -}else{ -if (self.navigationController.navigationBarHidden) { -[self.navigationController setNavigationBarHidden:NO animated:YES]; -} -} -} - -(float)verticalDistanceFromNavBar { - return self.view.frame.origin.y - self.navigationController.navigationBar.frame.size.height; + return self.view.frame.origin.y - (self.navigationController.navigationBar.frame.size.height + self.navigationController.navigationBar.frame.origin.y); } @@ -1593,20 +1561,14 @@ // position actively around the keyboard as it moves, other than to just slide // things up a bit when it first appears -float statusBarOffset = [view.superview convertPoint:view.frame.origin toView:self.delegate.view].y; - -// If not iPad return offset for scrolling view beneath the status bar. -// If iPad shift everything down a bit from there. -float offsetForKeyboard = statusBarOffset - ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ? 150.0f : 0.0f); - -return -offsetForKeyboard; +return -(self.view.frame.origin.y - self.navigationController.navigationBar.frame.size.height + [view.superview convertPoint:view.frame.origin toView:self.view].y - self.navigationController.navigationBar.frame.origin.y); } #pragma mark - Details distances -(float)getBottomGapHeight { - return self.delegate.view.bounds.size.height - (self.view.frame.origin.y + self.scrollContainer.frame.size.height);; + return self.delegate.view.bounds.size.height - (self.view.frame.origin.y + self.scrollContainer.frame.size.height); } -(float)tableTopVerticalDistanceFromDelegateViewBottom diff --git a/Commons-iOS/ImageScrollViewController.m b/Commons-iOS/ImageScrollViewController.m index 6ee2775..974207c 100644 --- a/Commons-iOS/ImageScrollViewController.m +++ b/Commons-iOS/ImageScrollViewController.m @@ -108,11
[MediaWiki-commits] [Gerrit] iOS 7 fixes for text field cursor consistency. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: iOS 7 fixes for text field cursor consistency. .. iOS 7 fixes for text field cursor consistency. The spacing was off for the cursor in the description text box. The cursor was also not showing for the login text boxes. Change-Id: I5ef761b1ef927eb2aff1e08c27e8f6771098d4f9 --- M Commons-iOS/AppDelegate.m M Commons-iOS/DetailScrollViewController.m 2 files changed, 9 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/AppDelegate.m b/Commons-iOS/AppDelegate.m index 34218b4..8b0f225 100644 --- a/Commons-iOS/AppDelegate.m +++ b/Commons-iOS/AppDelegate.m @@ -92,6 +92,10 @@ // Set the color of the nav bar and other system icons [[UIApplication sharedApplication] delegate].window.tintColor = [UIColor whiteColor]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; + +// Set the blinky-cursor color for text boxes +[[UITextField appearance] setTintColor:[UIColor colorWithRed:0.00 green:0.49 blue:0.93 alpha:1.0]]; +[[UITextView appearance] setTintColor:[UIColor colorWithRed:0.00 green:0.49 blue:0.93 alpha:1.0]]; } } diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index 52cfb57..7cb309c 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -163,6 +163,11 @@ self.titleTextField.rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 20)]; self.titleTextField.rightViewMode = UITextFieldViewModeAlways; +// Make spacing to left of blinking cursor (iOS 7) consistent with that of the title text field +if ([self.descriptionTextView respondsToSelector:@selector(textContainerInset)]) { +self.descriptionTextView.textContainerInset = UIEdgeInsetsMake(8, 6, 8, 8); +} + self.titleTextField.textColor = DETAIL_EDITABLE_TEXTBOX_TEXT_COLOR; self.descriptionTextView.textColor = DETAIL_EDITABLE_TEXTBOX_TEXT_COLOR; -- To view, visit https://gerrit.wikimedia.org/r/88180 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5ef761b1ef927eb2aff1e08c27e8f6771098d4f9 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduced height of details description text box. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Reduced height of details description text box. .. Reduced height of details description text box. Change-Id: Id5370366239c76be5923a78a55fd2d2fd6cd16ee --- M Commons-iOS/en.lproj/MainStoryboard.storyboard 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/en.lproj/MainStoryboard.storyboard b/Commons-iOS/en.lproj/MainStoryboard.storyboard index 9a04a8e..2d4ba55 100644 --- a/Commons-iOS/en.lproj/MainStoryboard.storyboard +++ b/Commons-iOS/en.lproj/MainStoryboard.storyboard @@ -1236,7 +1236,7 @@ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=ehb-uI-yRM userLabel=Scroll Container -rect key=frame x=0.0 y=0.0 width=320 height=621/ +rect key=frame x=0.0 y=0.0 width=320 height=597/ autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/ subviews view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=jhZ-zd-ki7 userLabel=Title Container @@ -1284,7 +1284,7 @@ /constraints /view view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=ChD-4f-cDJ userLabel=Description Container -rect key=frame x=20 y=125 width=280 height=223/ +rect key=frame x=20 y=125 width=280 height=199/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews label opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left text=Description lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=CZQ-bf-MDt userLabel=Description Label @@ -1294,17 +1294,17 @@ color key=highlightedColor white=1 alpha=1 colorSpace=calibratedWhite/ /label textView opaque=NO clipsSubviews=YES multipleTouchEnabled=YES contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=rwu-hG-Nxi userLabel=Description Text View -rect key=frame x=20 y=49 width=240 height=154/ +rect key=frame x=20 y=49 width=240 height=130/ autoresizingMask key=autoresizingMask widthSizable=YES flexibleMaxY=YES/ color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ constraints -constraint firstAttribute=height constant=154 id=tRZ-n3-B8e/ +constraint firstAttribute=height constant=130 id=tRZ-n3-B8e/ /constraints fontDescription key=fontDescription type=system pointSize=14/ textInputTraits key=textInputTraits autocapitalizationType=sentences/ /textView label hidden=YES opaque=NO clipsSubviews=YES userInteractionEnabled=NO contentMode=left horizontalHuggingPriority=251 verticalHuggingPriority=251 text=Label lineBreakMode=wordWrap numberOfLines=0 baselineAdjustment=alignBaselines adjustsFontSizeToFit=NO preferredMaxLayoutWidth=240 translatesAutoresizingMaskIntoConstraints=NO id=aaw-cf-MZE userLabel=Description Text Label customClass=UILabelDynamicHeight -rect key=frame x=20 y=49 width=240 height=154/ +rect key=frame x=20 y=49 width=240 height=130/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ fontDescription key=fontDescription type=system pointSize=14/ color key=textColor white=1 alpha=1 colorSpace=calibratedWhite/ @@ -1337,7 +1337,7 @@
[MediaWiki-commits] [Gerrit] Fix for improper call to super method. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for improper call to super method. .. Fix for improper call to super method. Change-Id: I0fee10d5a80b7d576b5570a66afb409cf6d92794 --- M Commons-iOS/ImageScrollViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/ImageScrollViewController.m b/Commons-iOS/ImageScrollViewController.m index feff553..e391dbd 100644 --- a/Commons-iOS/ImageScrollViewController.m +++ b/Commons-iOS/ImageScrollViewController.m @@ -91,7 +91,7 @@ } -(void)viewDidLayoutSubviews{ -[super viewWillLayoutSubviews]; +[super viewDidLayoutSubviews]; [self centerScrollViewContents]; } -- To view, visit https://gerrit.wikimedia.org/r/88178 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0fee10d5a80b7d576b5570a66afb409cf6d92794 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made category search dark grey. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Made category search dark grey. .. Made category search dark grey. Disabled the wiki page category links. Need to re-visit. Change-Id: Idbe8936fdec01e5d6e6f0b475be5b91187bf7f18 --- M Commons-iOS/AddCategoryCell.xib M Commons-iOS/CategoryCell.xib M Commons-iOS/CategorySearchTableViewController.m M Commons-iOS/en.lproj/MainStoryboard.storyboard 4 files changed, 94 insertions(+), 346 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/AddCategoryCell.xib b/Commons-iOS/AddCategoryCell.xib index 3842247..8d65318 100644 --- a/Commons-iOS/AddCategoryCell.xib +++ b/Commons-iOS/AddCategoryCell.xib @@ -1,170 +1,31 @@ -?xml version=1.0 encoding=UTF-8? -archive type=com.apple.InterfaceBuilder3.CocoaTouch.XIB version=8.00 - data - int key=IBDocument.SystemTarget1552/int - string key=IBDocument.SystemVersion12E55/string - string key=IBDocument.InterfaceBuilderVersion3084/string - string key=IBDocument.AppKitVersion1187.39/string - string key=IBDocument.HIToolboxVersion626.00/string - object class=NSMutableDictionary key=IBDocument.PluginVersions - string key=NS.key.0com.apple.InterfaceBuilder.IBCocoaTouchPlugin/string - string key=NS.object.02083/string - /object - array key=IBDocument.IntegratedClassDependencies - stringIBProxyObject/string - stringIBUILabel/string - stringIBUITableViewCell/string - /array - array key=IBDocument.PluginDependencies - stringcom.apple.InterfaceBuilder.IBCocoaTouchPlugin/string - /array - object class=NSMutableDictionary key=IBDocument.Metadata - string key=NS.key.0PluginDependencyRecalculationVersion/string - integer value=1 key=NS.object.0/ - /object - array class=NSMutableArray key=IBDocument.RootObjects id=1000 - object class=IBProxyObject id=841351856 - string key=IBProxiedObjectIdentifierIBFilesOwner/string - string key=targetRuntimeIdentifierIBCocoaTouchFramework/string - /object - object class=IBProxyObject id=371349661 - string key=IBProxiedObjectIdentifierIBFirstResponder/string - string key=targetRuntimeIdentifierIBCocoaTouchFramework/string - /object - object class=IBUITableViewCell id=477831162 - reference key=NSNextResponder/ - int key=NSvFlags1280/int - array class=NSMutableArray key=NSSubviews - object class=IBUIView id=212443833 - reference key=NSNextResponder ref=477831162/ - int key=NSvFlags1280/int - array class=NSMutableArray key=NSSubviews - object class=IBUILabel id=585011370 - reference key=NSNextResponder ref=212443833/ - int key=NSvFlags1280/int - string key=NSFrame{{10, 0}, {300, 44}}/string - reference key=NSSuperview ref=212443833/ - reference key=NSWindow/ - bool key=IBUIOpaqueNO/bool - bool key=IBUIClipsSubviewsYES/bool - int key=IBUIContentMode7/int - bool key=IBUIMultipleTouchEnabledYES/bool - string key=targetRuntimeIdentifierIBCocoaTouchFramework/string - string key=IBUITextAdd category.../string - object class=NSColor key=IBUITextColor - int key=NSColorSpace1/int - bytes key=NSRGBMCAwIDAAA/bytes -
[MediaWiki-commits] [Gerrit] Fixed visual artifact with swipe to delete. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Fixed visual artifact with swipe to delete. .. Fixed visual artifact with swipe to delete. Needed to call layoutIfNeeded further up the view hierarchy. Change-Id: Ifa8aa7b93fa3d519127346802f038f70285fd0c6 --- M Commons-iOS/DetailScrollViewController.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/DetailScrollViewController.m b/Commons-iOS/DetailScrollViewController.m index aa4855c..52cfb57 100644 --- a/Commons-iOS/DetailScrollViewController.m +++ b/Commons-iOS/DetailScrollViewController.m @@ -1256,7 +1256,7 @@ delay:0.0f options:UIViewAnimationOptionCurveEaseInOut animations:^{ - [viewAbove.superview layoutIfNeeded]; + [self.view layoutIfNeeded]; } completion:^(BOOL finished){ [self.selectedRecord removeCategory:category]; -- To view, visit https://gerrit.wikimedia.org/r/88179 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa8aa7b93fa3d519127346802f038f70285fd0c6 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/commons Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleared out some table view cruft. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Cleared out some table view cruft. .. Cleared out some table view cruft. Change-Id: Ib98713706997476c4f57482bdf41e9ac5f7e9cf0 --- M Commons-iOS.xcodeproj/project.pbxproj D Commons-iOS/CategoryDetailTableViewController.h D Commons-iOS/CategoryDetailTableViewController.m M Commons-iOS/DetailScrollViewController.h M Commons-iOS/DetailScrollViewController.m M Commons-iOS/en.lproj/MainStoryboard.storyboard 6 files changed, 0 insertions(+), 232 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS.xcodeproj/project.pbxproj b/Commons-iOS.xcodeproj/project.pbxproj index dde04d0..08c706d 100644 --- a/Commons-iOS.xcodeproj/project.pbxproj +++ b/Commons-iOS.xcodeproj/project.pbxproj @@ -327,7 +327,6 @@ D4E0385C16C47B6C00330A7F /* messages-qqq.json in Resources */ = {isa = PBXBuildFile; fileRef = D4E0385B16C47B6C00330A7F /* messages-qqq.json */; }; D4E0385D16C47B6C00330A7F /* messages-qqq.json in Resources */ = {isa = PBXBuildFile; fileRef = D4E0385B16C47B6C00330A7F /* messages-qqq.json */; }; D4E0385E16C47B6C00330A7F /* messages-qqq.json in Resources */ = {isa = PBXBuildFile; fileRef = D4E0385B16C47B6C00330A7F /* messages-qqq.json */; }; - D4E325461739AA3000F7D278 /* CategoryDetailTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D4E325451739AA3000F7D278 /* CategoryDetailTableViewController.m */; }; D4E94E43172E0034CA6D /* messages-rif.json in Resources */ = {isa = PBXBuildFile; fileRef = D4E94E42172E0034CA6D /* messages-rif.json */; }; DC0F63DF16BBB73F0017E63C /* defaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = DC0F63DE16BBB73F0017E63C /* defaults.plist */; }; DC2CB56716B9BD420047977E /* MWNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = DC2CB56616B9BD420047977E /* MWNetworkActivityIndicatorManager.m */; }; @@ -629,8 +628,6 @@ D4E0385216C46FDD00330A7F /* MWI18N.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWI18N.h; path = MWI18N/MWI18N.h; sourceTree = group; }; D4E0385316C46FDD00330A7F /* MWI18N.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MWI18N.m; path = MWI18N/MWI18N.m; sourceTree = group; }; D4E0385B16C47B6C00330A7F /* messages-qqq.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = messages-qqq.json; path = messages/messages-qqq.json; sourceTree = group; }; - D4E325441739AA3000F7D278 /* CategoryDetailTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CategoryDetailTableViewController.h; sourceTree = group; }; - D4E325451739AA3000F7D278 /* CategoryDetailTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CategoryDetailTableViewController.m; sourceTree = group; }; D4E94E42172E0034CA6D /* messages-rif.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = messages-rif.json; path = messages/messages-rif.json; sourceTree = group; }; DC0F63DE16BBB73F0017E63C /* defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = defaults.plist; sourceTree = group; }; DC2CB56516B9BD420047977E /* MWNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWNetworkActivityIndicatorManager.h; path = mwapi/MWNetworkActivityIndicatorManager.h; sourceTree = group; }; @@ -1080,8 +1077,6 @@ D4B1CDFC1721E248008E1B31 /* CategorySearchTableViewController.m */, 0478F8E71731B5E9007D4531 /* WelcomeOverlayView.h */, 0478F8E81731B5EA007D4531 /* WelcomeOverlayView.m */, - D4E325441739AA3000F7D278 /* CategoryDetailTableViewController.h */, - D4E325451739AA3000F7D278 /* CategoryDetailTableViewController.m */, 04F5736D1775408400376C46 /* Gallery Multi-Select */, 04739E02174DC9D800F32D13 /* Getting Started */, ); @@ -1648,7 +1643,6 @@ D4C5B4191720966C00C40532 /* LicenseTableViewController.m in Sources */, D4B1CDFD1721E248008E1B31 /* CategorySearchTableViewController.m in Sources */, 0478F8E91731B5EA007D4531 /* WelcomeOverlayView.m in Sources */, -
[MediaWiki-commits] [Gerrit] Localisation updates from http://translatewiki.net. - change (apps...commons)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/88211 Change subject: Localisation updates from http://translatewiki.net. .. Localisation updates from http://translatewiki.net. Change-Id: Ie1fb111fe3d457e46ce76e16df77c71ac3eb543d --- M Commons-iOS/messages/messages-fi.json M Commons-iOS/messages/messages-it.json M Commons-iOS/messages/messages-ko.json M Commons-iOS/messages/messages-lb.json M Commons-iOS/messages/messages-lv.json M Commons-iOS/messages/messages-mk.json M Commons-iOS/messages/messages-ps.json M Commons-iOS/messages/messages-qqq.json 8 files changed, 50 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/commons refs/changes/11/88211/1 diff --git a/Commons-iOS/messages/messages-fi.json b/Commons-iOS/messages/messages-fi.json index 7a8e774..77db917 100644 --- a/Commons-iOS/messages/messages-fi.json +++ b/Commons-iOS/messages/messages-fi.json @@ -4,6 +4,7 @@ Lliehu, Nike, Olli, +Samoasambia, Silvonen ] }, @@ -11,8 +12,8 @@ contribs-settings-button: Asetukset, contribs-upload-button: Tallenna, contribs-photo-library-button: Kuvat, -contribs-state-queued: Jonossa, -contribs-state-uploading: Tallennetaan, +contribs-state-queued: $1 jonossa, +contribs-state-uploading: $1 tallennetaan kuvaa, contribs-refresh: P\u00e4ivit\u00e4 vet\u00e4m\u00e4ll\u00e4, contribs-refreshing: P\u00e4ivitet\u00e4\u00e4n..., error-upload-failed: Tallennus ep\u00e4onnistui., @@ -34,6 +35,7 @@ settings-debug-detail: Tallennetaan sivustolle $1, settings-usage-reports-label: K\u00e4ytt\u00f6raportit:, settings-usage-reports-description: L\u00e4het\u00e4 k\u00e4ytt\u00f6raportteja Wikimediaan auttaaksesi meit\u00e4 t\u00e4m\u00e4n ohjelman kehityksess\u00e4., +settings-links-label: Linkit:, details-title: Tiedot, details-upload-button: Tallenna, details-title-label: Aihe, @@ -52,6 +54,7 @@ web-cancel: Peru, login-title: Tili, login-button: Kirjaudu sis\u00e4\u00e4n, +logout-button: Kirjaudu ulos, about-title: Tietoja, about-app-version-label: Versio $1, about-commons-button: Wikimedia Commons, @@ -75,5 +78,12 @@ catdetail-remove-label: Poista $1, catdetail-info-intro: Lis\u00e4tietoja, catdetail-info-label: Lis\u00e4tietoja luokista, -catdetail-info-url: https://commons.m.wikimedia.org/wiki/Commons:Categories; +catdetail-info-url: https://commons.m.wikimedia.org/wiki/Commons:Categories;, +catadd-title: Lis\u00e4\u00e4 luokka, +catadd-search-placeholder: Etsi luokkia, +getting-started-yes-button: Kyll\u00e4!, +picture-of-day-label: Wikimedia Commons\nP\u00e4iv\u00e4n kuva, +picture-of-day-author: Tekij\u00e4:, +picture-of-day-menu-title: P\u00e4iv\u00e4n kuva, +picture-of-day-license-button: Lisenssi } \ No newline at end of file diff --git a/Commons-iOS/messages/messages-it.json b/Commons-iOS/messages/messages-it.json index b2f18a5..19d6ffa 100644 --- a/Commons-iOS/messages/messages-it.json +++ b/Commons-iOS/messages/messages-it.json @@ -2,11 +2,12 @@ @metadata: { authors: [ Beta16, +Raoli, Una giornata uggiosa '94, Wim b ] }, -contribs-title: I miei caricamenti, +contribs-title: caricamenti, contribs-settings-button: Impostazioni, contribs-upload-button: Carica, contribs-photo-library-button: Foto, diff --git a/Commons-iOS/messages/messages-ko.json b/Commons-iOS/messages/messages-ko.json index 8d56c16..d8029d6 100644 --- a/Commons-iOS/messages/messages-ko.json +++ b/Commons-iOS/messages/messages-ko.json @@ -62,7 +62,7 @@ about-app-version-label: \ubc84\uc804 $1, about-commons-button: \uc704\ud0a4\ubbf8\ub514\uc5b4 \uacf5\uc6a9, about-bugs-button: \ubc84\uadf8 \ucd94\uc801\uae30, -about-privacy-button: \uac1c\uc778\uc815\ubcf4 \uc815\ucc45, +about-privacy-button: \uac1c\uc778 \uc815\ubcf4 \uc815\ucc45, about-source-button: \uc18c\uc2a4, about-source-this-app-title: \uc774 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 (iOS):, about-source-this-app-contributors: \uae30\uc5ec\uc790, diff --git a/Commons-iOS/messages/messages-lb.json b/Commons-iOS/messages/messages-lb.json index 59a79ad..16b5bf7 100644 --- a/Commons-iOS/messages/messages-lb.json +++ b/Commons-iOS/messages/messages-lb.json @@ -1,7 +1,8 @@ { @metadata: { authors: [ -Robby +Robby, +Soued031 ] }, contribs-title: Meng eropgeluede Fichieren, @@ -86,7 +87,7 @@ getting-started-what-is-commons-contribute-label: Maacht mat mat \u00c4re Biller. H\u00eblleft Wikipedia-Artikele m\u00e9i lieweg ze maachen!, getting-started-what-is-commons-images-label: Biller op Wikipedia
[MediaWiki-commits] [Gerrit] Localisation updates from http://translatewiki.net. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Localisation updates from http://translatewiki.net. .. Localisation updates from http://translatewiki.net. Change-Id: I4d82365a8cb1baf56739ddc31f08f162b19fc1e9 --- M Commons-iOS/messages/messages-de.json M Commons-iOS/messages/messages-fr.json M Commons-iOS/messages/messages-gl.json M Commons-iOS/messages/messages-it.json M Commons-iOS/messages/messages-ja.json M Commons-iOS/messages/messages-ko.json M Commons-iOS/messages/messages-lb.json M Commons-iOS/messages/messages-qqq.json M Commons-iOS/messages/messages-ru.json M Commons-iOS/messages/messages-sv.json M Commons-iOS/messages/messages-uk.json M Commons-iOS/messages/messages-vi.json M Commons-iOS/messages/messages-zh-hans.json 13 files changed, 39 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/messages/messages-de.json b/Commons-iOS/messages/messages-de.json index bb94a2c..f6d749f 100644 --- a/Commons-iOS/messages/messages-de.json +++ b/Commons-iOS/messages/messages-de.json @@ -37,7 +37,10 @@ settings-debug-detail: Auf $1 hochladen, settings-usage-reports-label: Nutzungsberichte:, settings-usage-reports-description: Nutzungsberichte an Wikimedia senden, um zur Verbesserung der App beizutragen., +settings-usage-reports-send-button: Senden, +settings-usage-reports-dont-send-button: Nicht senden, settings-links-label: Links:, +settings-source-label: Quelle:, details-title: Einzelheiten, details-nav-prompt: Beschreiben und hochladen, details-upload-button: Hochladen, diff --git a/Commons-iOS/messages/messages-fr.json b/Commons-iOS/messages/messages-fr.json index 95279b0..7990dcc 100644 --- a/Commons-iOS/messages/messages-fr.json +++ b/Commons-iOS/messages/messages-fr.json @@ -37,7 +37,10 @@ settings-debug-detail: T\u00e9l\u00e9chargement vers $1, settings-usage-reports-label: Rapports d'utilisation :, settings-usage-reports-description: Envoyer les rapports d\u2019utilisation \u00e0 Wikim\u00e9dia pour nous aider \u00e0 am\u00e9liorer l\u2019application., +settings-usage-reports-send-button: Envoyer, +settings-usage-reports-dont-send-button: Ne pas envoyer, settings-links-label: Liens :, +settings-source-label: Source :, details-title: D\u00e9tails, details-nav-prompt: D\u00e9crire et importer, details-upload-button: T\u00e9l\u00e9charger, diff --git a/Commons-iOS/messages/messages-gl.json b/Commons-iOS/messages/messages-gl.json index 806107f..2f5 100644 --- a/Commons-iOS/messages/messages-gl.json +++ b/Commons-iOS/messages/messages-gl.json @@ -34,7 +34,10 @@ settings-debug-detail: Cargando en $1, settings-usage-reports-label: Informes de uso:, settings-usage-reports-description: Enviar informes de uso \u00e1 Wikimedia para axudar a mellorar a aplicaci\u00f3n., +settings-usage-reports-send-button: Enviar, +settings-usage-reports-dont-send-button: Non enviar, settings-links-label: Ligaz\u00f3ns:, +settings-source-label: Fonte:, details-title: Detalles, details-nav-prompt: Describir e cargar, details-upload-button: Cargar, diff --git a/Commons-iOS/messages/messages-it.json b/Commons-iOS/messages/messages-it.json index 19d6ffa..0c9ab35 100644 --- a/Commons-iOS/messages/messages-it.json +++ b/Commons-iOS/messages/messages-it.json @@ -37,7 +37,10 @@ settings-debug-detail: Caricamento su $1, settings-usage-reports-label: Report di utilizzo:, settings-usage-reports-description: Invia report sull'utilizzo a Wikimedia per aiutarci a migliorare l'app., +settings-usage-reports-send-button: Invia, +settings-usage-reports-dont-send-button: Non inviare, settings-links-label: Link:, +settings-source-label: Fonte:, details-title: Dettagli, details-nav-prompt: Descrivi e carica, details-upload-button: Carica, diff --git a/Commons-iOS/messages/messages-ja.json b/Commons-iOS/messages/messages-ja.json index e9a3037..7f7e099 100644 --- a/Commons-iOS/messages/messages-ja.json +++ b/Commons-iOS/messages/messages-ja.json @@ -35,6 +35,8 @@ settings-debug-detail: $1 \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u4e2d, settings-usage-reports-label: \u4f7f\u7528\u72b6\u6cc1\u306e\u5831\u544a:, settings-usage-reports-description: \u30a2\u30d7\u30ea\u306e\u6539\u5584\u3092\u652f\u63f4\u3059\u308b\u305f\u3081\u306b\u3001\u4f7f\u7528\u72b6\u6cc1\u306e\u5831\u544a\u3092\u30a6\u30a3\u30ad\u30e1\u30c7\u30a3\u30a2\u306b\u9001\u4fe1\u3057\u307e\u3059\u3002, +settings-usage-reports-send-button: \u9001\u4fe1, +settings-usage-reports-dont-send-button: \u9001\u4fe1\u3057\u306a\u3044, settings-links-label: \u30ea\u30f3\u30af:, details-title: \u8a73\u7d30, details-upload-button: \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9, diff --git
[MediaWiki-commits] [Gerrit] Localisation updates from http://translatewiki.net. - change (apps...commons)
Brion VIBBER has submitted this change and it was merged. Change subject: Localisation updates from http://translatewiki.net. .. Localisation updates from http://translatewiki.net. Change-Id: Ie1fb111fe3d457e46ce76e16df77c71ac3eb543d --- M Commons-iOS/messages/messages-fi.json M Commons-iOS/messages/messages-it.json M Commons-iOS/messages/messages-ko.json M Commons-iOS/messages/messages-lb.json M Commons-iOS/messages/messages-lv.json M Commons-iOS/messages/messages-mk.json M Commons-iOS/messages/messages-ps.json M Commons-iOS/messages/messages-qqq.json 8 files changed, 50 insertions(+), 16 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Commons-iOS/messages/messages-fi.json b/Commons-iOS/messages/messages-fi.json index 7a8e774..77db917 100644 --- a/Commons-iOS/messages/messages-fi.json +++ b/Commons-iOS/messages/messages-fi.json @@ -4,6 +4,7 @@ Lliehu, Nike, Olli, +Samoasambia, Silvonen ] }, @@ -11,8 +12,8 @@ contribs-settings-button: Asetukset, contribs-upload-button: Tallenna, contribs-photo-library-button: Kuvat, -contribs-state-queued: Jonossa, -contribs-state-uploading: Tallennetaan, +contribs-state-queued: $1 jonossa, +contribs-state-uploading: $1 tallennetaan kuvaa, contribs-refresh: P\u00e4ivit\u00e4 vet\u00e4m\u00e4ll\u00e4, contribs-refreshing: P\u00e4ivitet\u00e4\u00e4n..., error-upload-failed: Tallennus ep\u00e4onnistui., @@ -34,6 +35,7 @@ settings-debug-detail: Tallennetaan sivustolle $1, settings-usage-reports-label: K\u00e4ytt\u00f6raportit:, settings-usage-reports-description: L\u00e4het\u00e4 k\u00e4ytt\u00f6raportteja Wikimediaan auttaaksesi meit\u00e4 t\u00e4m\u00e4n ohjelman kehityksess\u00e4., +settings-links-label: Linkit:, details-title: Tiedot, details-upload-button: Tallenna, details-title-label: Aihe, @@ -52,6 +54,7 @@ web-cancel: Peru, login-title: Tili, login-button: Kirjaudu sis\u00e4\u00e4n, +logout-button: Kirjaudu ulos, about-title: Tietoja, about-app-version-label: Versio $1, about-commons-button: Wikimedia Commons, @@ -75,5 +78,12 @@ catdetail-remove-label: Poista $1, catdetail-info-intro: Lis\u00e4tietoja, catdetail-info-label: Lis\u00e4tietoja luokista, -catdetail-info-url: https://commons.m.wikimedia.org/wiki/Commons:Categories; +catdetail-info-url: https://commons.m.wikimedia.org/wiki/Commons:Categories;, +catadd-title: Lis\u00e4\u00e4 luokka, +catadd-search-placeholder: Etsi luokkia, +getting-started-yes-button: Kyll\u00e4!, +picture-of-day-label: Wikimedia Commons\nP\u00e4iv\u00e4n kuva, +picture-of-day-author: Tekij\u00e4:, +picture-of-day-menu-title: P\u00e4iv\u00e4n kuva, +picture-of-day-license-button: Lisenssi } \ No newline at end of file diff --git a/Commons-iOS/messages/messages-it.json b/Commons-iOS/messages/messages-it.json index b2f18a5..19d6ffa 100644 --- a/Commons-iOS/messages/messages-it.json +++ b/Commons-iOS/messages/messages-it.json @@ -2,11 +2,12 @@ @metadata: { authors: [ Beta16, +Raoli, Una giornata uggiosa '94, Wim b ] }, -contribs-title: I miei caricamenti, +contribs-title: caricamenti, contribs-settings-button: Impostazioni, contribs-upload-button: Carica, contribs-photo-library-button: Foto, diff --git a/Commons-iOS/messages/messages-ko.json b/Commons-iOS/messages/messages-ko.json index 8d56c16..d8029d6 100644 --- a/Commons-iOS/messages/messages-ko.json +++ b/Commons-iOS/messages/messages-ko.json @@ -62,7 +62,7 @@ about-app-version-label: \ubc84\uc804 $1, about-commons-button: \uc704\ud0a4\ubbf8\ub514\uc5b4 \uacf5\uc6a9, about-bugs-button: \ubc84\uadf8 \ucd94\uc801\uae30, -about-privacy-button: \uac1c\uc778\uc815\ubcf4 \uc815\ucc45, +about-privacy-button: \uac1c\uc778 \uc815\ubcf4 \uc815\ucc45, about-source-button: \uc18c\uc2a4, about-source-this-app-title: \uc774 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 (iOS):, about-source-this-app-contributors: \uae30\uc5ec\uc790, diff --git a/Commons-iOS/messages/messages-lb.json b/Commons-iOS/messages/messages-lb.json index 59a79ad..16b5bf7 100644 --- a/Commons-iOS/messages/messages-lb.json +++ b/Commons-iOS/messages/messages-lb.json @@ -1,7 +1,8 @@ { @metadata: { authors: [ -Robby +Robby, +Soued031 ] }, contribs-title: Meng eropgeluede Fichieren, @@ -86,7 +87,7 @@ getting-started-what-is-commons-contribute-label: Maacht mat mat \u00c4re Biller. H\u00eblleft Wikipedia-Artikele m\u00e9i lieweg ze maachen!, getting-started-what-is-commons-images-label: Biller op Wikipedia komme vu Wikimedia Commons,
[MediaWiki-commits] [Gerrit] Localisation updates from http://translatewiki.net. - change (apps...commons)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/88212 Change subject: Localisation updates from http://translatewiki.net. .. Localisation updates from http://translatewiki.net. Change-Id: I4d82365a8cb1baf56739ddc31f08f162b19fc1e9 --- M Commons-iOS/messages/messages-de.json M Commons-iOS/messages/messages-fr.json M Commons-iOS/messages/messages-gl.json M Commons-iOS/messages/messages-it.json M Commons-iOS/messages/messages-ja.json M Commons-iOS/messages/messages-ko.json M Commons-iOS/messages/messages-lb.json M Commons-iOS/messages/messages-qqq.json M Commons-iOS/messages/messages-ru.json M Commons-iOS/messages/messages-sv.json M Commons-iOS/messages/messages-uk.json M Commons-iOS/messages/messages-vi.json M Commons-iOS/messages/messages-zh-hans.json 13 files changed, 39 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/commons refs/changes/12/88212/1 diff --git a/Commons-iOS/messages/messages-de.json b/Commons-iOS/messages/messages-de.json index bb94a2c..f6d749f 100644 --- a/Commons-iOS/messages/messages-de.json +++ b/Commons-iOS/messages/messages-de.json @@ -37,7 +37,10 @@ settings-debug-detail: Auf $1 hochladen, settings-usage-reports-label: Nutzungsberichte:, settings-usage-reports-description: Nutzungsberichte an Wikimedia senden, um zur Verbesserung der App beizutragen., +settings-usage-reports-send-button: Senden, +settings-usage-reports-dont-send-button: Nicht senden, settings-links-label: Links:, +settings-source-label: Quelle:, details-title: Einzelheiten, details-nav-prompt: Beschreiben und hochladen, details-upload-button: Hochladen, diff --git a/Commons-iOS/messages/messages-fr.json b/Commons-iOS/messages/messages-fr.json index 95279b0..7990dcc 100644 --- a/Commons-iOS/messages/messages-fr.json +++ b/Commons-iOS/messages/messages-fr.json @@ -37,7 +37,10 @@ settings-debug-detail: T\u00e9l\u00e9chargement vers $1, settings-usage-reports-label: Rapports d'utilisation :, settings-usage-reports-description: Envoyer les rapports d\u2019utilisation \u00e0 Wikim\u00e9dia pour nous aider \u00e0 am\u00e9liorer l\u2019application., +settings-usage-reports-send-button: Envoyer, +settings-usage-reports-dont-send-button: Ne pas envoyer, settings-links-label: Liens :, +settings-source-label: Source :, details-title: D\u00e9tails, details-nav-prompt: D\u00e9crire et importer, details-upload-button: T\u00e9l\u00e9charger, diff --git a/Commons-iOS/messages/messages-gl.json b/Commons-iOS/messages/messages-gl.json index 806107f..2f5 100644 --- a/Commons-iOS/messages/messages-gl.json +++ b/Commons-iOS/messages/messages-gl.json @@ -34,7 +34,10 @@ settings-debug-detail: Cargando en $1, settings-usage-reports-label: Informes de uso:, settings-usage-reports-description: Enviar informes de uso \u00e1 Wikimedia para axudar a mellorar a aplicaci\u00f3n., +settings-usage-reports-send-button: Enviar, +settings-usage-reports-dont-send-button: Non enviar, settings-links-label: Ligaz\u00f3ns:, +settings-source-label: Fonte:, details-title: Detalles, details-nav-prompt: Describir e cargar, details-upload-button: Cargar, diff --git a/Commons-iOS/messages/messages-it.json b/Commons-iOS/messages/messages-it.json index 19d6ffa..0c9ab35 100644 --- a/Commons-iOS/messages/messages-it.json +++ b/Commons-iOS/messages/messages-it.json @@ -37,7 +37,10 @@ settings-debug-detail: Caricamento su $1, settings-usage-reports-label: Report di utilizzo:, settings-usage-reports-description: Invia report sull'utilizzo a Wikimedia per aiutarci a migliorare l'app., +settings-usage-reports-send-button: Invia, +settings-usage-reports-dont-send-button: Non inviare, settings-links-label: Link:, +settings-source-label: Fonte:, details-title: Dettagli, details-nav-prompt: Descrivi e carica, details-upload-button: Carica, diff --git a/Commons-iOS/messages/messages-ja.json b/Commons-iOS/messages/messages-ja.json index e9a3037..7f7e099 100644 --- a/Commons-iOS/messages/messages-ja.json +++ b/Commons-iOS/messages/messages-ja.json @@ -35,6 +35,8 @@ settings-debug-detail: $1 \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u4e2d, settings-usage-reports-label: \u4f7f\u7528\u72b6\u6cc1\u306e\u5831\u544a:, settings-usage-reports-description: \u30a2\u30d7\u30ea\u306e\u6539\u5584\u3092\u652f\u63f4\u3059\u308b\u305f\u3081\u306b\u3001\u4f7f\u7528\u72b6\u6cc1\u306e\u5831\u544a\u3092\u30a6\u30a3\u30ad\u30e1\u30c7\u30a3\u30a2\u306b\u9001\u4fe1\u3057\u307e\u3059\u3002, +settings-usage-reports-send-button: \u9001\u4fe1, +settings-usage-reports-dont-send-button: \u9001\u4fe1\u3057\u306a\u3044, settings-links-label: \u30ea\u30f3\u30af:, details-title: \u8a73\u7d30, details-upload-button:
[MediaWiki-commits] [Gerrit] Barebones Wikipedia Zero support for FFOS. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Barebones Wikipedia Zero support for FFOS. .. Barebones Wikipedia Zero support for FFOS. * This gets us by for some future state. * It alerts the user at app startup if Wikipedia Zero is on. * It also updates the search bar. * Finally, it tries to account for app quiesce and not overly prompt. * In rebooted app we would do radio and some sort of header inspection. Change-Id: I60c7c408a0e01b81e9d0fe2108de0138804e7b74 --- M app.appcache M js/lib/chrome.js M js/lib/menu.js M manifest.webapp M messages/messages-ast.properties M messages/messages-br.properties M messages/messages-ca.properties M messages/messages-cs.properties M messages/messages-cy.properties M messages/messages-de.properties M messages/messages-en.properties M messages/messages-es.properties M messages/messages-fa.properties M messages/messages-fr.properties M messages/messages-he.properties M messages/messages-hsb.properties M messages/messages-lb.properties M messages/messages-mk.properties M messages/messages-nl.properties M messages/messages-ro.properties M messages/messages-ru.properties M messages/messages-sv.properties M messages/messages-uk.properties M messages/messages-vi.properties 24 files changed, 83 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/app.appcache b/app.appcache index dcf805c..43c11c0 100644 --- a/app.appcache +++ b/app.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# Wed Mar 19 22:41:08 UTC 2014 +# Wed Mar 26 01:05:53 UTC 2014 index.html 404.html AUTHORS diff --git a/js/lib/chrome.js b/js/lib/chrome.js index f2bce57..b16ecff 100644 --- a/js/lib/chrome.js +++ b/js/lib/chrome.js @@ -202,7 +202,66 @@ } function loadFirstPage() { - var lastReadPage = localStorage[lastReadPage]; + var lastReadPage = localStorage[lastReadPage], + + /* +We'll check one time here if it's Wikipedia Zero. +It's possible the Wikipedia app for FFOS will have +been shutdown due to general system memory constraints. +So we may check sometimes more than we want. +But we do have to check in that case. The alternative +would be to not check, which would be wrong. +To mitigate this, we'll reduce checks if Wikipedia +Zero was known to be on within the last 15 minutes. +One downside is users who actively quiesce the app +won't get the prompt, but that's a tradeoff we'll accept, +as we have evidence of app quiesce from Mozilla Bugzilla, +whereas active quiesce in FFOS in practice is unresearched. +Now, as we retain the last page visited, the user +may not even notice that the app was shutdown. So +even though we may make an extra check in this post- +quiesced state, we shouldn't prompt the user more +than necessary. In a reboot of this app, we'd have +more visual polish (e.g., colorized UI) to make it +more obvious, but this is a simpler approach for now. + */ + + lang = preferencesDB.get('language') || 'en', + wikipediaZeroMessageUrl = window.PROTOCOL + '://' + lang + '.m.' + window.PROJECTNAME + '.org/w/api.php?action=zeroconfigtype=messageagent=ffos-wikipedia', + wikipediaZeroShownDateTime = localStorage['wikipediaZeroShownDateTime'], + dateDifference, + showZeroInSearch = function() { $('#searchParam').attr('placeholder', mw.msg('zero-search-hint' ).toString()); }; + + if (wikipediaZeroShownDateTime) { + dateDifference = Date.now() - wikipediaZeroShownDateTime; + } + + if (dateDifference dateDifference 1000 * 60 * 15) { + /* + Allow the page load time to start before changing searchbar. + The Ajax else{} below does so by its own nature. + */ + setTimeout( function() { showZeroInSearch(); }, 200) + } else { + /* More than 15 minutes has passed since W0 on, or W0 was never on. */ + $.ajax({ + url: wikipediaZeroMessageUrl, + dataType: 'jsonp', + success: function(json) { + if(json json.message) { + showZeroInSearch(); + localStorage['wikipediaZeroShownDateTime'] = Date.now(); +
[MediaWiki-commits] [Gerrit] Up the version for the Settings - About screen and manifest. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Up the version for the Settings - About screen and manifest. .. Up the version for the Settings - About screen and manifest. Change-Id: I1dcf6e66e779319ab9c047f07a32d479a588ea0a --- M app.appcache M js/lib/menu.js M manifest.webapp 3 files changed, 4 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/app.appcache b/app.appcache index 66190b6..dcf805c 100644 --- a/app.appcache +++ b/app.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# Wed Mar 19 17:18:24 UTC 2014 +# Wed Mar 19 22:41:08 UTC 2014 index.html 404.html AUTHORS diff --git a/js/lib/menu.js b/js/lib/menu.js index 7c06a4e..f4be605 100644 --- a/js/lib/menu.js +++ b/js/lib/menu.js @@ -14,7 +14,8 @@ } function getAboutVersionString() { - return 3.2.1; + /* window.navigator.mozApps.getSelf() turned out to be problematic here */ + return 3.2.6; } var menu_items = [ diff --git a/manifest.webapp b/manifest.webapp index 9cc7cf4..568a129 100644 --- a/manifest.webapp +++ b/manifest.webapp @@ -1,5 +1,5 @@ { - version: 0.5, + version: 3.2.6, name: Wikipedia, description: Wikipedia Mobile for Firefox OS, launch_path: /WikipediaMobileFirefoxOS/, -- To view, visit https://gerrit.wikimedia.org/r/119652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1dcf6e66e779319ab9c047f07a32d479a588ea0a Gerrit-PatchSet: 1 Gerrit-Project: apps/firefox/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Fix explosion on calling static WebView method - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122545 Change subject: [Gingerbread] Fix explosion on calling static WebView method .. [Gingerbread] Fix explosion on calling static WebView method For some reason checking the version isn't enough for a static class method? Use reflection to call the debug setting method. Change-Id: I5d776348379b5e7f719f3661f94ac0e78bbc8a9b --- M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 1 file changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/45/122545/1 diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 83b80a3..c0b4907 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -7,6 +7,7 @@ import android.net.*; import android.os.*; import android.preference.*; +import android.util.Log; import android.webkit.*; import com.squareup.otto.*; import org.acra.*; @@ -21,6 +22,8 @@ import org.wikipedia.pageimages.*; import org.wikipedia.savedpages.*; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.*; @@ -78,7 +81,21 @@ // Enable debugging on the webview if(Build.VERSION.SDK_INT = Build.VERSION_CODES.KITKAT) { -WebView.setWebContentsDebuggingEnabled(true); +// Even though we have a check above, using a static method like this +// kills our class on 2.3 unless we jump through some reflection hoops. +try { +Method setWebContentsDebuggingEnabled = WebView.class.getMethod(setWebContentsDebuggingEnabled, boolean.class); +setWebContentsDebuggingEnabled.invoke(WebView.class, new Object[] {true}); +} catch (NoSuchMethodException e) { +// This shouldn't happen +e.printStackTrace(); +} catch (InvocationTargetException e) { +// This shouldn't happen either +e.printStackTrace(); +} catch (IllegalAccessException e) { +// This shouldn't happen, really I swear +e.printStackTrace(); +} } Api.setConnectionFactory(new OkHttpConnectionFactory(this)); -- To view, visit https://gerrit.wikimedia.org/r/122545 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d776348379b5e7f719f3661f94ac0e78bbc8a9b Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Workaround for SaneAsyncTask: no executeOnExec... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122548 Change subject: [Gingerbread] Workaround for SaneAsyncTask: no executeOnExecutor .. [Gingerbread] Workaround for SaneAsyncTask: no executeOnExecutor This may not properly parallelize things. Change-Id: I42231c7152b97a7676b7192e3c1b0ac8433b99d4 --- M wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/48/122548/1 diff --git a/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java b/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java index 18f62e7..21c039d 100644 --- a/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java +++ b/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java @@ -73,7 +73,12 @@ * Start performing the task on the executor specified. */ public void execute() { -underlyingTask.executeOnExecutor(executor); +if (Build.VERSION.SDK_INT = Build.VERSION_CODES.HONEYCOMB) { +underlyingTask.executeOnExecutor(executor); +} else { +// May or may not actually parallelize as expected +underlyingTask.execute(); +} } /** -- To view, visit https://gerrit.wikimedia.org/r/122548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42231c7152b97a7676b7192e3c1b0ac8433b99d4 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Can't use ?attr/selectableItemBackground until... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122546 Change subject: [Gingerbread] Can't use ?attr/selectableItemBackground until v11 .. [Gingerbread] Can't use ?attr/selectableItemBackground until v11 Moving it to a 'SelectableItem' style which can be used on any item Change-Id: Ia251d9792deeb546a54bb72283b03875308f07e7 --- M wikipedia/res/layout/fragment_navdrawer.xml M wikipedia/res/layout/fragment_search.xml M wikipedia/res/layout/group_load_more.xml M wikipedia/res/values/styles.xml 4 files changed, 16 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/46/122546/1 diff --git a/wikipedia/res/layout/fragment_navdrawer.xml b/wikipedia/res/layout/fragment_navdrawer.xml index ab35118..4b913cc 100644 --- a/wikipedia/res/layout/fragment_navdrawer.xml +++ b/wikipedia/res/layout/fragment_navdrawer.xml @@ -14,7 +14,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_login - android:background=?android:attr/selectableItemBackground + style=SelectableItem android:paddingTop=8dp android:paddingBottom=8dp android:paddingRight=8dp @@ -88,7 +88,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_my_contributions - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp @@ -108,7 +108,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_history - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp @@ -128,7 +128,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_saved_pages - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp @@ -148,7 +148,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_random - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp @@ -192,7 +192,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_settings - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp @@ -212,7 +212,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_send_feedback - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp @@ -231,7 +231,7 @@ android:layout_height=wrap_content android:orientation=horizontal android:id=@+id/nav_item_logout - android:background=?android:attr/selectableItemBackground + style=SelectableItem ImageView android:layout_width=24dp android:layout_height=24dp android:layout_margin=12dp diff --git a/wikipedia/res/layout/fragment_search.xml b/wikipedia/res/layout/fragment_search.xml index 013b4f4..612f4a3 100644 --- a/wikipedia/res/layout/fragment_search.xml +++ b/wikipedia/res/layout/fragment_search.xml @@ -16,7 +16,7 @@ LinearLayout android:id=@+id/search_bar_icon
[MediaWiki-commits] [Gerrit] [Gingerbread] Update the manifest to build for Android 2.3 (... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122543 Change subject: [Gingerbread] Update the manifest to build for Android 2.3 (API level 9) .. [Gingerbread] Update the manifest to build for Android 2.3 (API level 9) Stuff crashes! This series of patches is work in progress... Change-Id: I9ec75f61aeda0d145c67a65cb62ff3cfbf7ed5f0 --- M wikipedia/AndroidManifest.xml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/43/122543/1 diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml index 483670e..f5e63f8 100644 --- a/wikipedia/AndroidManifest.xml +++ b/wikipedia/AndroidManifest.xml @@ -5,7 +5,7 @@ android:versionName=2.0-alpha-2014-03-26 uses-sdk -android:minSdkVersion=14 +android:minSdkVersion=9 android:targetSdkVersion=17 / uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_NETWORK_STATE / -- To view, visit https://gerrit.wikimedia.org/r/122543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ec75f61aeda0d145c67a65cb62ff3cfbf7ed5f0 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Work around lack of ColorDrawable.getColor - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122547 Change subject: [Gingerbread] Work around lack of ColorDrawable.getColor .. [Gingerbread] Work around lack of ColorDrawable.getColor Change-Id: I8a8364ab266d8bbbaf7cde50ad7e08e4d637b5a1 --- M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/47/122547/1 diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index 426571b..a8e9a6d 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -128,7 +128,11 @@ navbar = (LinearLayout) parentLayout.findViewById(R.id.navbar); searchTermText = (EditText) parentLayout.findViewById(R.id.search_term_text); try { -navbarColor = ((ColorDrawable)(searchBarContainer.getBackground())).getColor(); +if (Build.VERSION.SDK_INT = Build.VERSION_CODES.HONEYCOMB) { +navbarColor = ((ColorDrawable) (searchBarContainer.getBackground())).getColor(); +} else { +navbarColor = Color.WHITE; +} searchTermTextColor = searchTermText.getCurrentTextColor(); searchTermHintTextColor = searchTermText.getCurrentHintTextColor(); } catch (Exception e) { -- To view, visit https://gerrit.wikimedia.org/r/122547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a8364ab266d8bbbaf7cde50ad7e08e4d637b5a1 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Use compat library version of PopupMenu - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122544 Change subject: [Gingerbread] Use compat library version of PopupMenu .. [Gingerbread] Use compat library version of PopupMenu Change-Id: Ica60cfe8f96057949d46b48a4fbcf0c960ef4e49 --- M wikipedia/src/main/java/org/wikipedia/page/PageActionsHandler.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 2 files changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/44/122544/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageActionsHandler.java b/wikipedia/src/main/java/org/wikipedia/page/PageActionsHandler.java index 728b755..5381a82 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageActionsHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageActionsHandler.java @@ -1,7 +1,7 @@ package org.wikipedia.page; import android.view.*; -import android.widget.*; +import android.support.v7.widget.PopupMenu; import com.squareup.otto.*; import org.wikipedia.*; import org.wikipedia.events.*; diff --git a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index a5269bc..426571b 100644 --- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -4,6 +4,7 @@ import android.os.*; import android.support.v4.app.*; import android.support.v4.widget.*; +import android.support.v7.widget.PopupMenu; import android.text.*; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; -- To view, visit https://gerrit.wikimedia.org/r/122544 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica60cfe8f96057949d46b48a4fbcf0c960ef4e49 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Don't crash on setting zoom controls - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122591 Change subject: [Gingerbread] Don't crash on setting zoom controls .. [Gingerbread] Don't crash on setting zoom controls Disables pinch-to-zoom on the web view on 2.3 Change-Id: I93acca15e8a10338ac243e8151c1883b175efa0d --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/91/122591/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index b8cde8c..0f975fb 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -139,9 +139,11 @@ quickReturnBar = getActivity().findViewById(quickReturnBarId); tocSlider = (SlidingPaneLayout) getView().findViewById(R.id.page_toc_slider); -// Enable Pinch-Zoom -webView.getSettings().setBuiltInZoomControls(true); -webView.getSettings().setDisplayZoomControls(false); +if (Build.VERSION.SDK_INT = Build.VERSION_CODES.HONEYCOMB) { +// Enable Pinch-Zoom +webView.getSettings().setBuiltInZoomControls(true); +webView.getSettings().setDisplayZoomControls(false); +} bridge = new CommunicationBridge(webView, file:///android_asset/index.html); setupMessageHandlers(); -- To view, visit https://gerrit.wikimedia.org/r/122591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I93acca15e8a10338ac243e8151c1883b175efa0d Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Partial animations fixes using NineOldAndroids - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122590 Change subject: [Gingerbread] Partial animations fixes using NineOldAndroids .. [Gingerbread] Partial animations fixes using NineOldAndroids Change-Id: Iba79bd370eb1f7af45fd21c01f1b6c1e100befea --- M wikipedia/pom.xml M wikipedia/src/main/java/org/wikipedia/QuickReturnHandler.java M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/page/ToCHandler.java 4 files changed, 22 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/90/122590/1 diff --git a/wikipedia/pom.xml b/wikipedia/pom.xml index c1934e1..f451f09 100644 --- a/wikipedia/pom.xml +++ b/wikipedia/pom.xml @@ -76,6 +76,11 @@ artifactIdandroid-saripaar/artifactId version1.0.2/version /dependency +dependency +groupIdcom.nineoldandroids/groupId +artifactIdlibrary/artifactId +version2.4.0/version +/dependency /dependencies build finalName${project.artifactId}/finalName diff --git a/wikipedia/src/main/java/org/wikipedia/QuickReturnHandler.java b/wikipedia/src/main/java/org/wikipedia/QuickReturnHandler.java index b51e3ad..52b1813 100644 --- a/wikipedia/src/main/java/org/wikipedia/QuickReturnHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/QuickReturnHandler.java @@ -1,6 +1,7 @@ package org.wikipedia; import android.view.*; +import com.nineoldandroids.view.ViewHelper; public class QuickReturnHandler implements ObservableWebView.OnScrollChangeListener, ObservableWebView.OnUpOrCancelMotionEventListener, ObservableWebView.OnDownMotionEventListener { private final ObservableWebView webview; @@ -26,21 +27,21 @@ if (oldScrollY scrollY) { int minMargin = 0; int scrollDelta = oldScrollY - scrollY; -int newMargin = (int)quickReturnView.getTranslationY() + scrollDelta; +int newMargin = (int) ViewHelper.getTranslationY(quickReturnView) + scrollDelta; animMargin = Math.min(minMargin, newMargin); } else { // scroll downn! int minMargin = -quickReturnView.getHeight(); int scrollDelta = scrollY - oldScrollY; -int newMargin = (int)quickReturnView.getTranslationY() - scrollDelta; +int newMargin = (int)ViewHelper.getTranslationY(quickReturnView) - scrollDelta; animMargin = Math.max(minMargin, newMargin); } -quickReturnView.setTranslationY(animMargin); +ViewHelper.setTranslationY(quickReturnView, animMargin); } @Override public void onUpOrCancelMotionEvent() { -int transY = (int)quickReturnView.getTranslationY(); +int transY = (int)ViewHelper.getTranslationY(quickReturnView); int height = quickReturnView.getHeight(); if (transY != 0 transY -height) { if (transY -height / 2 ) { diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index ee3a20d..16c92ad 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -1,6 +1,9 @@ package org.wikipedia; -import android.animation.*; +import com.nineoldandroids.animation.*; +import com.nineoldandroids.view.*; +import static com.nineoldandroids.view.ViewPropertyAnimator.animate; + import android.app.*; import android.content.*; import android.content.pm.*; @@ -52,9 +55,9 @@ * @param view The currently invisible view to be faded in */ public static void fadeIn(final View view) { -view.setAlpha(0f); +ViewHelper.setAlpha(view, 0f); view.setVisibility(View.VISIBLE); -view.animate() +animate(view) .alpha(1.0f) .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION) .setListener(null) @@ -66,7 +69,7 @@ * @param view The currently visible view to be faded out */ public static void fadeOut(final View view) { -view.animate() +animate(view) .alpha(0f) .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION) .setListener(new AnimatorListenerAdapter() { @@ -83,7 +86,7 @@ // Detect if we got canceled, and if so DON'T hide... // There's another animation now pushing the alpha back up view.setVisibility(View.GONE); -view.setAlpha(1.0f); +ViewHelper.setAlpha(view, 1.0f); } } }); @@ -180,8 +183,8 @@ * @param translation The value to ensure it is translated by */ public static void
[MediaWiki-commits] [Gerrit] [Gingerbread] Quick hack around more missing attrs - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122592 Change subject: [Gingerbread] Quick hack around more missing attrs .. [Gingerbread] Quick hack around more missing attrs Change-Id: Ic20b3d50aa0ec6b97f46419e6c2d2b5fb43ef334 --- M wikipedia/res/layout/activity_edit_section.xml M wikipedia/res/layout/item_saved_page_entry.xml M wikipedia/res/layout/item_toc_entry.xml M wikipedia/res/values-v11/styles.xml M wikipedia/res/values/styles.xml 5 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/92/122592/1 diff --git a/wikipedia/res/layout/activity_edit_section.xml b/wikipedia/res/layout/activity_edit_section.xml index 914f60d..f2c7dd7 100644 --- a/wikipedia/res/layout/activity_edit_section.xml +++ b/wikipedia/res/layout/activity_edit_section.xml @@ -70,7 +70,6 @@ android:gravity=center android:text=@string/edit_section_abusefilter_back_text android:padding=8dp - android:background=?android:attr/activatedBackgroundIndicator style=?android:textAppearanceMedium / View android:layout_width=match_parent android:layout_height=1dp android:background=@color/border/ diff --git a/wikipedia/res/layout/item_saved_page_entry.xml b/wikipedia/res/layout/item_saved_page_entry.xml index cf879ed..0a8ecf4 100644 --- a/wikipedia/res/layout/item_saved_page_entry.xml +++ b/wikipedia/res/layout/item_saved_page_entry.xml @@ -15,7 +15,7 @@ android:layout_width=match_parent android:layout_height=wrap_content android:orientation=horizontal -android:background=?android:attr/activatedBackgroundIndicator +style=ActivatedBackgroundIndicator ImageView android:layout_width=16dp android:layout_height=16dp android:id=@+id/saved_page_source diff --git a/wikipedia/res/layout/item_toc_entry.xml b/wikipedia/res/layout/item_toc_entry.xml index 57ff2a5..c1ed0ab 100644 --- a/wikipedia/res/layout/item_toc_entry.xml +++ b/wikipedia/res/layout/item_toc_entry.xml @@ -4,7 +4,7 @@ android:layout_width=match_parent android:layout_height=wrap_content android:orientation=horizontal - android:background=?android:activatedBackgroundIndicator + style=ActivatedBackgroundIndicator View android:layout_width=0dp android:layout_height=match_parent android:id=@+id/page_toc_filler diff --git a/wikipedia/res/values-v11/styles.xml b/wikipedia/res/values-v11/styles.xml index 376d45f..2074421 100644 --- a/wikipedia/res/values-v11/styles.xml +++ b/wikipedia/res/values-v11/styles.xml @@ -3,4 +3,7 @@ style name=SelectableItem parent=AppTheme item name=android:background?android:attr/selectableItemBackground/item /style +style name=ActivatedBackgroundIndicator +item name=android:background?android:activatedBackgroundIndicator/item +/style /resources \ No newline at end of file diff --git a/wikipedia/res/values/styles.xml b/wikipedia/res/values/styles.xml index 367113b..db57680 100644 --- a/wikipedia/res/values/styles.xml +++ b/wikipedia/res/values/styles.xml @@ -11,4 +11,7 @@ style name=SelectableItem parent=AppTheme !--item name=android:background#ff00ff/item--!-- fixme better default -- /style +style name=ActivatedBackgroundIndicator +!--item name=android:background?android:activatedBackgroundIndicator/item-- +/style /resources \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/122592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic20b3d50aa0ec6b97f46419e6c2d2b5fb43ef334 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [Gingerbread] Get more things using the support version of t... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122607 Change subject: [Gingerbread] Get more things using the support version of the action bar accessors .. [Gingerbread] Get more things using the support version of the action bar accessors Change-Id: Ib49be67baa446fe68b3e73a7220fce8b2a36d3f7 --- M wikipedia/src/main/java/org/wikipedia/editing/CaptchaHandler.java M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java M wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java M wikipedia/src/main/java/org/wikipedia/interlanguage/LangLinksActivity.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java M wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java M wikipedia/src/main/java/org/wikipedia/settings/SettingsActivity.java 8 files changed, 19 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/07/122607/1 diff --git a/wikipedia/src/main/java/org/wikipedia/editing/CaptchaHandler.java b/wikipedia/src/main/java/org/wikipedia/editing/CaptchaHandler.java index 59477e1..2da61b8 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/CaptchaHandler.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/CaptchaHandler.java @@ -3,6 +3,7 @@ import android.app.*; import android.net.*; import android.os.*; +import android.support.v7.app.ActionBarActivity; import android.util.*; import android.view.*; import android.widget.*; @@ -83,7 +84,7 @@ .into(captchaImage, new Callback() { @Override public void onSuccess() { - activity.getActionBar().setTitle(R.string.title_captcha); + ((ActionBarActivity)activity).getSupportActionBar().setTitle(R.string.title_captcha); progressDialog.hide(); // In case there was a captcha attempt before @@ -102,7 +103,7 @@ } public void hideCaptcha() { -activity.getActionBar().setTitle(prevTitleId); + ((ActionBarActivity)activity).getSupportActionBar().setTitle(prevTitleId); Utils.crossFade(captchaContainer, primaryView); } diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java index 88b82ab..f575faa 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java @@ -3,6 +3,7 @@ import android.app.*; import android.os.*; import android.support.v4.app.Fragment; +import android.support.v7.app.ActionBarActivity; import android.view.*; import org.json.*; import org.wikipedia.*; @@ -42,7 +43,7 @@ } private void displayPreview(final String html) { - getActivity().getActionBar().setTitle(R.string.edit_preview_activity_title); + ((ActionBarActivity)getActivity()).getSupportActionBar().setTitle(R.string.edit_preview_activity_title); Utils.crossFade(getActivity().findViewById(R.id.edit_section_container), previewContainer); JSONObject payload = new JSONObject(); try { @@ -100,7 +101,7 @@ public void hide() { Utils.crossFade(previewContainer, getActivity().findViewById(R.id.edit_section_container)); - getActivity().getActionBar().setTitle(R.string.edit_section_activity_title); + ((ActionBarActivity)getActivity()).getSupportActionBar().setTitle(R.string.edit_section_activity_title); } diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java index 87259ee..22f0cc9 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -55,7 +55,7 @@ super.onCreate(savedInstanceState); setContentView(R.layout.activity_edit_section); -getActionBar().setDisplayHomeAsUpEnabled(true); +getSupportActionBar().setDisplayHomeAsUpEnabled(true); if (!getIntent().getAction().equals(ACTION_EDIT_SECTION)) { throw new RuntimeException(Much wrong action. Such exception. Wow); @@ -68,7 +68,7 @@ progressDialog = new ProgressDialog(this); - getActionBar().setTitle(getString(R.string.editsection_activity_title)); + getSupportActionBar().setTitle(getString(R.string.editsection_activity_title)); sectionText = (EditText) findViewById(R.id.edit_section_text); sectionProgress = findViewById(R.id.edit_section_load_progress); @@ -261,7 +261,7 @@ private void cancelAbuseFilter() { abusefilterEditResult =
[MediaWiki-commits] [Gerrit] [Gingerbread] work around another attr - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/122606 Change subject: [Gingerbread] work around another attr .. [Gingerbread] work around another attr Change-Id: Id3ae90e5b6f1716e67e49ffe16d7780e4198debd --- M wikipedia/res/layout/item_language_list_entry.xml M wikipedia/res/values-v11/styles.xml M wikipedia/res/values/styles.xml 3 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/06/122606/1 diff --git a/wikipedia/res/layout/item_language_list_entry.xml b/wikipedia/res/layout/item_language_list_entry.xml index c2e002d..bc98aeb 100644 --- a/wikipedia/res/layout/item_language_list_entry.xml +++ b/wikipedia/res/layout/item_language_list_entry.xml @@ -14,7 +14,7 @@ android:layout_width=wrap_content android:layout_height=wrap_content android:textAppearance=?android:attr/textAppearanceMedium -android:textColor=?android:attr/textColorAlertDialogListItem +style=AlertDialogListItem android:gravity=center_vertical|start android:singleLine=true android:ellipsize=marquee @@ -24,7 +24,7 @@ android:layout_width=wrap_content android:layout_height=wrap_content android:textAppearance=?android:attr/textAppearanceSmall -android:textColor=?android:attr/textColorAlertDialogListItem +style=AlertDialogListItem android:gravity=center_vertical|start android:singleLine=true android:ellipsize=marquee diff --git a/wikipedia/res/values-v11/styles.xml b/wikipedia/res/values-v11/styles.xml index 2074421..81ed7f7 100644 --- a/wikipedia/res/values-v11/styles.xml +++ b/wikipedia/res/values-v11/styles.xml @@ -6,4 +6,7 @@ style name=ActivatedBackgroundIndicator item name=android:background?android:activatedBackgroundIndicator/item /style +style name=AlertDialogListItem +item name=android:textColor?android:attr/textColorAlertDialogListItem/item +/style /resources \ No newline at end of file diff --git a/wikipedia/res/values/styles.xml b/wikipedia/res/values/styles.xml index db57680..89930ea 100644 --- a/wikipedia/res/values/styles.xml +++ b/wikipedia/res/values/styles.xml @@ -14,4 +14,7 @@ style name=ActivatedBackgroundIndicator !--item name=android:background?android:activatedBackgroundIndicator/item-- /style +style name=AlertDialogListItem +!--item name=android:textColor?android:attr/textColorAlertDialogListItem/item-- +/style /resources \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/122606 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3ae90e5b6f1716e67e49ffe16d7780e4198debd Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid leaked window errors by dismissing popups, not just ... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115317 Change subject: Avoid leaked window errors by dismissing popups, not just hiding them, on success .. Avoid leaked window errors by dismissing popups, not just hiding them, on success Change-Id: I45a2dc6d73f5b0891fea5f1124394d286f14d314 --- M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/17/115317/1 diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java index a9cc961..64a0f8c 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java @@ -68,7 +68,7 @@ public void onFinish(String result) { displayPreview(result); previewHTML = result; -dialog.hide(); +dialog.dismiss(); } }.execute(); } diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java index 705d0d0..0be9a89 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -181,7 +181,7 @@ @Override public void onFinish(EditingResult result) { if (result instanceof SuccessEditResult) { -progressDialog.hide(); +progressDialog.dismiss(); setResult(EditHandler.RESULT_REFRESH_PAGE); Toast.makeText(EditSectionActivity.this, R.string.edit_saved_successfully, Toast.LENGTH_LONG).show(); Utils.hideSoftKeyboard(EditSectionActivity.this); -- To view, visit https://gerrit.wikimedia.org/r/115317 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45a2dc6d73f5b0891fea5f1124394d286f14d314 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only add event handler once; after edit we may reload multip... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115321 Change subject: Only add event handler once; after edit we may reload multiple times .. Only add event handler once; after edit we may reload multiple times This was causing multiple calls to section request/display. Change-Id: Ie73e0cbe991691613138955d39e0908b6048db84 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 1 file changed, 16 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/21/115321/1 diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index 8c5e16a..9329271 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -95,22 +95,6 @@ } private void populateNonLeadSections(final Page page) { -bridge.addListener(requestSection, new CommunicationBridge.JSEventListener() { -@Override -public void onMessage(String messageType, JSONObject messagePayload) { -try { -int index = messagePayload.optInt(index); -JSONObject wrapper = new JSONObject(); -wrapper.put(section, page.getSections().get(index).toJSON()); -wrapper.put(index, index); -wrapper.put(isLast, index == page.getSections().size() - 1); -bridge.sendMessage(displaySection, wrapper); -} catch (JSONException e) { -// Won't happen -throw new RuntimeException(e); -} -} -}); editHandler = new EditHandler(this, bridge, page); bridge.sendMessage(startSectionsDisplay, new JSONObject()); } @@ -161,6 +145,22 @@ bridge = new CommunicationBridge(webView, file:///android_asset/index.html); Utils.addUtilityMethodsToBridge(getActivity(), bridge); +bridge.addListener(requestSection, new CommunicationBridge.JSEventListener() { +@Override +public void onMessage(String messageType, JSONObject messagePayload) { +try { +int index = messagePayload.optInt(index); +JSONObject wrapper = new JSONObject(); +wrapper.put(section, page.getSections().get(index).toJSON()); +wrapper.put(index, index); +wrapper.put(isLast, index == page.getSections().size() - 1); +bridge.sendMessage(displaySection, wrapper); +} catch (JSONException e) { +// Won't happen +throw new RuntimeException(e); +} +} +}); linkHandler = new LinkHandler(getActivity(), bridge, title.getSite()); app = (WikipediaApp)getActivity().getApplicationContext(); api = ((WikipediaApp)getActivity().getApplicationContext()).getAPIForSite(title.getSite()); -- To view, visit https://gerrit.wikimedia.org/r/115321 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie73e0cbe991691613138955d39e0908b6048db84 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix page goes blank after saving bug - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/115328 Change subject: Fix page goes blank after saving bug .. Fix page goes blank after saving bug This was breaking if your internet was fast. ;) Fade-out of the web view to the progress indicator was getting canceled by the subsequent fade-in, but the listener's onAnimationEnd handler was still being called and hiding the webView completely. Added a check for cancelation, which seems to resolve it. Bug: 60696 Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 --- M wikipedia/src/main/java/org/wikipedia/Utils.java 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/28/115328/1 diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index 88f74ff..58e0423 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -70,10 +70,21 @@ .alpha(0f) .setDuration(WikipediaApp.MEDIUM_ANIMATION_DURATION) .setListener(new AnimatorListenerAdapter() { +boolean wasCanceled = false; + +@Override +public void onAnimationCancel(Animator animation) { +wasCanceled = true; +} + @Override public void onAnimationEnd(Animator animation) { -view.setVisibility(View.GONE); -view.setAlpha(1.0f); +if (!wasCanceled) { +// Detect if we got canceled, and if so DON'T hide... +// There's another animation now pushing the alpha back up +view.setVisibility(View.GONE); +view.setAlpha(1.0f); +} } }); } -- To view, visit https://gerrit.wikimedia.org/r/115328 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I226568aa43fd5720af34ce285d6136b702b881c5 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add 'showPassword' functionality to Create Account - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add 'showPassword' functionality to Create Account .. Add 'showPassword' functionality to Create Account Checkboxes for now, will replace with fancier designs later on Change-Id: I1709b399ddbba6d6fa4c7b23e36868c022db09de --- M wikipedia/res/layout/activity_create_account.xml M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java 4 files changed, 65 insertions(+), 33 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/res/layout/activity_create_account.xml b/wikipedia/res/layout/activity_create_account.xml index 7491f22..25c5d43 100644 --- a/wikipedia/res/layout/activity_create_account.xml +++ b/wikipedia/res/layout/activity_create_account.xml @@ -20,23 +20,44 @@ android:inputType=textNoSuggestions / -org.wikipedia.styledviews.StyledEditText -android:id=@+id/create_account_password +LinearLayout android:layout_width=match_parent android:layout_height=wrap_content -android:hint=@string/create_account_password_hint -android:singleLine=true -android:inputType=textPassword -/ +android:orientation=horizontal +org.wikipedia.styledviews.StyledEditText +android:id=@+id/create_account_password +android:layout_width=0dp +android:layout_weight=1 +android:layout_height=wrap_content +android:hint=@string/create_account_password_hint +android:singleLine=true +android:inputType=textPassword +/ +org.wikipedia.styledviews.StyledCheckBox +android:id=@+id/create_account_show_password +android:layout_width=wrap_content +android:layout_height=wrap_content/ +/LinearLayout -org.wikipedia.styledviews.StyledEditText -android:id=@+id/create_account_password_repeat +LinearLayout android:layout_width=match_parent android:layout_height=wrap_content -android:hint=@string/create_account_password_repeat_hint -android:singleLine=true -android:inputType=textPassword -/ +android:orientation=horizontal +org.wikipedia.styledviews.StyledEditText +android:id=@+id/create_account_password_repeat +android:layout_width=0dp +android:layout_weight=1 +android:layout_height=wrap_content +android:hint=@string/create_account_password_repeat_hint +android:singleLine=true +android:inputType=textPassword +/ + +org.wikipedia.styledviews.StyledCheckBox +android:id=@+id/create_account_show_password_repeat +android:layout_width=wrap_content +android:layout_height=wrap_content/ +/LinearLayout org.wikipedia.styledviews.StyledEditText android:id=@+id/create_account_email diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index 88f74ff..a669489 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -3,24 +3,24 @@ import android.animation.*; import android.app.*; import android.content.*; +import android.content.pm.*; import android.os.*; +import android.text.*; import android.text.format.*; import android.util.*; import android.view.*; import android.view.inputmethod.*; +import android.widget.*; +import com.squareup.otto.*; import org.json.*; +import org.mediawiki.api.json.*; +import org.wikipedia.events.*; +import org.wikipedia.zero.*; import java.io.*; import java.security.*; import java.text.*; import java.util.*; - -import org.mediawiki.api.json.ApiResult; -import org.wikipedia.events.WikipediaZeroStateChangeEvent; -import android.content.pm.PackageManager; -import android.content.pm.PackageInfo; -import org.wikipedia.zero.WikipediaZeroTask; -import com.squareup.otto.*; /** * Contains utility methods that Java doesn't have because we can't make code look too good, can we? @@ -195,6 +195,22 @@ } } +public static void setupShowPasswordCheck(final CheckBox check, final EditText edit) { +check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { +@Override +public
[MediaWiki-commits] [Gerrit] Make sure dir attribute is set on RTL pages - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Make sure dir attribute is set on RTL pages .. Make sure dir attribute is set on RTL pages Bug: 61867 Change-Id: Ib1479511c99e188eb2f79262255048142d2a276d --- M wikipedia/assets/abusefilter.js M wikipedia/assets/bundle.js M wikipedia/assets/preview.js M wikipedia/src/main/java/org/wikipedia/Utils.java M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewFragment.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java M www/Gruntfile.js M www/abusefilter.js A www/js/rtlsupport.js M www/preview.js 11 files changed, 88 insertions(+), 18 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/assets/abusefilter.js b/wikipedia/assets/abusefilter.js index 0c16147..00a511b 100644 --- a/wikipedia/assets/abusefilter.js +++ b/wikipedia/assets/abusefilter.js @@ -21,7 +21,7 @@ content.appendChild( warning ); } ); -},{./bridge:2,./transformer:3}],2:[function(require,module,exports){ +},{./bridge:2,./transformer:4}],2:[function(require,module,exports){ function Bridge() { } @@ -60,6 +60,12 @@ module.exports.sendMessage( DOMLoaded, {} ); }; },{}],3:[function(require,module,exports){ +var bridge = require(./bridge); + +bridge.registerListener( setDirectionality, function( payload ) { +document.getElementsByTagName( html )[0].setAttribute( dir, payload.dir ); +} ); +},{./bridge:2}],4:[function(require,module,exports){ function Transformer() { } @@ -83,4 +89,4 @@ module.exports = new Transformer(); -},{}]},{},[2,1]) \ No newline at end of file +},{}]},{},[2,1,3]) \ No newline at end of file diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 9089297..98ac29b 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -98,6 +98,12 @@ } ); },{./bridge:2}],5:[function(require,module,exports){ var bridge = require(./bridge); + +bridge.registerListener( setDirectionality, function( payload ) { +document.getElementsByTagName( html )[0].setAttribute( dir, payload.dir ); +} ); +},{./bridge:2}],6:[function(require,module,exports){ +var bridge = require(./bridge); var transformer = require(./transformer); bridge.registerListener( displayLeadSection, function( payload ) { @@ -164,7 +170,7 @@ window.scrollTo(0, scrollY); }); -},{./bridge:2,./transformer:6}],6:[function(require,module,exports){ +},{./bridge:2,./transformer:7}],7:[function(require,module,exports){ function Transformer() { } @@ -188,7 +194,7 @@ module.exports = new Transformer(); -},{}],7:[function(require,module,exports){ +},{}],8:[function(require,module,exports){ var bridge = require(./bridge); var transformer = require(./transformer); @@ -226,4 +232,4 @@ return content; } ); -},{./bridge:2,./transformer:6}]},{},[4,6,7,2,1,3,5]) \ No newline at end of file +},{./bridge:2,./transformer:7}]},{},[4,7,8,2,1,3,6,5]) \ No newline at end of file diff --git a/wikipedia/assets/preview.js b/wikipedia/assets/preview.js index da569cf..1e8c969 100644 --- a/wikipedia/assets/preview.js +++ b/wikipedia/assets/preview.js @@ -77,4 +77,10 @@ content.innerHTML = payload.html; } ); -},{./bridge:2}]},{},[2,1,3]) \ No newline at end of file +},{./bridge:2}],4:[function(require,module,exports){ +var bridge = require(./bridge); + +bridge.registerListener( setDirectionality, function( payload ) { +document.getElementsByTagName( html )[0].setAttribute( dir, payload.dir ); +} ); +},{./bridge:2}]},{},[2,1,3,4]) \ No newline at end of file diff --git a/wikipedia/src/main/java/org/wikipedia/Utils.java b/wikipedia/src/main/java/org/wikipedia/Utils.java index b394b5c..b2b7388 100644 --- a/wikipedia/src/main/java/org/wikipedia/Utils.java +++ b/wikipedia/src/main/java/org/wikipedia/Utils.java @@ -305,5 +305,30 @@ return wikipedia-android-official; } } + +/** + * List of wiki language codes for which the content is primarily RTL. + * + * Ensure that this is always sorted alphabetically. + */ +private static String[] rtlLangs = { +arc, arz, ar, bcc, bqi, ckb, dv, fa, glk, ha, he, +khw, ks, mzn, pnb, ps, sd, ug, ur, yi +}; +public static void setupDirectionality(String lang, CommunicationBridge bridge) { +JSONObject payload = new JSONObject(); +try { +if (Arrays.binarySearch(rtlLangs, lang, null) 0) { +payload.put(dir, ltr); +} else { +payload.put(dir, rtl); +} +Log.d(Wikipedia, lang); +Log.d(Wikipedia, payload.toString(4)); +} catch (JSONException e) { +throw new RuntimeException(e); +} +bridge.sendMessage(setDirectionality, payload); +} } diff --git
[MediaWiki-commits] [Gerrit] Login the user right after they create an account - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Login the user right after they create an account .. Login the user right after they create an account Might need better UX - right now there's no way for us to show errors in the login process itself Change-Id: I26449e125f2398574631b63e4c3c07d012389b68 --- M wikipedia/res/values/strings.xml M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java M wikipedia/src/main/java/org/wikipedia/login/LoginTask.java 4 files changed, 43 insertions(+), 6 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index 5071107..cdec656 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -114,4 +114,5 @@ string name=zero_settings_devmode_summaryDuring development this enables code execution of W0 things./string string name=edit_preview_fetching_dialog_messageFetching preview.../string string name=edit_preview_activity_titlePreview edit/string +string name=create_account_logging_inLogging in.../string /resources diff --git a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java index 5a24d18..a437cb1 100644 --- a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java @@ -11,6 +11,7 @@ import org.mediawiki.api.json.*; import org.wikipedia.*; import org.wikipedia.editing.*; +import org.wikipedia.login.*; public class CreateAccountActivity extends ActionBarActivity { @Required(order=1) @@ -158,7 +159,7 @@ // Returns lowercase 'success', unlike every other API. GRR man, GRR // Replace wen https://bugzilla.wikimedia.org/show_bug.cgi?id=61663 is fixed? if (result.getResult().toLowerCase().equals(success)) { -finish(); +doLogin(); } else if (result.getResult().equals(captcha-createaccount-fail)) { // So for now we just need to do the entire set of requests again. sigh // Eventually this should be fixed to have the new captcha info come back. @@ -172,6 +173,33 @@ }.execute(); } +private void doLogin() { +final ProgressDialog dialog = new ProgressDialog(this); +dialog.setMessage(getString(R.string.create_account_logging_in)); +dialog.setIndeterminate(true); + +new LoginTask(this, app.getPrimarySite(), usernameEdit.getText().toString(), passwordEdit.getText().toString()) { +@Override +public void onBeforeExecute() { +dialog.show(); +} + +@Override +public void onFinish(String result) { +super.onFinish(result); +if (result.equals(Success)) { +dialog.dismiss(); +finish(); +} else { +// FIXME: Have better error handling here, m'kay? +// I think the only way this can fail is: too many attempts, network error. +// I wonder how we should handle either. +throw new RuntimeException(Whelp, let's fix this); +} +} +}.execute(); +} + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java b/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java index 0c79919..a10e6da 100644 --- a/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java @@ -95,14 +95,11 @@ @Override public void onFinish(String result) { +super.onFinish(result); progressDialog.dismiss(); if (result.equals(Success)) { Toast.makeText(LoginActivity.this, R.string.login_success_toast, Toast.LENGTH_LONG).show(); -app.getUserInfoStorage().setUser(new User(username, password)); setResult(LOG_IN_SUCCESSFUL); - -// Clear the edit tokens - clears out any anon tokens we might have had -app.getEditTokenStorage().clearAllTokens(); Utils.hideSoftKeyboard(LoginActivity.this); diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java b/wikipedia/src/main/java/org/wikipedia/login/LoginTask.java index a0132bc..308e183 100644 ---
[MediaWiki-commits] [Gerrit] Make sure sidebar says log in only if user is logged out - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Make sure sidebar says log in only if user is logged out .. Make sure sidebar says log in only if user is logged out Change-Id: I1e5d944086edeee98b407f7a8178e9866ed5bc3c --- M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java M wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java 2 files changed, 11 insertions(+), 26 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java index 9e23483..0cb4a8b 100644 --- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java @@ -2,10 +2,8 @@ import android.app.*; import android.content.*; +import android.graphics.*; import android.os.*; -import android.content.Intent; -import android.graphics.Color; -import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.*; import android.widget.*; @@ -13,7 +11,6 @@ import org.wikipedia.login.*; import org.wikipedia.savedpages.*; import org.wikipedia.settings.*; -import org.wikipedia.WikipediaApp; public class NavDrawerFragment extends Fragment implements AdapterView.OnItemClickListener { private static final int[] ACTION_ITEMS_TEXT = { @@ -40,13 +37,20 @@ } @Override +public void onResume() { +super.onResume(); + +// Ensure that Login / Logout status is accurate +setupDynamicItems(); +((NavListAdapter)navList.getAdapter()).notifyDataSetChanged(); +} + +@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); navList = (ListView) getView().findViewById(R.id.nav_list); adapter = new NavListAdapter(); app = (WikipediaApp)getActivity().getApplicationContext(); - -setupDynamicItems(); navList.setAdapter(adapter); navList.setOnItemClickListener(this); @@ -70,7 +74,7 @@ break; case R.string.nav_item_login: intent.setClass(this.getActivity(), LoginActivity.class); -startActivityForResult(intent, LoginActivity.REQUEST_CODE_LOGIN); +startActivity(intent); break; case R.string.nav_item_logout: doLogout(); @@ -79,22 +83,6 @@ return; default: throw new RuntimeException(Unknown ID clicked!); -} -} - -@Override -public void onActivityResult(int requestCode, int resultCode, Intent data) { -// Okay, so this is really, really stupid, but -// sometimes if the previous activity was destroyed before the callback is done -// onActivityResult may be called *before* the onCreate, onActivityAttach, etc are called -// This, of course, is fucking stupid. However, in this particular case (updating the login status) -// we can just ignore it if that is the case and keep going. -// BUGS! GRR! -if (getView() != null) { -if (resultCode == LoginActivity.LOG_IN_SUCCESSFUL) { -setupDynamicItems(); -((NavListAdapter)navList.getAdapter()).notifyDataSetChanged(); -} } } diff --git a/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java b/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java index a10e6da..40f41d9 100644 --- a/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/login/LoginActivity.java @@ -13,8 +13,6 @@ import org.wikipedia.createaccount.*; public class LoginActivity extends ActionBarActivity { -public static final int REQUEST_CODE_LOGIN = 1; -public static final int LOG_IN_SUCCESSFUL = 1; private EditText usernameText; private EditText passwordText; private CheckBox showPassword; @@ -99,7 +97,6 @@ progressDialog.dismiss(); if (result.equals(Success)) { Toast.makeText(LoginActivity.this, R.string.login_success_toast, Toast.LENGTH_LONG).show(); -setResult(LOG_IN_SUCCESSFUL); Utils.hideSoftKeyboard(LoginActivity.this); -- To view, visit https://gerrit.wikimedia.org/r/115873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e5d944086edeee98b407f7a8178e9866ed5bc3c Gerrit-PatchSet: 3 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Hide softkeyboard when exiting create account - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Hide softkeyboard when exiting create account .. Hide softkeyboard when exiting create account Change-Id: If166193a21a202989fbbfc6ee1fefac4135f6091 --- M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java index a437cb1..67261a1 100644 --- a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountActivity.java @@ -189,6 +189,7 @@ super.onFinish(result); if (result.equals(Success)) { dialog.dismiss(); +Utils.hideSoftKeyboard(CreateAccountActivity.this); finish(); } else { // FIXME: Have better error handling here, m'kay? @@ -204,6 +205,7 @@ public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: +Utils.hideSoftKeyboard(this); finish(); return true; case R.id.menu_create_account: -- To view, visit https://gerrit.wikimedia.org/r/115874 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If166193a21a202989fbbfc6ee1fefac4135f6091 Gerrit-PatchSet: 3 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for iOS 6 account creation crash. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for iOS 6 account creation crash. .. Fix for iOS 6 account creation crash. Change-Id: I817ff71a9529fd173e0717c757dfe74ac87ac0f7 --- M Wikipedia-iOS/Data/Operations/AccountCreationOp.m M Wikipedia-iOS/Keychain/KeychainCredentials.m 2 files changed, 10 insertions(+), 10 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia-iOS/Data/Operations/AccountCreationOp.m b/Wikipedia-iOS/Data/Operations/AccountCreationOp.m index ae24440..2cb1a71 100644 --- a/Wikipedia-iOS/Data/Operations/AccountCreationOp.m +++ b/Wikipedia-iOS/Data/Operations/AccountCreationOp.m @@ -67,14 +67,14 @@ self = [super init]; if (self) { -self.domain = domain; -self.userName = userName; -self.password = password; -self.realName = realName; -self.email = email; -self.token = token; -self.captchaId = captchaId; -self.captchaWord = captchaWord; +self.domain = domain ? domain : @; +self.userName = userName ? userName : @; +self.password = password ? password : @; +self.realName = realName ? realName : @; +self.email = email ? email : @; +self.token = token ? token : @; +self.captchaId = captchaId ? captchaId : @; +self.captchaWord = captchaWord ? captchaWord : @; __weak AccountCreationOp *weakSelf = self; self.aboutToStart = ^{ diff --git a/Wikipedia-iOS/Keychain/KeychainCredentials.m b/Wikipedia-iOS/Keychain/KeychainCredentials.m index 326cd9a..70b2643 100644 --- a/Wikipedia-iOS/Keychain/KeychainCredentials.m +++ b/Wikipedia-iOS/Keychain/KeychainCredentials.m @@ -104,7 +104,7 @@ if (status == errSecSuccess) { return YES; } else { -NSLog(@Keychain: SecItemUpdate returned %i, (int)status); +//NSLog(@Keychain: SecItemUpdate returned %i, (int)status); return NO; } } @@ -128,7 +128,7 @@ NSData *result = (__bridge_transfer NSData *)found; return [[NSString alloc] initWithData: result encoding:NSUTF8StringEncoding]; } else { -NSLog(@Keychain: SecItemCopyMatching returned %i, (int)status); +//NSLog(@Keychain: SecItemCopyMatching returned %i, (int)status); return nil; } } -- To view, visit https://gerrit.wikimedia.org/r/115950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I817ff71a9529fd173e0717c757dfe74ac87ac0f7 Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't crash when a reference is clicked - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Don't crash when a reference is clicked .. Don't crash when a reference is clicked Change-Id: I9f28f8b0be702503579d4a97ce22cff30d21f7cd --- M wikipedia/assets/bundle.js M wikipedia/assets/preview.js M www/js/actions.js M www/preview.js 4 files changed, 28 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 98ac29b..84e36b6 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -23,7 +23,13 @@ handlers[i]( event.target, event ); } } else { -bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); +var href = event.target.getAttribute( href ); +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 { +bridge.sendMessage( 'linkClicked', { href: href } ); +} event.preventDefault(); } } diff --git a/wikipedia/assets/preview.js b/wikipedia/assets/preview.js index 1e8c969..e6f488c 100644 --- a/wikipedia/assets/preview.js +++ b/wikipedia/assets/preview.js @@ -23,7 +23,13 @@ handlers[i]( event.target, event ); } } else { -bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); +var href = event.target.getAttribute( href ); +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 { +bridge.sendMessage( 'linkClicked', { href: href } ); +} event.preventDefault(); } } diff --git a/www/js/actions.js b/www/js/actions.js index f255072..fdfe383 100644 --- a/www/js/actions.js +++ b/www/js/actions.js @@ -22,7 +22,13 @@ handlers[i]( event.target, event ); } } else { -bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); +var href = event.target.getAttribute( href ); +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 { +bridge.sendMessage( 'linkClicked', { href: href } ); +} event.preventDefault(); } } diff --git a/www/preview.js b/www/preview.js index 1e8c969..e6f488c 100644 --- a/www/preview.js +++ b/www/preview.js @@ -23,7 +23,13 @@ handlers[i]( event.target, event ); } } else { -bridge.sendMessage( 'linkClicked', { href: event.target.getAttribute( href ) }); +var href = event.target.getAttribute( href ); +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 { +bridge.sendMessage( 'linkClicked', { href: href } ); +} event.preventDefault(); } } -- To view, visit https://gerrit.wikimedia.org/r/115958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f28f8b0be702503579d4a97ce22cff30d21f7cd Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add group description for wikipedia-android - change (mediawiki...Translate)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116141 Change subject: Add group description for wikipedia-android .. Add group description for wikipedia-android Change-Id: Ie05a484099d68845e81df180200a033cdfd32315 --- M i18n/groupdescriptions/en.json 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/41/116141/1 diff --git a/i18n/groupdescriptions/en.json b/i18n/groupdescriptions/en.json index 9bfe9be..c61de51 100644 --- a/i18n/groupdescriptions/en.json +++ b/i18n/groupdescriptions/en.json @@ -47,6 +47,7 @@ translate-group-desc-wikimedia-mobile: Aggregated message group containing mobile applications for Wikimedia projects, translate-group-desc-wikimedia-mobile-commons: [[Translating:WikipediaMobile|Commons Mobile]] is an app for Android or iOS for uploading and browsing Wikimedia Commons, translate-group-desc-wikimedia-mobile-wikipedia: [[Translating:WikipediaMobile|WikipediaMobile]] is a cross-platform mobile and tablet application for reading and contributing to Wikipedia, +translate-group-desc-wikimedia-mobile-wikipedia-android: [[Translating:WikipediaMobile|Wikipedia Android]] is the Android-specific version of the Wikipedia mobile app (new 2014), translate-group-desc-wikimedia-mobile-wikipedia-ios: [[Translating:WikipediaMobile|Wikipedia iOS]] is the iOS-specific version of the Wikipedia mobile app (new 2014); main strings list, translate-group-desc-wikimedia-mobile-wikipedia-ios-meta: [[Translating:WikipediaMobile|Wikipedia iOS]] is the iOS-specific version of the Wikipedia mobile app (new 2014); app metadata subcomponent, translate-group-desc-wikimedia-mobile-wikipedia-ios-ui: [[Translating:WikipediaMobile|Wikipedia iOS]] is the iOS-specific version of the Wikipedia mobile app (new 2014); user interface subcomponent, -- To view, visit https://gerrit.wikimedia.org/r/116141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie05a484099d68845e81df180200a033cdfd32315 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add groups for wikipedia-android - change (translatewiki)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116142 Change subject: Add groups for wikipedia-android .. Add groups for wikipedia-android Check out from https://github.com/wikimedia/apps-android-wikipedia.git Requires Translate extension update Ie05a4840 for descriptions Change-Id: I907de1904d98f8f5d3dda1a3271b86e0024bf19e --- M bin/repocommit M bin/repocreate M bin/repoexport M bin/repoupdate M groups/Wikimedia/WikimediaMobile-android.yaml 5 files changed, 46 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/42/116142/1 diff --git a/bin/repocommit b/bin/repocommit index 21514b7..05bf85d 100755 --- a/bin/repocommit +++ b/bin/repocommit @@ -84,6 +84,7 @@ commons-ios \ pywikibot \ wikimania \ +wikipedia-android \ wikipedia-ios for i in $GERRITPROJECTS; do diff --git a/bin/repocreate b/bin/repocreate index 7bc4a29..2cfc9c2 100755 --- a/bin/repocreate +++ b/bin/repocreate @@ -291,6 +291,19 @@ gitCreateGerrit fi +elif [ $PROJECT = wikipedia-android ] +then + if [ -z $REPO_WIKIPEDIAANDROID ] + then echo Add REPO_WIKIPEDIAANDROID to REPOCONF; exit 1 + fi + + git clone $REPO_WIKIPEDIAANDROID $PROJECT + if [ $REPO_RW = yes ] + then + cd $PROJECT + gitCreateGerrit + fi + elif [ $PROJECT = wikipedia-ios ] then if [ -z $REPO_WIKIPEDIAIOS ] diff --git a/bin/repoexport b/bin/repoexport index f7c64f3..10d030e 100755 --- a/bin/repoexport +++ b/bin/repoexport @@ -183,6 +183,11 @@ php $EXPORTER --target . --group=out-wikimania-scholarships-app --lang '*' --skip en,qqq $THRESHOLD php $EXPORTER --target . --group=out-wikimania-scholarships-app --lang qqq +elif [ $PROJECT = wikipedia-android ] +then + php $EXPORTER --target . --group=out-wikimedia-mobile-wikipedia-android* --lang '*' --skip en,qqq $THRESHOLD + php $EXPORTER --target . --group=out-wikimedia-mobile-wikipedia-android* --lang qqq + elif [ $PROJECT = wikipedia-ios ] then php $EXPORTER --target . --group=out-wikimedia-mobile-wikipedia-ios* --lang '*' --skip en,qqq $THRESHOLD diff --git a/bin/repoupdate b/bin/repoupdate index d0fd908..9909baf 100755 --- a/bin/repoupdate +++ b/bin/repoupdate @@ -87,6 +87,7 @@ vicuna \ waymarked-trails-site \ wikimania \ +wikipedia-android \ wikipedia-ios \ WikipediaMobile \ WikipediaMobileJ2ME \ diff --git a/groups/Wikimedia/WikimediaMobile-android.yaml b/groups/Wikimedia/WikimediaMobile-android.yaml index 467f680..a9a4b56 100644 --- a/groups/Wikimedia/WikimediaMobile-android.yaml +++ b/groups/Wikimedia/WikimediaMobile-android.yaml @@ -229,3 +229,29 @@ FILES: sourcePattern: %GROUPROOT%/commons-android/commons/res/values-%CODE%/error.xml definitionFile: %GROUPROOT%/commons-android/commons/res/values/error.xml + +--- +BASIC: + description: {{int:translate-group-desc-wikimedia-mobile-wikipedia-android}} + icon: wiki://Wikipedia-logo-v2.svg + id: out-wikimedia-mobile-wikipedia-android-0-all + label: Wikipedia Mobile App + meta: yes + class: AggregateMessageGroup + +GROUPS: + - out-wikimedia-mobile-wikipedia-* + +--- +BASIC: + description: {{int:translate-group-desc-wikimedia-mobile-wikipedia-android}} + icon: wiki://Wikipedia-logo-v2.svg + id: out-wikimedia-mobile-wikipedia-android-strings + label: Wikipedia Android Mobile (main) + +MANGLER: + prefix: wikipedia-android-strings- + +FILES: + sourcePattern: %GROUPROOT%/wikipedia-android/commons/res/values-%CODE%/strings.xml + definitionFile: %GROUPROOT%/wikipedia-android/commons/res/values/strings.xml -- To view, visit https://gerrit.wikimedia.org/r/116142 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I907de1904d98f8f5d3dda1a3271b86e0024bf19e Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for CLDR plural rule parser for old browsers without Str... - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116159 Change subject: Fix for CLDR plural rule parser for old browsers without String.trim .. Fix for CLDR plural rule parser for old browsers without String.trim This fixes MobileFrontend's last modified message on Kindle 3.4 Bug: 62072 Change-Id: I350264847417f521c111e3cb81da46805608425a --- M resources/mediawiki.libs/CLDRPluralRuleParser.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/116159/1 diff --git a/resources/mediawiki.libs/CLDRPluralRuleParser.js b/resources/mediawiki.libs/CLDRPluralRuleParser.js index 3def37c..83c2524 100644 --- a/resources/mediawiki.libs/CLDRPluralRuleParser.js +++ b/resources/mediawiki.libs/CLDRPluralRuleParser.js @@ -45,7 +45,7 @@ */ // we don't evaluate the samples section of the rule. Ignore it. - rule = rule.split('@')[0].trim(); + rule = rule.split('@')[0].replace(/^\s*/, '').replace(/\s*$/, ''); if (!rule.length) { // empty rule or 'other' rule. -- To view, visit https://gerrit.wikimedia.org/r/116159 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I350264847417f521c111e3cb81da46805608425a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleaner response for captcha-related createaccount API failure - change (mediawiki...ConfirmEdit)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116170 Change subject: Cleaner response for captcha-related createaccount API failure .. Cleaner response for captcha-related createaccount API failure Instead of a generic API error, you get back a non-Success-resulted createapi response, with result='NeedCaptcha'. There's also a warning included with the message key, and of course the captcha key: array ( 'createaccount' = array ( 'result' = 'NeedCaptcha', 'warnings' = array ( 0 = array ( 'type' = 'warning', 'message' = 'captcha-createaccount-fail', 'params' = array ( ), ), ), 'captcha' = array ( 'type' = 'simple', 'mime' = 'text/plain', 'id' = '91510936', 'question' = '76−3', ), ), ) Change-Id: Id1c9e387c592e6d51a5bd58d99ce3d644dfa300b --- M Captcha.php 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/70/116170/1 diff --git a/Captcha.php b/Captcha.php index 20b2dfd..df9a314 100644 --- a/Captcha.php +++ b/Captcha.php @@ -547,7 +547,12 @@ // For older MediaWiki $message = wfMessage( 'captcha-createaccount-fail' )-text(); // For MediaWiki 1.23+ - $status = Status::newFatal( 'captcha-createaccount-fail' ); + $status = Status::newGood(); + + // Apply a *non*-fatal warning. This will still abort the + // account creation but returns a Warning response to the + // API or UI. + $status-warning( 'captcha-createaccount-fail' ); return false; } } @@ -830,6 +835,15 @@ function addNewAccountApiResult( $apiModule, $loginPage, $result ) { if ( $result['result'] !== 'Success' $this-needCreateAccountCaptcha() ) { $this-addCaptchaAPI( $result ); + + // If we failed a captcha, override the generic 'Warning' result string + if ( $result['result'] === 'Warning' isset( $result['warnings'] ) ) { + foreach ( $result['warnings'] as $warning ) { + if ( $warning['message'] === 'captcha-createaccount-fail' ) { + $result['result'] = 'NeedCaptcha'; + } + } + } } return true; } -- To view, visit https://gerrit.wikimedia.org/r/116170 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id1c9e387c592e6d51a5bd58d99ce3d644dfa300b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Let's just set a reasonable size in dp for the captcha image - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116173 Change subject: Let's just set a reasonable size in dp for the captcha image .. Let's just set a reasonable size in dp for the captcha image This lets the image scale up to expected size, and if we end up with GIANT captcha images in future they don't fall offscreen since they'll shrink instead. Change-Id: Ie4a32fa57ab68b36e1061c43c8feddcc863a5908 --- M wikipedia/res/layout/group_captcha.xml 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/73/116173/1 diff --git a/wikipedia/res/layout/group_captcha.xml b/wikipedia/res/layout/group_captcha.xml index 629f1d9..12a29c6 100644 --- a/wikipedia/res/layout/group_captcha.xml +++ b/wikipedia/res/layout/group_captcha.xml @@ -14,21 +14,21 @@ style=?android:textAppearanceMedium android:layout_margin=16dp / -FrameLayout android:layout_width=wrap_content android:layout_height=wrap_content +FrameLayout android:layout_width=fill_parent android:layout_height=wrap_content ImageView android:id=@+id/captcha_image android:layout_gravity=center_horizontal -android:layout_width=wrap_content -android:scaleType=centerInside -android:layout_height=wrap_content +android:layout_width=240dp +android:scaleType=fitCenter +android:layout_height=80dp / ProgressBar android:id=@+id/captcha_image_progress android:indeterminate=true style=?android:progressBarStyleSmall android:visibility=gone -android:layout_width=wrap_content -android:layout_height=wrap_content/ +android:layout_width=fill_parent +android:layout_height=80dp/ /FrameLayout org.wikipedia.styledviews.StyledTextView android:layout_width=match_parent android:layout_height=wrap_content android:text=@string/edit_section_captcha_reload -- To view, visit https://gerrit.wikimedia.org/r/116173 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie4a32fa57ab68b36e1061c43c8feddcc863a5908 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] When following links with hash/fragments on them, jump to th... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116184 Change subject: When following links with hash/fragments on them, jump to the anchor .. When following links with hash/fragments on them, jump to the anchor * Added 'fragment' member to PageTitle * Added tests for processing the fragment * Pass the target fragment through to displaySection in webview * on last section insert, jump to the fragment if present Bug: 61726 Change-Id: Ic651fd3bd130b48addbc1cb565e3d47836e27f2a --- M wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java M wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java M wikipedia-it/src/main/java/org/wikipedia/test/PageFetchTaskTests.java M wikipedia-it/src/main/java/org/wikipedia/test/PageTests.java M wikipedia-it/src/main/java/org/wikipedia/test/PageTitleTests.java M wikipedia-it/src/main/java/org/wikipedia/test/ParcelableTest.java M wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java M wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java M wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java M wikipedia/assets/bundle-test.js M wikipedia/assets/bundle.js M wikipedia/src/main/java/org/wikipedia/PageQueryTask.java M wikipedia/src/main/java/org/wikipedia/PageTitle.java M wikipedia/src/main/java/org/wikipedia/Site.java M wikipedia/src/main/java/org/wikipedia/history/HistoryEntryPersistanceHelper.java M wikipedia/src/main/java/org/wikipedia/interlanguage/LangLinksFetchTask.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java M wikipedia/src/main/java/org/wikipedia/pageimages/PageImagePersistanceHelper.java M wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagePersistanceHelper.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java M www/js/main.js M www/js/sections.js 22 files changed, 71 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/84/116184/1 diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java index 71072c0..67fbd19 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java @@ -17,7 +17,7 @@ public void testEdit() throws Throwable { startActivity(new Intent(), null, null); -final PageTitle title = new PageTitle(null, Test_page_for_app_testing/Section1, new Site(test.wikipedia.org)); +final PageTitle title = new PageTitle(null, Test_page_for_app_testing/Section1, null, new Site(test.wikipedia.org)); final String wikitext = == Section 2 ==\n\nEditing section INSERT RANDOM HERE test at + System.currentTimeMillis(); final WikipediaApp app = (WikipediaApp)getInstrumentation().getTargetContext().getApplicationContext(); final CountDownLatch completionLatch = new CountDownLatch(1); diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java index f538cf4..d930fd0 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/FetchSectionWikitextTaskTests.java @@ -21,7 +21,7 @@ runTestOnUiThread(new Runnable() { @Override public void run() { -PageTitle title = new PageTitle(null, Test_page_for_app_testing/Section1, new Site(test.wikipedia.org)); +PageTitle title = new PageTitle(null, Test_page_for_app_testing/Section1, null, new Site(test.wikipedia.org)); new FetchSectionWikitextTask(getInstrumentation().getTargetContext(),title, 2) { @Override public void onFinish(String result) { diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/PageFetchTaskTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/PageFetchTaskTests.java index ee660da..67979ab 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/PageFetchTaskTests.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/PageFetchTaskTests.java @@ -21,7 +21,7 @@ runTestOnUiThread(new Runnable() { @Override public void run() { -new SectionsFetchTask(getInstrumentation().getTargetContext(), new PageTitle(null, Test_page_for_app_testing/Section1, new Site(test.wikipedia.org)), all) { +new SectionsFetchTask(getInstrumentation().getTargetContext(), new PageTitle(null, Test_page_for_app_testing/Section1, null, new Site(test.wikipedia.org)), all) { @Override public void onFinish(ListSection result) {
[MediaWiki-commits] [Gerrit] Work in progress: save scroll position by element instead of... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116653 Change subject: Work in progress: save scroll position by element instead of raw offset .. Work in progress: save scroll position by element instead of raw offset Instead of saving scroll position as a Y offset in pixels, save a CSS-style query selector against the nearest section header or content section chunk and numbered subparagraph, with an offset against that. Comes closer to keeping us on the 'same' position on rotation, and should survive various minor editing scenarios. Not quite perfect right now; as with the previous fragment support we'll show the loaded HTML before we actually scroll to it. Need to be smarter about the 'loading' crossfade state, so we stay in the loading indicator until the desired scroll position is visible and reached. Another smarter thing would be to scroll as soon as the position exists, then keep adding subsequent sections, rather than wait for all HTML to be applied before scrolling. Bug: 61512 Change-Id: Ia08941adbdd09f5c21eda03deb26e40ac26be792 --- M wikipedia/assets/bundle-test.js M wikipedia/assets/bundle.js M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java M www/js/main.js M www/js/sections.js 5 files changed, 254 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/53/116653/1 diff --git a/wikipedia/assets/bundle-test.js b/wikipedia/assets/bundle-test.js index 470914c..678d135 100644 --- a/wikipedia/assets/bundle-test.js +++ b/wikipedia/assets/bundle-test.js @@ -55,6 +55,78 @@ bridge.sendMessage( imagesListResponse, { images: imageURLs }); } ); +bridge.registerListener( 'scrollToSelector', function( payload ) { +var target = document.querySelector( payload.selector ); +if ( target ) { +var top = target.offsetTop + payload.offset; +window.scrollTo( 0, top ); +} else { +console.log('no exist'); +} +}); + +function getScrollPositionByElement() { +// The system tells us where we are in pixels +var top = window.scrollY; + +// But if we rotate, or the page is edited, that'll be useless. +// Find the top-level paragraph-ish element within the current section that we're in at the top... + +// Could consider using document.elementFromPoint but this may be weird. +var content = document.getElementById('content'); +var el = null; +var section = null; +for ( el = content.firstChild; el.nextSibling !== null; el = el.nextSibling ) { +if ( el.offsetTop = top ) { +// We passed it +break; +} else { +section = el; +} +} +if (section === null ) { +return { +selector: html, +offset: top +}; +} + +// Now look within the section +var target = null, n = 0; +for ( el = section.firstChild; el.nextSibling !== null; el = el.nextSibling ) { +if (el.nodeType === Node.ELEMENT_NODE ) { +if ( el.offsetTop = top ) { +// We passed it +break; +} else { +target = el; +} +n++; +} +} + +if ( target ) { +return { +selector: # + section.id + *:nth-child( + n + ), +offset: top - target.offsetTop +}; +} else { +return { +selector: '#' + section.id, +offset: top - section.offsetTop +}; +} +} + +function updateScrollPosition() { +var positionData = getScrollPositionByElement(); +bridge.sendMessage( updateScrollPosition, positionData ); +} + +window.addEventListener('scroll', function() { +updateScrollPosition(); +}); + },{./bridge:1}],3:[function(require,module,exports){ var bridge = require(../js/bridge); bridge.registerListener( injectScript, function( payload ) { diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index 3ddbe0f..0ba78b1 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -103,6 +103,78 @@ bridge.sendMessage( imagesListResponse, { images: imageURLs }); } ); +bridge.registerListener( 'scrollToSelector', function( payload ) { +var target = document.querySelector( payload.selector ); +if ( target ) { +var top = target.offsetTop + payload.offset; +window.scrollTo( 0, top ); +} else { +console.log('no exist'); +} +}); + +function getScrollPositionByElement() { +// The system tells us where we are in pixels +var top = window.scrollY; + +// But if we rotate, or the page is edited, that'll be useless. +// Find the top-level paragraph-ish element within the current section that we're in at the top... + +// Could consider using document.elementFromPoint but this may be weird. +var content =
[MediaWiki-commits] [Gerrit] Revert Cleanup webviews when we no longer require them - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Revert Cleanup webviews when we no longer require them .. Revert Cleanup webviews when we no longer require them Was causing crashes when back button was pressed. Needs a better longer term memory management solution instead. This reverts commit 488bece3e5fd6985822ec7b404ade1cf16f3bc36. Change-Id: I54503cac5640eeaaf3e5658ae3b2bbe35175dac0 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index c8da5b7..8b0552f 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -327,10 +327,4 @@ } return false; } - -@Override -public void onDestroyView() { -super.onDestroyView(); -webView.destroy(); -} } -- To view, visit https://gerrit.wikimedia.org/r/116752 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54503cac5640eeaaf3e5658ae3b2bbe35175dac0 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove stray whitespace from strings.xml - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116766 Change subject: Remove stray whitespace from strings.xml .. Remove stray whitespace from strings.xml Change-Id: I25010d603028a5799b7585bc2078c0beea9d93ad --- M wikipedia/res/values/strings.xml 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/66/116766/1 diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index da03adb..7b3fc22 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -32,8 +32,7 @@ string name=toast_saved_page_deletedSaved page(s) deleted/string string name=last_updated_textLast updated %1$s/string -string name=content_license_html -![CDATA[Content is available under a class=\external\ rel=\nofollow\ href=\//creativecommons.org/licenses/by-sa/3.0/\CC BY-SA 3.0/a unless otherwise noted]]/string +string name=content_license_html![CDATA[Content is available under a class=\external\ rel=\nofollow\ href=\//creativecommons.org/licenses/by-sa/3.0/\CC BY-SA 3.0/a unless otherwise noted]]/string string name=preference_title_languageLanguage/string string name=preference_summary_languageContent language/string string name=nav_item_preferencesSettings/string @@ -53,9 +52,7 @@ string name=dialog_message_edit_failed_cancelCancel/string string name=menu_show_tocTable of Contents/string string name=search_no_results_foundNo results found/string -string name=edit_section_captcha_messageTo help protect against automated spam, please enter the words that -appear below -/string +string name=edit_section_captcha_messageTo help protect against automated spam, please enter the words that appear below/string string name=edit_section_captcha_hintRepeat words from above/string string name=title_captchaEnter captcha/string string name=edit_section_abusefilter_back_textMake changes to my edit/string @@ -71,8 +68,7 @@ string name=login_error_wrong_usernameIncorrect username/string string name=login_success_toastLogin Success!/string string name=login_error_blockedThis user has been blocked/string -string name=login_error_throttled -![CDATA[Too many login attempts. Wait for a few minutes try again?]]/string +string name=login_error_throttled![CDATA[Too many login attempts. Wait for a few minutes try again?]]/string string name=login_error_unknownLogin failed :(/string string name=login_error_no_networkNo network connection/string string name=nav_item_logoutLog out/string -- To view, visit https://gerrit.wikimedia.org/r/116766 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25010d603028a5799b7585bc2078c0beea9d93ad Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove stray whitespace from strings.xml - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Remove stray whitespace from strings.xml .. Remove stray whitespace from strings.xml Change-Id: I25010d603028a5799b7585bc2078c0beea9d93ad --- M wikipedia/res/values/strings.xml 1 file changed, 3 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index da03adb..7b3fc22 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -32,8 +32,7 @@ string name=toast_saved_page_deletedSaved page(s) deleted/string string name=last_updated_textLast updated %1$s/string -string name=content_license_html -![CDATA[Content is available under a class=\external\ rel=\nofollow\ href=\//creativecommons.org/licenses/by-sa/3.0/\CC BY-SA 3.0/a unless otherwise noted]]/string +string name=content_license_html![CDATA[Content is available under a class=\external\ rel=\nofollow\ href=\//creativecommons.org/licenses/by-sa/3.0/\CC BY-SA 3.0/a unless otherwise noted]]/string string name=preference_title_languageLanguage/string string name=preference_summary_languageContent language/string string name=nav_item_preferencesSettings/string @@ -53,9 +52,7 @@ string name=dialog_message_edit_failed_cancelCancel/string string name=menu_show_tocTable of Contents/string string name=search_no_results_foundNo results found/string -string name=edit_section_captcha_messageTo help protect against automated spam, please enter the words that -appear below -/string +string name=edit_section_captcha_messageTo help protect against automated spam, please enter the words that appear below/string string name=edit_section_captcha_hintRepeat words from above/string string name=title_captchaEnter captcha/string string name=edit_section_abusefilter_back_textMake changes to my edit/string @@ -71,8 +68,7 @@ string name=login_error_wrong_usernameIncorrect username/string string name=login_success_toastLogin Success!/string string name=login_error_blockedThis user has been blocked/string -string name=login_error_throttled -![CDATA[Too many login attempts. Wait for a few minutes try again?]]/string +string name=login_error_throttled![CDATA[Too many login attempts. Wait for a few minutes try again?]]/string string name=login_error_unknownLogin failed :(/string string name=login_error_no_networkNo network connection/string string name=nav_item_logoutLog out/string -- To view, visit https://gerrit.wikimedia.org/r/116766 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I25010d603028a5799b7585bc2078c0beea9d93ad Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Preserve activity web view state across rotation etc - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/116867 Change subject: Preserve activity web view state across rotation etc .. Preserve activity web view state across rotation etc We spent a bunch of trouble looking into ways to preserve the scroll position and other state across orientation changes, with mediocre results. Turns out the Browser app simply ensures that it preserves the activity across orientation and screen size changes -- the webView naturally keeps the correct scroll position across an orientation change if we just let it be instead of recreating everything. Note we may still need to preserve scroll position explicitly across an activity being killed or something, so haven't removed that existing code using the basic scrollY position. Bug: 61512 Change-Id: Iec3ae929d1bd8b0af2d94dcb9664827d659a235d --- M wikipedia/AndroidManifest.xml 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/67/116867/1 diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml index a6175b5..6562582 100644 --- a/wikipedia/AndroidManifest.xml +++ b/wikipedia/AndroidManifest.xml @@ -20,6 +20,7 @@ activity android:name=.page.PageActivity android:theme=@style/NoTitle android:windowSoftInputMode=stateHidden + android:configChanges=orientation|keyboardHidden|keyboard|screenSize intent-filter -- To view, visit https://gerrit.wikimedia.org/r/116867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec3ae929d1bd8b0af2d94dcb9664827d659a235d Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] User is automatically logged in after account creation. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: User is automatically logged in after account creation. .. User is automatically logged in after account creation. Change-Id: Idd68d7af2457f80b85ac50fc9fa1afc9405e5425 --- M Wikipedia-iOS/View Controllers/AccountCreation/AccountCreationViewController.m M Wikipedia-iOS/View Controllers/Login/LoginViewController.h M Wikipedia-iOS/View Controllers/Login/LoginViewController.m M Wikipedia-iOS/View Controllers/TopNav/NavController.m 4 files changed, 95 insertions(+), 53 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia-iOS/View Controllers/AccountCreation/AccountCreationViewController.m b/Wikipedia-iOS/View Controllers/AccountCreation/AccountCreationViewController.m index f77ac24..e8f99b8 100644 --- a/Wikipedia-iOS/View Controllers/AccountCreation/AccountCreationViewController.m +++ b/Wikipedia-iOS/View Controllers/AccountCreation/AccountCreationViewController.m @@ -9,6 +9,9 @@ #import CaptchaResetOp.h #import UIScrollView+ScrollSubviewToLocation.h #import UIButton+ColorMask.h +#import LoginViewController.h +#import UINavigationController+SearchNavStack.h +#import MainMenuTableViewController.h #define NAV ((NavController *)self.navigationController) @@ -248,6 +251,24 @@ } } +-(void)login +{ +LoginViewController *loginVC = [self.navigationController searchNavStackForViewControllerOfClass:[LoginViewController class]]; + +[self showAlert:@Logging in...]; + +[loginVC loginWithUserName:self.usernameField.text password:self.passwordField.text onSuccess:^{ + +MainMenuTableViewController *menuVC = [self.navigationController searchNavStackForViewControllerOfClass:[MainMenuTableViewController class]]; +[self.navigationController popToViewController:menuVC animated:YES]; + +} onFail:^(){ + +[self performSelector:@selector(hide) withObject:nil afterDelay:0.5f]; + +}]; +} + -(void)save { static BOOL isAleadySaving = NO; @@ -281,7 +302,7 @@ dispatch_async(dispatch_get_main_queue(), ^(){ [self showAlert:result]; [self showAlert:@]; - [self performSelector:@selector(hide) withObject:nil afterDelay:1.0f]; + [self performSelector:@selector(login) withObject:nil afterDelay:0.6f]; isAleadySaving = NO; }); diff --git a/Wikipedia-iOS/View Controllers/Login/LoginViewController.h b/Wikipedia-iOS/View Controllers/Login/LoginViewController.h index 7f390a3..83c124d 100644 --- a/Wikipedia-iOS/View Controllers/Login/LoginViewController.h +++ b/Wikipedia-iOS/View Controllers/Login/LoginViewController.h @@ -12,4 +12,9 @@ - (IBAction)createAccountButtonPushed:(id)sender; +- (void)loginWithUserName: (NSString *)userName + password: (NSString *)password +onSuccess: (void (^)(void))successBlock + onFail: (void (^)(void))failBlock; + @end diff --git a/Wikipedia-iOS/View Controllers/Login/LoginViewController.m b/Wikipedia-iOS/View Controllers/Login/LoginViewController.m index 08295b1..5f35a4b 100644 --- a/Wikipedia-iOS/View Controllers/Login/LoginViewController.m +++ b/Wikipedia-iOS/View Controllers/Login/LoginViewController.m @@ -122,7 +122,11 @@ -(void)save { -[self login]; +[self loginWithUserName: self.usernameField.text + password: self.passwordField.text + onSuccess: ^{ + [self performSelector:@selector(hide) withObject:nil afterDelay:1.25f]; + } onFail: nil]; } -(void)hide @@ -147,9 +151,15 @@ // Dispose of any resources that can be recreated. } --(void)login +-(void)loginWithUserName: (NSString *)userName +password: (NSString *)password + onSuccess: (void (^)(void))successBlock + onFail: (void (^)(void))failBlock { [self showAlert:@]; + +if (!successBlock) successBlock = ^(){}; +if (!failBlock) failBlock = ^(){}; /* void (^printCookies)() = ^void(){ @@ -163,57 +173,61 @@ //[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; -NSString *userName = self.usernameField.text; -NSString *password = self.passwordField.text; +LoginOp *loginOp = +[[LoginOp alloc] initWithUsername: userName + password: password + domain: [SessionSingleton sharedInstance].domain + completionBlock: ^(NSString *loginResult){ + + // Login credentials should
[MediaWiki-commits] [Gerrit] Add 'Send Feedback' iten to left nav - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add 'Send Feedback' iten to left nav .. Add 'Send Feedback' iten to left nav Will be stripped out before market release. Change-Id: I80ca683115e7454d7cded126cb3223d5ba08ad52 --- M wikipedia/res/values/strings.xml M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java 2 files changed, 13 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml index 7b3fc22..ca74299 100644 --- a/wikipedia/res/values/strings.xml +++ b/wikipedia/res/values/strings.xml @@ -111,4 +111,5 @@ string name=edit_preview_fetching_dialog_messageFetching preview.../string string name=edit_preview_activity_titlePreview edit/string string name=create_account_logging_inLogging in.../string +string name=nav_item_send_feedbackSend feedback/string /resources diff --git a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java index 0cb4a8b..9823705 100644 --- a/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java @@ -3,6 +3,7 @@ import android.app.*; import android.content.*; import android.graphics.*; +import android.net.*; import android.os.*; import android.support.v4.app.Fragment; import android.view.*; @@ -18,13 +19,15 @@ R.string.nav_item_saved_pages, R.string.nav_item_preferences, R.string.nav_item_login, +R.string.nav_item_send_feedback, R.string.zero_free_verbiage }; private static final int[] ACTION_ITEM_IMAGES = { android.R.drawable.ic_menu_recent_history, android.R.drawable.ic_menu_save, android.R.drawable.ic_menu_preferences, -android.R.drawable.ic_menu_add +android.R.drawable.ic_menu_add, +android.R.drawable.ic_menu_send }; private ListView navList; @@ -81,6 +84,14 @@ break; case R.string.zero_free_verbiage: return; +case R.string.nav_item_send_feedback: +// Will be stripped out in prod builds +intent.setAction(Intent.ACTION_SENDTO); +// Will be moved to a better email address at some point +// FIXME: Have build info here, perhaps? We can't access it anywhere yet + intent.setData(Uri.parse(mailto:yuvipa...@wikimedia.org?subject=Android App Feedback)); +startActivity(intent); +break; default: throw new RuntimeException(Unknown ID clicked!); } -- To view, visit https://gerrit.wikimedia.org/r/117323 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I80ca683115e7454d7cded126cb3223d5ba08ad52 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for save no longer working if initial save attempt failed. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for save no longer working if initial save attempt failed. .. Fix for save no longer working if initial save attempt failed. Change-Id: I3544a26cbe576ccadcce1be28c56f5d80f0f38fb --- M Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m M Wikipedia-iOS/Queues/QueuesSingleton.h M Wikipedia-iOS/Queues/QueuesSingleton.m M Wikipedia-iOS/View Controllers/ArticleLanguages/ArticleLanguagesTableVC.m M Wikipedia-iOS/View Controllers/Preview/PreviewAndSaveViewController.m M Wikipedia-iOS/View Controllers/SectionEditor/SectionEditorViewController.m 6 files changed, 45 insertions(+), 32 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m b/Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m index 41a136f..dc331f8 100644 --- a/Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m +++ b/Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m @@ -9,6 +9,8 @@ -(void)showAlert:(NSString *)alertText { +//NSLog(@alertText = %@, alertText); + [[NSOperationQueue mainQueue] addOperationWithBlock: ^ { AlertLabel *alertLabel = nil; diff --git a/Wikipedia-iOS/Queues/QueuesSingleton.h b/Wikipedia-iOS/Queues/QueuesSingleton.h index 944cb56..6d93d69 100644 --- a/Wikipedia-iOS/Queues/QueuesSingleton.h +++ b/Wikipedia-iOS/Queues/QueuesSingleton.h @@ -10,7 +10,9 @@ @property (strong, nonatomic) NSOperationQueue *thumbnailQ; @property (strong, nonatomic) NSOperationQueue *zeroRatedMessageStringQ; -@property (strong, nonatomic) NSOperationQueue *sectionWikiTextQ; +@property (strong, nonatomic) NSOperationQueue *sectionWikiTextDownloadQ; +@property (strong, nonatomic) NSOperationQueue *sectionWikiTextUploadQ; +@property (strong, nonatomic) NSOperationQueue *sectionWikiTextPreviewQ; @property (strong, nonatomic) NSOperationQueue *langLinksQ; @property (strong, nonatomic) NSOperationQueue *accountCreationQ; diff --git a/Wikipedia-iOS/Queues/QueuesSingleton.m b/Wikipedia-iOS/Queues/QueuesSingleton.m index 80fde12..180f6f7 100644 --- a/Wikipedia-iOS/Queues/QueuesSingleton.m +++ b/Wikipedia-iOS/Queues/QueuesSingleton.m @@ -22,7 +22,9 @@ self.articleRetrievalQ = [[NSOperationQueue alloc] init]; self.searchQ = [[NSOperationQueue alloc] init]; self.thumbnailQ = [[NSOperationQueue alloc] init]; -self.sectionWikiTextQ = [[NSOperationQueue alloc] init]; +self.sectionWikiTextDownloadQ = [[NSOperationQueue alloc] init]; +self.sectionWikiTextUploadQ = [[NSOperationQueue alloc] init]; +self.sectionWikiTextPreviewQ = [[NSOperationQueue alloc] init]; self.langLinksQ = [[NSOperationQueue alloc] init]; self.zeroRatedMessageStringQ = [[NSOperationQueue alloc] init]; self.accountCreationQ = [[NSOperationQueue alloc] init]; diff --git a/Wikipedia-iOS/View Controllers/ArticleLanguages/ArticleLanguagesTableVC.m b/Wikipedia-iOS/View Controllers/ArticleLanguages/ArticleLanguagesTableVC.m index f080d67..db724a0 100644 --- a/Wikipedia-iOS/View Controllers/ArticleLanguages/ArticleLanguagesTableVC.m +++ b/Wikipedia-iOS/View Controllers/ArticleLanguages/ArticleLanguagesTableVC.m @@ -31,7 +31,6 @@ -(void)downloadLangLinkData { -[[QueuesSingleton sharedInstance].langLinksQ cancelAllOperations]; //TODO: fix showAlert to work with table view controllers. //[self showAlert:@Loading language links...]; @@ -56,6 +55,7 @@ }]; +[[QueuesSingleton sharedInstance].langLinksQ cancelAllOperations]; [[QueuesSingleton sharedInstance].langLinksQ addOperation:langLinksOp]; } diff --git a/Wikipedia-iOS/View Controllers/Preview/PreviewAndSaveViewController.m b/Wikipedia-iOS/View Controllers/Preview/PreviewAndSaveViewController.m index 5de5242..84eca7f 100644 --- a/Wikipedia-iOS/View Controllers/Preview/PreviewAndSaveViewController.m +++ b/Wikipedia-iOS/View Controllers/Preview/PreviewAndSaveViewController.m @@ -175,8 +175,8 @@ previewWikiTextOp.delegate = self; -[[QueuesSingleton sharedInstance].sectionWikiTextQ cancelAllOperations]; -[[QueuesSingleton sharedInstance].sectionWikiTextQ addOperation:previewWikiTextOp]; +[[QueuesSingleton sharedInstance].sectionWikiTextPreviewQ cancelAllOperations]; +[[QueuesSingleton sharedInstance].sectionWikiTextPreviewQ addOperation:previewWikiTextOp]; } - (void)didReceiveMemoryWarning @@ -199,8 +199,9 @@ NSManagedObjectID *articleID = section.article.objectID; -UploadSectionWikiTextOp *uploadWikiTextOp = [[UploadSectionWikiTextOp alloc] initForPageTitle:section.article.title domain:section.article.domain section:section.index wikiText:self.wikiText captchaId:self.captchaId captchaWord:self.captchaViewController.captchaTextBox.text completionBlock:^(NSString *result){ -
[MediaWiki-commits] [Gerrit] Update remote config URL to stable production version - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update remote config URL to stable production version .. Update remote config URL to stable production version Change-Id: I2c7e3cc5de433404ed7137527908c69b4096ad6d --- M wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java b/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java index 5d155dc..9dada9e 100644 --- a/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java +++ b/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java @@ -11,7 +11,7 @@ public class RemoteConfigRefreshTask extends RecurringTask { // Switch over to production when it is available -private static final java.lang.String REMOTE_CONFIG_URL = https://bits.wikimedia.org/static-1.24wmf1/extensions/MobileApp/config/android.json;; +private static final java.lang.String REMOTE_CONFIG_URL = https://bits.wikimedia.org/static-current/extensions/MobileApp/config/android.json;; // The 'l' suffix is needed because stupid Java overflows constants otherwise private static final long RUN_INTERVAL_MILLI = 24L * 60L * 60L * 1000L; // Once a day! -- To view, visit https://gerrit.wikimedia.org/r/127679 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c7e3cc5de433404ed7137527908c69b4096ad6d Gerrit-PatchSet: 4 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: data migration from old app - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/129307 Change subject: Work in progress: data migration from old app .. Work in progress: data migration from old app Extracts the list of saved pages from the old app at app startup, but doesn't yet do anything but dump them to console log. Change-Id: I1dc4e230c2dc8320528045081fc834e4c992e992 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m A wikipedia/DataMigrator.h A wikipedia/DataMigrator.m A wikipedia/SQLiteHelper.h A wikipedia/SQLiteHelper.m 6 files changed, 332 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/07/129307/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 708eaee..df58833 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -192,6 +192,9 @@ D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* Main_iPhone.storyboard */; }; D4991454181D51DE00E6073C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; }; D4BC22B4181E9E6300CAC673 /* empty.png in Resources */ = {isa = PBXBuildFile; fileRef = D4BC22B3181E9E6300CAC673 /* empty.png */; }; + D4E8A8A4190835C100DA4765 /* DataMigrator.m in Sources */ = {isa = PBXBuildFile; fileRef = D4E8A8A3190835C100DA4765 /* DataMigrator.m */; }; + D4E8A8A719084F1300DA4765 /* SQLiteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */; }; + D4E8A8A919085CEA00DA4765 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */; }; D4EE00B9182443FC0090790F /* MWPageTitle.m in Sources */ = {isa = PBXBuildFile; fileRef = D4EE00B8182443FC0090790F /* MWPageTitle.m */; }; /* End PBXBuildFile section */ @@ -638,6 +641,11 @@ D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Wikipedia_Tests.m; sourceTree = group; }; D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = group; }; D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; }; + D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataMigrator.h; sourceTree = group; }; + D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataMigrator.m; sourceTree = group; }; + D4E8A8A519084F1300DA4765 /* SQLiteHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteHelper.h; sourceTree = group; }; + D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQLiteHelper.m; sourceTree = group; }; + D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; D4EE00B7182443FC0090790F /* MWPageTitle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWPageTitle.h; path = mw-support/MWPageTitle.h; sourceTree = group; }; D4EE00B8182443FC0090790F /* MWPageTitle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MWPageTitle.m; path = mw-support/MWPageTitle.m; sourceTree = group; }; D4EE00BC1824459D0090790F /* PageTitleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PageTitleTests.m; path = mw-support/PageTitleTests.m; sourceTree = group; }; @@ -648,6 +656,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D4E8A8A919085CEA00DA4765 /* libsqlite3.dylib in Frameworks */, 04D34DB21863D39000610A87 /* libxml2.dylib in Frameworks */, D499143B181D51DE00E6073C /* CoreGraphics.framework in Frameworks */, D499143D181D51DE00E6073C /* UIKit.framework in Frameworks */, @@ -1253,6 +1262,7 @@
[MediaWiki-commits] [Gerrit] Launch icon set. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Launch icon set. .. Launch icon set. Change-Id: Ie9c6769900c893099854acd4bca22a3d7131014b --- M wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json A wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png A wikipedia/Images.xcassets/AppIcon.appiconset/icon80.png A wikipedia/Images.xcassets/AppIcon.appiconset/svg and notes/icon.svg A wikipedia/Images.xcassets/AppIcon.appiconset/svg and notes/notes.txt M wikipedia/Images.xcassets/LaunchImage.launchimage/Contents.json M wikipedia/Wikipedia-Info.plist 18 files changed, 198 insertions(+), 9 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json b/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json index 91bf9c1..3f6a890 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,53 +1,107 @@ { images : [ { - idiom : iphone, size : 29x29, + idiom : iphone, + filename : icon29.png, + scale : 1x +}, +{ + size : 29x29, + idiom : iphone, + filename : icon58.png, scale : 2x }, { - idiom : iphone, size : 40x40, + idiom : iphone, + filename : icon80.png, scale : 2x }, { + size : 57x57, idiom : iphone, + filename : icon57.png, + scale : 1x +}, +{ + size : 57x57, + idiom : iphone, + filename : icon114.png, + scale : 2x +}, +{ size : 60x60, + idiom : iphone, + filename : icon120.png, scale : 2x }, { - idiom : ipad, size : 29x29, + idiom : ipad, + filename : icon29.png, scale : 1x }, { - idiom : ipad, size : 29x29, + idiom : ipad, + filename : icon58.png, scale : 2x }, { - idiom : ipad, size : 40x40, + idiom : ipad, + filename : icon40.png, scale : 1x }, { - idiom : ipad, size : 40x40, + idiom : ipad, + filename : icon80.png, scale : 2x }, { + size : 50x50, idiom : ipad, - size : 76x76, + filename : icon50.png, scale : 1x }, { + size : 50x50, idiom : ipad, + filename : icon100.png, + scale : 2x +}, +{ + size : 72x72, + idiom : ipad, + filename : icon72.png, + scale : 1x +}, +{ + size : 72x72, + idiom : ipad, + filename : icon144.png, + scale : 2x +}, +{ size : 76x76, + idiom : ipad, + filename : icon76.png, + scale : 1x +}, +{ + size : 76x76, + idiom : ipad, + filename : icon152.png, scale : 2x } ], info : { version : 1, author : xcode + }, + properties : { +pre-rendered : true } } \ No newline at end of file diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png new file mode 100644 index 000..46e9221 --- /dev/null +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png new file mode 100644 index 000..b57549f --- /dev/null +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png new file mode 100644 index 000..c3f36ec --- /dev/null +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png new file mode 100644 index 000..c4ee216 --- /dev/null +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png new file mode 100644 index 000..be33d7f
[MediaWiki-commits] [Gerrit] Added missing the to license copy. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Added missing the to license copy. .. Added missing the to license copy. Change-Id: Ib84f2e7ee932340bb1cc12011ab6b11c3f8fdc4f --- 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, approved diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index e2e4f9f..a4728c3 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -51,7 +51,7 @@ 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 = This has less privacy. Your IP address is visible with edits.; -wikitext-upload-save-license = By saving, you agree to release your contributions under $1 license.; +wikitext-upload-save-license = By saving, you agree to release your contributions under the $1 license.; wikitext-upload-save-license-name = CC BY-SA 3.0; search-searching = Searching...; -- To view, visit https://gerrit.wikimedia.org/r/129386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib84f2e7ee932340bb1cc12011ab6b11c3f8fdc4f Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Siebrand siebr...@kitano.nl ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Wikifont now used for main menu icons. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Wikifont now used for main menu icons. .. Wikifont now used for main menu icons. So many fewer pngs! :) Change-Id: I9f55eef4a6d8d7f08471a41025c78bdc0c8dab4f --- M Wikipedia.xcodeproj/project.pbxproj D wikipedia/Images/main_menu_bookmark_white.png D wikipedia/Images/main_menu_bookmark_wh...@2x.png D wikipedia/Images/main_menu_clock_white.png D wikipedia/Images/main_menu_clock_wh...@2x.png D wikipedia/Images/main_menu_dice_white.png D wikipedia/Images/main_menu_dice_wh...@2x.png D wikipedia/Images/main_menu_envelope_white.png D wikipedia/Images/main_menu_envelope_wh...@2x.png D wikipedia/Images/main_menu_face_sleep_white.png D wikipedia/Images/main_menu_face_sleep_wh...@2x.png D wikipedia/Images/main_menu_face_smile_white.png D wikipedia/Images/main_menu_face_smile_wh...@2x.png D wikipedia/Images/main_menu_flag_white.png D wikipedia/Images/main_menu_flag_wh...@2x.png D wikipedia/Images/main_menu_foreign_characters_gray.png D wikipedia/Images/main_menu_foreign_characters_g...@2x.png D wikipedia/Images/main_menu_gear_white.png D wikipedia/Images/main_menu_gear_wh...@2x.png D wikipedia/Images/main_menu_save.png D wikipedia/Images/main_menu_s...@2x.png M wikipedia/View Controllers/MainMenu/MainMenuRowView.h M wikipedia/View Controllers/MainMenu/MainMenuRowView.m M wikipedia/View Controllers/MainMenu/MainMenuRowView.xib M wikipedia/View Controllers/MainMenu/MainMenuViewController.m 25 files changed, 55 insertions(+), 148 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 708eaee..d9e7786 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -51,24 +51,6 @@ 0433542618A093C5009305F0 /* UIView+RemoveConstraints.m in Sources */ = {isa = PBXBuildFile; fileRef = 0433542518A093C5009305F0 /* UIView+RemoveConstraints.m */; }; 0433543518A1A7AE009305F0 /* NavBarTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 0433542E18A1A7AE009305F0 /* NavBarTextField.m */; }; 0433543718A1A7AE009305F0 /* NavController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0433543018A1A7AE009305F0 /* NavController.m */; }; - 043649C018E2573E00B528DB /* main_menu_bookmark_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649AE18E2573E00B528DB /* main_menu_bookmark_white.png */; }; - 043649C218E2573E00B528DB /* main_menu_bookmark_wh...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649AF18E2573E00B528DB /* main_menu_bookmark_wh...@2x.png */; }; - 043649C418E2573E00B528DB /* main_menu_clock_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B018E2573E00B528DB /* main_menu_clock_white.png */; }; - 043649C618E2573E00B528DB /* main_menu_clock_wh...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B118E2573E00B528DB /* main_menu_clock_wh...@2x.png */; }; - 043649C818E2573E00B528DB /* main_menu_dice_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B218E2573E00B528DB /* main_menu_dice_white.png */; }; - 043649CA18E2573E00B528DB /* main_menu_dice_wh...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B318E2573E00B528DB /* main_menu_dice_wh...@2x.png */; }; - 043649CC18E2573E00B528DB /* main_menu_envelope_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B418E2573E00B528DB /* main_menu_envelope_white.png */; }; - 043649CE18E2573E00B528DB /* main_menu_envelope_wh...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B518E2573E00B528DB /* main_menu_envelope_wh...@2x.png */; }; - 043649D018E2573E00B528DB /* main_menu_face_sleep_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B618E2573E00B528DB /* main_menu_face_sleep_white.png */; }; - 043649D218E2573E00B528DB /* main_menu_face_sleep_wh...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B718E2573E00B528DB /* main_menu_face_sleep_wh...@2x.png */; }; - 043649D418E2573E00B528DB /* main_menu_face_smile_white.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B818E2573E00B528DB /* main_menu_face_smile_white.png */; }; - 043649D618E2573E00B528DB /* main_menu_face_smile_wh...@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649B918E2573E00B528DB /* main_menu_face_smile_wh...@2x.png */; }; - 043649D818E2573E00B528DB /* main_menu_foreign_characters_gray.png in Resources */ = {isa = PBXBuildFile; fileRef = 043649BA18E2573E00B528DB /* main_menu_foreign_characters_gray.png */; }; - 043649DA18E2573E00B528DB /* main_menu_foreign_characters_g...@2x.png in Resources */ = {isa =
[MediaWiki-commits] [Gerrit] Fix for crash if no login token retrieved. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for crash if no login token retrieved. .. Fix for crash if no login token retrieved. Change-Id: I63cd6b0910ab6d114abc5e061cac198a75d31110 --- M wikipedia/View Controllers/Login/LoginViewController.m 1 file changed, 4 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Login/LoginViewController.m b/wikipedia/View Controllers/Login/LoginViewController.m index 4be9318..7003904 100644 --- a/wikipedia/View Controllers/Login/LoginViewController.m +++ b/wikipedia/View Controllers/Login/LoginViewController.m @@ -263,9 +263,10 @@ NSLog(@loginTokenOp token = %@, tokenRetrieved); loginOp.token = tokenRetrieved; - [self logEvent: @{@loginSessionToken: tokenRetrieved} - schema: LOG_SCHEMA_LOGIN]; - + if (tokenRetrieved) { + [self logEvent: @{@loginSessionToken: tokenRetrieved} + schema: LOG_SCHEMA_LOGIN]; + } } cancelledBlock: ^(NSError *error){ [self showAlert:@]; -- To view, visit https://gerrit.wikimedia.org/r/129643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63cd6b0910ab6d114abc5e061cac198a75d31110 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Variety of small style / UX tweaks from Vibha. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Variety of small style / UX tweaks from Vibha. .. Variety of small style / UX tweaks from Vibha. Increase font size of edit text. Make article background white not super light gray. Make edit text background super light gray. Switched eye icon to right arrow. Updated colors of edit summary panel and items. Edit summary panel drag handle improved - turns to (taller) down arrow when dragged. Down arrow tap hides panel. Added padding to right of nav bar labels so long i18n text doesn't cram right up to left edge of right nav buttons. Edit summary panel now docks more cleanly with bottom of nav bar. Keyboard hidden if other edit summary panel items tapped. Change-Id: I649738c22c048d8e15c1740f580eb83a699968e7 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/Base.lproj/Main_iPhone.storyboard A wikipedia/View Controllers/EditSummary/EditSummaryHandleView.h A wikipedia/View Controllers/EditSummary/EditSummaryHandleView.m M wikipedia/View Controllers/EditSummary/EditSummaryViewController.h M wikipedia/View Controllers/EditSummary/EditSummaryViewController.m M wikipedia/View Controllers/Preview/PreviewAndSaveViewController.m M wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m M wikipedia/View Controllers/TopNav/NavController.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/styles.css M www/less/pagestyles.less 12 files changed, 210 insertions(+), 68 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index d9e7786..29e3f0c 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -146,6 +146,7 @@ 04DB0BE618BC2E1E00B4BCF3 /* CaptchaResetOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DB0BE518BC2E1E00B4BCF3 /* CaptchaResetOp.m */; }; 04DB0BEA18BD37F900B4BCF3 /* UIScrollView+ScrollSubviewToLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DB0BE918BD37F900B4BCF3 /* UIScrollView+ScrollSubviewToLocation.m */; }; 04DD89B118BFE63A00DD5DAD /* PreviewAndSaveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD89B018BFE63A00DD5DAD /* PreviewAndSaveViewController.m */; }; + 04E6B4A41909EC3D009AD199 /* EditSummaryHandleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04E6B4A31909EC3D009AD199 /* EditSummaryHandleView.m */; }; 04EA3A5B18D25D7700E2F5C4 /* UINavigationController+Alert.m in Sources */ = {isa = PBXBuildFile; fileRef = 04EA3A5A18D25D7700E2F5C4 /* UINavigationController+Alert.m */; }; 04F0E2EA186EDC1A00468738 /* UIWebView+ElementLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F0E2E9186EDC1A00468738 /* UIWebView+ElementLocation.m */; }; 04F0E2EE186FB2D100468738 /* TOCSectionCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04F0E2ED186FB2D100468738 /* TOCSectionCellView.m */; }; @@ -419,6 +420,8 @@ 04DB0BE918BD37F900B4BCF3 /* UIScrollView+ScrollSubviewToLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIScrollView+ScrollSubviewToLocation.m; sourceTree = group; }; 04DD89AF18BFE63A00DD5DAD /* PreviewAndSaveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreviewAndSaveViewController.h; sourceTree = group; }; 04DD89B018BFE63A00DD5DAD /* PreviewAndSaveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreviewAndSaveViewController.m; sourceTree = group; }; + 04E6B4A21909EC3D009AD199 /* EditSummaryHandleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditSummaryHandleView.h; sourceTree = group; }; + 04E6B4A31909EC3D009AD199 /* EditSummaryHandleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditSummaryHandleView.m; sourceTree = group; }; 04E9A78218F73C7200F7ECF7 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = group; }; 04EA3A5918D25D7700E2F5C4 /* UINavigationController+Alert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UINavigationController+Alert.h; sourceTree = group; }; 04EA3A5A18D25D7700E2F5C4 /* UINavigationController+Alert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UINavigationController+Alert.m; sourceTree = group; }; @@ -887,6 +890,8 @@ children = ( 04B9C42718CE5D4D003B5058 /*
[MediaWiki-commits] [Gerrit] Navigation pull-out menu no longer occludes Search bar. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Navigation pull-out menu no longer occludes Search bar. .. Navigation pull-out menu no longer occludes Search bar. Bug: 63812 Change-Id: I29fd1a730370967d66c69e281ae49d16818a52cf --- M wikipedia/res/layout/activity_main.xml M wikipedia/res/layout/fragment_navdrawer.xml 2 files changed, 27 insertions(+), 25 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/wikipedia/res/layout/activity_main.xml b/wikipedia/res/layout/activity_main.xml index 75b97f4..82d92ce 100644 --- a/wikipedia/res/layout/activity_main.xml +++ b/wikipedia/res/layout/activity_main.xml @@ -1,32 +1,32 @@ -android.support.v4.widget.DrawerLayout +FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; -android:id=@+id/drawer_layout -android:layout_width=match_parent -android:saveEnabled=false -android:layout_height=match_parent -!-- The main content view -- -FrameLayout android:layout_width=match_parent android:layout_height=match_parent +xmlns:tools=http://schemas.android.com/tools; android:layout_width=match_parent android:layout_height=match_parent +android.support.v4.widget.DrawerLayout +android:id=@+id/drawer_layout +android:layout_width=match_parent +android:saveEnabled=false +android:layout_height=match_parent +!-- The main content view -- FrameLayout android:id=@+id/content_frame android:layout_width=match_parent android:layout_height=match_parent /FrameLayout -LinearLayout android:layout_width=match_parent android:layout_height=match_parent android:id=@+id/zero_crouton_container -fragment -android:id=@+id/search_fragment -android:name=org.wikipedia.search.SearchArticlesFragment -android:layout_height=wrap_content -android:layout_width=match_parent -android:layout_gravity=top -/ -/LinearLayout +!-- The navigation drawer -- +!-- Don't set marginTop here, it somehow also affects marginBottom. wtf?! -- +fragment android:layout_width=wrap_content android:layout_height=match_parent + android:name=org.wikipedia.NavDrawerFragment + android:layout_gravity=start + tools:layout=@layout/fragment_navdrawer/ -/FrameLayout -!-- The navigation drawer -- -!-- Don't set marginTop here, it somehow also affects marginBottom. wtf?! -- -fragment android:layout_width=wrap_content android:layout_height=match_parent - android:name=org.wikipedia.NavDrawerFragment - android:layout_gravity=start -/ - -/android.support.v4.widget.DrawerLayout +/android.support.v4.widget.DrawerLayout +LinearLayout android:layout_width=match_parent android:layout_height=match_parent android:id=@+id/zero_crouton_container +fragment +android:id=@+id/search_fragment +android:name=org.wikipedia.search.SearchArticlesFragment +android:layout_height=wrap_content +android:layout_width=match_parent +android:layout_gravity=top +tools:layout=@layout/fragment_search/ +/LinearLayout +/FrameLayout \ No newline at end of file diff --git a/wikipedia/res/layout/fragment_navdrawer.xml b/wikipedia/res/layout/fragment_navdrawer.xml index bcdbc1e..d698485 100644 --- a/wikipedia/res/layout/fragment_navdrawer.xml +++ b/wikipedia/res/layout/fragment_navdrawer.xml @@ -5,9 +5,11 @@ android:layout_height=match_parent android:fillViewport=true android:background=#00af89 +!-- Match marginTop with height of Search Fragment -- LinearLayout android:layout_width=match_parent android:layout_height=match_parent android:orientation=vertical + android:layout_marginTop=48dp android:id=@+id/nav_item_container LinearLayout android:layout_width=match_parent -- To view, visit https://gerrit.wikimedia.org/r/129632 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29fd1a730370967d66c69e281ae49d16818a52cf Gerrit-PatchSet: 3 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make action=mobileview GET, not POST. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Make action=mobileview GET, not POST. .. Make action=mobileview GET, not POST. * Android uses GET for action=mobileview. So too shall iOS. * GET will make the traffic eligible for pageview counting. * Future work: if necessary, make parameter order and signatures consistent across platforms. * Future work: if necessary, make one of lead/remaining sections calls a POST to shield against double counting. * Note: the pageview calculation may be mutable to (not) count certain action=mobileview signatures. Change-Id: Ibf62c451f93eb00360f122ae1e1dcd8308f7d617 --- M wikipedia/Categories/NSURLRequest+DictionaryRequest.m M wikipedia/Data/Operations/DownloadLeadSectionOp.m M wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m 3 files changed, 3 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m index ccde940..ae17b7e 100644 --- a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m +++ b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m @@ -43,6 +43,7 @@ [request setHTTPMethod:@GET]; [request addValue:@ forHTTPHeaderField:@Accept-Encoding]; [request addValue:[WikipediaAppUtils versionedUserAgent] forHTTPHeaderField:@User-Agent]; +// NSLog(@%@, [WikipediaAppUtils versionedUserAgent]); [request addValue:@application/x-www-form-urlencoded forHTTPHeaderField:@Content-Type]; return request; } diff --git a/wikipedia/Data/Operations/DownloadLeadSectionOp.m b/wikipedia/Data/Operations/DownloadLeadSectionOp.m index feadd29..0ab9c85 100644 --- a/wikipedia/Data/Operations/DownloadLeadSectionOp.m +++ b/wikipedia/Data/Operations/DownloadLeadSectionOp.m @@ -18,7 +18,7 @@ { self = [super init]; if (self) { -self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] +self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: @{ @action: @mobileview, @prop: @sections|text|lastmodified|lastmodifiedby|languagecount, diff --git a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m index 86c3703..73f08d5 100644 --- a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m @@ -16,7 +16,7 @@ { self = [super init]; if (self) { -self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] +self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: @{ @action: @mobileview, @prop: @sections|text, -- To view, visit https://gerrit.wikimedia.org/r/129823 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf62c451f93eb00360f122ae1e1dcd8308f7d617 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dbrant dbr...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] More GET not POST fixes. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: More GET not POST fixes. .. More GET not POST fixes. Change-Id: Ie31f2c8538567560b7364226a2d48ff3e6b055b0 --- M wikipedia/Data/Operations/DownloadLangLinksOp.m M wikipedia/Data/Operations/DownloadSectionWikiTextOp.m M wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m M wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m M wikipedia/Data/Operations/PageHistoryOp.m M wikipedia/Data/Operations/PreviewWikiTextOp.m M wikipedia/Data/Operations/SearchOp.m M wikipedia/Data/Operations/SearchThumbUrlsOp.m 8 files changed, 8 insertions(+), 7 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Data/Operations/DownloadLangLinksOp.m b/wikipedia/Data/Operations/DownloadLangLinksOp.m index 4946b03..0d44e4b 100644 --- a/wikipedia/Data/Operations/DownloadLangLinksOp.m +++ b/wikipedia/Data/Operations/DownloadLangLinksOp.m @@ -17,7 +17,7 @@ { self = [super init]; if (self) { -self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] +self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: @{ @action: @query, @prop: @langlinks, diff --git a/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m b/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m index 2fbaf82..3acf185 100644 --- a/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m +++ b/wikipedia/Data/Operations/DownloadSectionWikiTextOp.m @@ -18,7 +18,7 @@ { self = [super init]; if (self) { -self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] +self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: @{ @action: @query, @prop: @revisions, diff --git a/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m b/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m index 732dd08..dd0a89b 100644 --- a/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m +++ b/wikipedia/Data/Operations/DownloadTitlesForRandomArticlesOp.m @@ -18,7 +18,7 @@ if (self) { // FUTURE FEATURE: Get multiple titles, and cache them so they're readily available // Will need to consider things like article language changes, though. -self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] +self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: @{ @action: @query, @list: @random, diff --git a/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m b/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m index 801938a..6d3da92 100644 --- a/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m +++ b/wikipedia/Data/Operations/DownloadWikipediaZeroMessageOp.m @@ -16,7 +16,7 @@ { self = [super init]; if (self) { -self.request = [NSURLRequest postRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] +self.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: @{ @action: @zeroconfig, @type: @message, diff --git a/wikipedia/Data/Operations/PageHistoryOp.m b/wikipedia/Data/Operations/PageHistoryOp.m index 796c6bb..7ae44f2 100644 --- a/wikipedia/Data/Operations/PageHistoryOp.m +++ b/wikipedia/Data/Operations/PageHistoryOp.m @@ -38,7 +38,7 @@ //NSLog(@parameters = %@, parameters); -weakSelf.request = [NSURLRequest postRequestWithURL: [NSURL URLWithString:[SessionSingleton sharedInstance].searchApiUrl] +weakSelf.request = [NSURLRequest getRequestWithURL: [NSURL URLWithString:[SessionSingleton sharedInstance].searchApiUrl] parameters: parameters ]; }; diff --git a/wikipedia/Data/Operations/PreviewWikiTextOp.m b/wikipedia/Data/Operations/PreviewWikiTextOp.m index c5abe86..b94479c 100644 --- a/wikipedia/Data/Operations/PreviewWikiTextOp.m
[MediaWiki-commits] [Gerrit] Fix for article history using article domain not search domain. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for article history using article domain not search domain. .. Fix for article history using article domain not search domain. Change-Id: I6ed5d6b60513d3e7383edef743c45bce010b5a19 --- M wikipedia/Data/Operations/PageHistoryOp.m 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Data/Operations/PageHistoryOp.m b/wikipedia/Data/Operations/PageHistoryOp.m index 7ae44f2..cf322dd 100644 --- a/wikipedia/Data/Operations/PageHistoryOp.m +++ b/wikipedia/Data/Operations/PageHistoryOp.m @@ -38,7 +38,7 @@ //NSLog(@parameters = %@, parameters); -weakSelf.request = [NSURLRequest getRequestWithURL: [NSURL URLWithString:[SessionSingleton sharedInstance].searchApiUrl] +weakSelf.request = [NSURLRequest getRequestWithURL: [[SessionSingleton sharedInstance] urlForDomain:domain] parameters: parameters ]; }; -- To view, visit https://gerrit.wikimedia.org/r/130108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ed5d6b60513d3e7383edef743c45bce010b5a19 Gerrit-PatchSet: 2 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Tie together the migrator and the importer - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/130326 Change subject: Tie together the migrator and the importer .. Tie together the migrator and the importer Creates saved page records for all old-app saved pages upon first load, then removes one of the old data files to keep it from triggering again. Note that pages are not actually fetched and saved yet -- you have to load them at least once to populate them. May want to consider a fetch-all process which can be triggered in the background or something. Change-Id: Ibbb839e8396e13971ac1641008bb8b36f9afde88 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m M wikipedia/DataMigrator.m M wikipedia/Importer/ArticleImporter.m M wikipedia/View Controllers/WebView/WebViewController.m 5 files changed, 48 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/26/130326/1 diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 757be2a..c48925f 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -607,8 +607,8 @@ D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Wikipedia_Tests.m; sourceTree = group; }; D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = group; }; D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; }; - D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataMigrator.h; sourceTree = group; }; - D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataMigrator.m; sourceTree = group; }; + D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataMigrator.h; path = wikipedia/DataMigrator.h; sourceTree = SOURCE_ROOT; }; + D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DataMigrator.m; path = wikipedia/DataMigrator.m; sourceTree = SOURCE_ROOT; }; D4E8A8A519084F1300DA4765 /* SQLiteHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteHelper.h; sourceTree = group; }; D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQLiteHelper.m; sourceTree = group; }; D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; @@ -640,6 +640,8 @@ 040E5C831846AC13007AFE6F /* ArticleDataContextSingleton.m */, 04EA7779184E4CED00D2F3C9 /* Model */, 04D149E519CA006B4104 /* Operations */, + D4E8A8A11908357600DA4765 /* Data Migration */, + 04B0EA42190AFDBA007458AF /* Importer */, ); path = Data; sourceTree = group; @@ -885,7 +887,8 @@ 04B0EA43190AFDD8007458AF /* ArticleImporter.h */, 04B0EA44190AFDD8007458AF /* ArticleImporter.m */, ); - path = Importer; + name = Importer; + path = ../Importer; sourceTree = group; }; 04B7B9BA18B5569600A63551 /* Captcha */ = { @@ -1243,12 +1246,10 @@ 045A9F0C18F6090E0057EA85 /* assets */, 04C43AB7183442FC006C643B /* Categories */, 040E5C50184673F2007AFE6F /* Data */, - D4E8A8A11908357600DA4765 /* Data Migration */, 04292FFB185FC026002A13FC /* Defines */, 0442F57C1900718600F55DF9 /* Fonts */, 04D34DA31863D2D600610A87 /* HTML Parsing */, 0466F44C183A30CC00EA1FD7 /* Images */, - 04B0EA42190AFDBA007458AF /* Importer */, 0463639518A844380049EE4F /* Keychain */,
[MediaWiki-commits] [Gerrit] Object for bulk importation of saved pages records. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Object for bulk importation of saved pages records. .. Object for bulk importation of saved pages records. Change-Id: Iacca068c51be43e6e8f547dff6ba99921e750713 --- M Wikipedia.xcodeproj/project.pbxproj A wikipedia/Importer/ArticleImporter.h A wikipedia/Importer/ArticleImporter.m M wikipedia/Session/SessionSingleton.h M wikipedia/Session/SessionSingleton.m 5 files changed, 141 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 1afeab0..28e10c6 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -93,6 +93,7 @@ 04B0EA4A190B2348007458AF /* PreviewLicenseView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B0EA49190B2348007458AF /* PreviewLicenseView.m */; }; 04B0EA4D190E2983007458AF /* NavButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B0EA4C190E2983007458AF /* NavButtonView.m */; }; 04B0EA50190E2E4E007458AF /* NavButtonLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B0EA4F190E2E4E007458AF /* NavButtonLabel.m */; }; + 04B0EA45190AFDD8007458AF /* ArticleImporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B0EA44190AFDD8007458AF /* ArticleImporter.m */; }; 04B6925018E77B2A00F88D8A /* UIWebView+HideScrollGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B6924F18E77B2A00F88D8A /* UIWebView+HideScrollGradient.m */; }; 04B78A5318A580AF0050EBF5 /* LoginOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B78A5218A580AF0050EBF5 /* LoginOp.m */; }; 04B7B9BD18B5570E00A63551 /* CaptchaViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 04B7B9BC18B5570E00A63551 /* CaptchaViewController.m */; }; @@ -318,6 +319,8 @@ 04B0EA4C190E2983007458AF /* NavButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavButtonView.m; sourceTree = group; }; 04B0EA4E190E2E4E007458AF /* NavButtonLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavButtonLabel.h; sourceTree = group; }; 04B0EA4F190E2E4E007458AF /* NavButtonLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavButtonLabel.m; sourceTree = group; }; + 04B0EA43190AFDD8007458AF /* ArticleImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArticleImporter.h; sourceTree = group; }; + 04B0EA44190AFDD8007458AF /* ArticleImporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArticleImporter.m; sourceTree = group; }; 04B6924E18E77B2A00F88D8A /* UIWebView+HideScrollGradient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWebView+HideScrollGradient.h; sourceTree = group; }; 04B6924F18E77B2A00F88D8A /* UIWebView+HideScrollGradient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIWebView+HideScrollGradient.m; sourceTree = group; }; 04B78A5118A580AF0050EBF5 /* LoginOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginOp.h; sourceTree = group; }; @@ -834,6 +837,15 @@ path = AccountCreation; sourceTree = group; }; + 04B0EA42190AFDBA007458AF /* Importer */ = { + isa = PBXGroup; + children = ( + 04B0EA43190AFDD8007458AF /* ArticleImporter.h */, + 04B0EA44190AFDD8007458AF /* ArticleImporter.m */, + ); + path = Importer; + sourceTree = group; + }; 04B7B9BA18B5569600A63551 /* Captcha */ = { isa = PBXGroup; children = ( @@ -1195,6 +1207,7 @@ 0442F57C1900718600F55DF9 /* Fonts */, 04D34DA31863D2D600610A87 /* HTML Parsing */, 0466F44C183A30CC00EA1FD7 /* Images */, + 04B0EA42190AFDBA007458AF /* Importer */, 0463639518A844380049EE4F /* Keychain */, 04CF1CB5187C8F4400E9516F /* Languages */, 048A26741906268100395F53 /* PaddedLabel */, @@ -1536,6 +1549,7 @@ 04C43AC0183442FC006C643B /* NSString+Extras.m in Sources
[MediaWiki-commits] [Gerrit] Work in progress: data migration from old app - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Work in progress: data migration from old app .. Work in progress: data migration from old app Extracts the list of saved pages from the old app at app startup, but doesn't yet do anything but dump them to console log. Change-Id: I1dc4e230c2dc8320528045081fc834e4c992e992 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m A wikipedia/DataMigrator.h A wikipedia/DataMigrator.m A wikipedia/SQLiteHelper.h A wikipedia/SQLiteHelper.m 6 files changed, 332 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 28e10c6..b8e7c5c 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -162,6 +162,9 @@ D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* Main_iPhone.storyboard */; }; D4991454181D51DE00E6073C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; }; D4BC22B4181E9E6300CAC673 /* empty.png in Resources */ = {isa = PBXBuildFile; fileRef = D4BC22B3181E9E6300CAC673 /* empty.png */; }; + D4E8A8A4190835C100DA4765 /* DataMigrator.m in Sources */ = {isa = PBXBuildFile; fileRef = D4E8A8A3190835C100DA4765 /* DataMigrator.m */; }; + D4E8A8A719084F1300DA4765 /* SQLiteHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */; }; + D4E8A8A919085CEA00DA4765 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */; }; D4EE00B9182443FC0090790F /* MWPageTitle.m in Sources */ = {isa = PBXBuildFile; fileRef = D4EE00B8182443FC0090790F /* MWPageTitle.m */; }; /* End PBXBuildFile section */ @@ -583,6 +586,11 @@ D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Wikipedia_Tests.m; sourceTree = group; }; D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = group; }; D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; }; + D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataMigrator.h; sourceTree = group; }; + D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataMigrator.m; sourceTree = group; }; + D4E8A8A519084F1300DA4765 /* SQLiteHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteHelper.h; sourceTree = group; }; + D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQLiteHelper.m; sourceTree = group; }; + D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; D4EE00B7182443FC0090790F /* MWPageTitle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWPageTitle.h; path = mw-support/MWPageTitle.h; sourceTree = group; }; D4EE00B8182443FC0090790F /* MWPageTitle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MWPageTitle.m; path = mw-support/MWPageTitle.m; sourceTree = group; }; D4EE00BC1824459D0090790F /* PageTitleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PageTitleTests.m; path = mw-support/PageTitleTests.m; sourceTree = group; }; @@ -593,6 +601,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D4E8A8A919085CEA00DA4765 /* libsqlite3.dylib in Frameworks */, 04D34DB21863D39000610A87 /* libxml2.dylib in Frameworks */, D499143B181D51DE00E6073C /* CoreGraphics.framework in Frameworks */, D499143D181D51DE00E6073C /* UIKit.framework in Frameworks */, @@ -1180,6 +1189,7 @@ D4991437181D51DE00E6073C /* Frameworks */ = {
[MediaWiki-commits] [Gerrit] Tie together the migrator and the importer - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Tie together the migrator and the importer .. Tie together the migrator and the importer Creates saved page records for all old-app saved pages upon first load, then removes one of the old data files to keep it from triggering again. Note that pages are not actually fetched and saved yet -- you have to load them at least once to populate them. May want to consider a fetch-all process which can be triggered in the background or something. Change-Id: Ibbb839e8396e13971ac1641008bb8b36f9afde88 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m M wikipedia/DataMigrator.m M wikipedia/Importer/ArticleImporter.m M wikipedia/View Controllers/WebView/WebViewController.m 5 files changed, 48 insertions(+), 28 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index b8e7c5c..32cd3d1 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -586,8 +586,8 @@ D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Wikipedia_Tests.m; sourceTree = group; }; D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = group; }; D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; }; - D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataMigrator.h; sourceTree = group; }; - D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataMigrator.m; sourceTree = group; }; + D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataMigrator.h; path = wikipedia/DataMigrator.h; sourceTree = SOURCE_ROOT; }; + D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DataMigrator.m; path = wikipedia/DataMigrator.m; sourceTree = SOURCE_ROOT; }; D4E8A8A519084F1300DA4765 /* SQLiteHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteHelper.h; sourceTree = group; }; D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQLiteHelper.m; sourceTree = group; }; D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; @@ -619,6 +619,8 @@ 040E5C831846AC13007AFE6F /* ArticleDataContextSingleton.m */, 04EA7779184E4CED00D2F3C9 /* Model */, 04D149E519CA006B4104 /* Operations */, + D4E8A8A11908357600DA4765 /* Data Migration */, + 04B0EA42190AFDBA007458AF /* Importer */, ); path = Data; sourceTree = group; @@ -852,7 +854,8 @@ 04B0EA43190AFDD8007458AF /* ArticleImporter.h */, 04B0EA44190AFDD8007458AF /* ArticleImporter.m */, ); - path = Importer; + name = Importer; + path = ../Importer; sourceTree = group; }; 04B7B9BA18B5569600A63551 /* Captcha */ = { @@ -1213,12 +1216,10 @@ 045A9F0C18F6090E0057EA85 /* assets */, 04C43AB7183442FC006C643B /* Categories */, 040E5C50184673F2007AFE6F /* Data */, - D4E8A8A11908357600DA4765 /* Data Migration */, 04292FFB185FC026002A13FC /* Defines */, 0442F57C1900718600F55DF9 /* Fonts */, 04D34DA31863D2D600610A87 /* HTML Parsing */, 0466F44C183A30CC00EA1FD7 /* Images */, - 04B0EA42190AFDBA007458AF /* Importer */, 0463639518A844380049EE4F /* Keychain */, 04CF1CB5187C8F4400E9516F /* Languages */,
[MediaWiki-commits] [Gerrit] Update icon set from design svg. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update icon set from design svg. .. Update icon set from design svg. Adds a gray thingie at the bottom. Not my favorite, but eh. Change-Id: I780f8ad5d28e131ce148630adfe2fa49bb8bc62d --- M wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png M wikipedia/Images.xcassets/AppIcon.appiconset/icon80.png M wikipedia/Images.xcassets/AppIcon.appiconset/svg and notes/icon.svg 14 files changed, 23 insertions(+), 59 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png index 46e9221..f2cab74 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon100.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png index b57549f..b05f30f 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon114.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png index c3f36ec..5ea5d8d 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon120.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png index c4ee216..0e044a7 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon144.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png index be33d7f..96eeb95 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon152.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png index fef8e60..986e0f6 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon29.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png index 10efbc9..4174113 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon40.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png index ba7cb55..ebe6c47 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon50.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png index 7b3387e..63eb82f 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon57.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png index 0c177aa..fd2bbd8 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon58.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png index 0104e38..3992be0 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon72.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png b/wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png index 6e662e4..b80ff1d 100644 --- a/wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png +++ b/wikipedia/Images.xcassets/AppIcon.appiconset/icon76.png Binary files differ diff --git a/wikipedia/Images.xcassets/AppIcon.appiconset/icon80.png
[MediaWiki-commits] [Gerrit] Defined WikiFont characters rather than pasting raw chars. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Defined WikiFont characters rather than pasting raw chars. .. Defined WikiFont characters rather than pasting raw chars. As Brion pointed out, the raw chars don't render in xCode so they're hard to read. The define names I used are based on the names from the names from the WikiFont repo's font.css file. Change-Id: Ic7515a61ebdb8bcc4111d18eb9f5118e88dc689c --- M Wikipedia.xcodeproj/project.pbxproj A wikipedia/Defines/WMF_WikiFont_Chars.h M wikipedia/View Controllers/MainMenu/MainMenuViewController.m M wikipedia/View Controllers/PageHistory/PageHistoryViewController.m M wikipedia/View Controllers/TopNav/NavController.m 5 files changed, 190 insertions(+), 21 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 1afeab0..cc51073 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -279,6 +279,7 @@ 0466F44E183A30CC00EA1FD7 /* logo-search-placehol...@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo-search-placehol...@2x.png; sourceTree = group; }; 04735E5E18A5B42D00C89C30 /* LoginTokenOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginTokenOp.h; sourceTree = group; }; 04735E5F18A5B42D00C89C30 /* LoginTokenOp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginTokenOp.m; sourceTree = group; }; + 047528A3190F0C2900F2CDA8 /* WMF_WikiFont_Chars.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMF_WikiFont_Chars.h; sourceTree = group; }; 0476967A18BBFC9400071963 /* AccountCreationOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountCreationOp.h; sourceTree = group; }; 0476967B18BBFC9400071963 /* AccountCreationOp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccountCreationOp.m; sourceTree = group; }; 047801BC18AE987900DBB747 /* UIButton+ColorMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIButton+ColorMask.h; sourceTree = group; }; @@ -641,6 +642,7 @@ children = ( 04292FFC185FC026002A13FC /* Defines.h */, 043F18F118DCDD3A00D8489A /* WMF_Colors.h */, + 047528A3190F0C2900F2CDA8 /* WMF_WikiFont_Chars.h */, ); path = Defines; sourceTree = group; diff --git a/wikipedia/Defines/WMF_WikiFont_Chars.h b/wikipedia/Defines/WMF_WikiFont_Chars.h new file mode 100644 index 000..b2eebb7 --- /dev/null +++ b/wikipedia/Defines/WMF_WikiFont_Chars.h @@ -0,0 +1,161 @@ + +/* UI ELEMENTS e000_023 */ + +#define WIKIFONT_CHAR_MAGNIFYING_GLASS @\ue000 + +#define WIKIFONT_CHAR_ARROW_LEFT @\ue001 + +#define WIKIFONT_CHAR_TICK @\ue002 + +#define WIKIFONT_CHAR_X @\ue003 + +#define WIKIFONT_CHAR_X_CIRCLE @\ue004 + +#define WIKIFONT_CHAR_UNSTAR @\ue005 + +#define WIKIFONT_CHAR_STAR @\ue006 + +#define WIKIFONT_CHAR_SUN@\ue007 + +#define WIKIFONT_CHAR_STAR_CIRCLE@\ue008 + +#define WIKIFONT_CHAR_FUNNEL @\ue009 + +#define WIKIFONT_CHAR_EYE@\ue010 + +#define WIKIFONT_CHAR_EYE_LID@\ue011 + +#define WIKIFONT_CHAR_BOOKMARK @\ue012 + +#define WIKIFONT_CHAR_PRINTER@\ue013 + +#define WIKIFONT_CHAR_PUZZLE @\ue014 + +#define WIKIFONT_CHAR_CLOCK @\ue015 + +#define WIKIFONT_CHAR_DICE @\ue016 + +#define WIKIFONT_CHAR_MOVE @\ue017 + +#define WIKIFONT_CHAR_GEAR @\ue018 + +#define WIKIFONT_CHAR_ELLIPSIS @\ue019 + +#define WIKIFONT_CHAR_ENVELOPE @\ue020 + +#define WIKIFONT_CHAR_PIN@\ue021 + +#define WIKIFONT_CHAR_CARET @\ue022 + +#define WIKIFONT_CHAR_DOWNLOAD @\ue023 + + + +/* STRIPES e040_043 */ + +#define WIKIFONT_CHAR_STRIPE_COMPACT @\ue040 + +#define WIKIFONT_CHAR_STRIPE_TOC @\ue041 + +#define WIKIFONT_CHAR_STRIPE_EXPANDED@\ue042 + + + +/* WIKIPEDIA LOGO e400_401 */ + +#define WIKIFONT_CHAR_W @\ue400 + + + +/* UI MODERATION ELEMENTS e500_508 */ + +#define WIKIFONT_CHAR_ARTICLE
[MediaWiki-commits] [Gerrit] When keyboard appears on edit, scroll cursor above keyboard. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: When keyboard appears on edit, scroll cursor above keyboard. .. When keyboard appears on edit, scroll cursor above keyboard. Change-Id: I0ee7969922cec156c67a1ca65cb67e0397006fac --- M wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m 1 file changed, 13 insertions(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m b/wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m index a7b5c84..ac59abd 100644 --- a/wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m +++ b/wikipedia/View Controllers/SectionEditor/SectionEditorViewController.m @@ -295,6 +295,14 @@ UIEdgeInsets contentInsets = UIEdgeInsetsMake(0.0, 0.0, viewKeyboardRect.size.height, 0.0); self.editTextView.contentInset = contentInsets; self.editTextView.scrollIndicatorInsets = contentInsets; + +// Mark the text view as needing a layout update so the inset changes above will +// be taken in to account when the cursor is scrolled onscreen. +[self.editTextView setNeedsLayout]; +[self.editTextView layoutIfNeeded]; + +// Scroll cursor onscreen if needed. +[self scrollTextViewSoCursorNotUnderKeyboard:self.editTextView]; } - (void)keyboardWillBeHidden:(NSNotification*)aNotification @@ -313,6 +321,11 @@ CGRect cursorRectInTextView = [textView caretRectForPosition:textView.selectedTextRange.start]; CGRect cursorRectInView = [textView convertRect:cursorRectInTextView toView:self.view]; if(CGRectIntersectsRect(self.viewKeyboardRect, cursorRectInView)){ + +CGFloat margin = -20; +// Margin here is the amount the cursor will be scrolled above the top of the keyboard. +cursorRectInTextView = CGRectInset(cursorRectInTextView, 0, margin); + [textView scrollRectToVisible:cursorRectInTextView animated:YES]; } } -- To view, visit https://gerrit.wikimedia.org/r/130219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ee7969922cec156c67a1ca65cb67e0397006fac Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add pagestyle, preview and abusefilter modules - change (mediawiki...MobileApp)
Brion VIBBER has submitted this change and it was merged. Change subject: Add pagestyle, preview and abusefilter modules .. Add pagestyle, preview and abusefilter modules Imports from the Android App. - Embed all images specified here directly. This keeps relative / absolute URL issues to a minimum. - font.less not added yet, due to relative URL issues Change-Id: Ie242037926a8b557c7e5ebb9f841e51a974196c3 --- M MobileApp.php A images/edit.png R less/pagestyles.less A less/preview.less A less/ui.less A less/wikihacks.less 6 files changed, 140 insertions(+), 14 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/MobileApp.php b/MobileApp.php index 807dd17..b70f057 100644 --- a/MobileApp.php +++ b/MobileApp.php @@ -27,10 +27,30 @@ $wgMessagesDirs['MobileApp'] = __DIR__ . /i18n; -$wgResourceModules['mobile.app'] = array( - 'styles' = array( - 'less/common.less' - ), +$wgCommonMobileAppModuleDef = array( 'localBasePath' = $localBasePath, 'remoteExtPath' = $remoteExtPath ); + +$wgCommonMobileAppLESSFiles = array( + 'less/pagestyles.less', + 'less/wikihacks.less' +); + +$wgResourceModules['mobile.app.pagestyle'] = array( + 'styles' = array( + 'less/ui.less', + ) + $wgCommonMobileAppLESSFiles +) + $wgCommonMobileAppModuleDef; + +$wgResourceModules['mobile.app.preview'] = array( + 'styles' = array( + 'less/preview.less', + ) + $wgCommonMobileAppLESSFiles +) + $wgCommonMobileAppModuleDef; + +$wgResourceModules['mobile.app.abusefilter'] = array( + 'styles' = array( + 'less/abusefilter.less', + ) + $wgCommonMobileAppLESSFiles +) + $wgCommonMobileAppModuleDef; diff --git a/images/edit.png b/images/edit.png new file mode 100644 index 000..4d773a3 --- /dev/null +++ b/images/edit.png Binary files differ diff --git a/less/common.less b/less/pagestyles.less similarity index 89% rename from less/common.less rename to less/pagestyles.less index ee025ce..faccc8f 100644 --- a/less/common.less +++ b/less/pagestyles.less @@ -7,6 +7,10 @@ margin: 0; padding: 0; margin-top: 48px; + +// Deal with long links (bug 60387) +word-wrap: break-word; + } #content { @@ -21,7 +25,7 @@ /* Headers */ h1 { font-family: serif; -color: #064AAD; +color: #333; font-size: 26px; line-height: 36px; margin-bottom: 24px; @@ -84,14 +88,5 @@ border: 1px solid #ccc; margin-top: 4px; margin-bottom: 4px; -} - -/* Last updated info */ -#attribution { -border-top: 1px solid #ccc; -padding: 8px; -text-align: center; -color: #888; -font-size: 80%; } diff --git a/less/preview.less b/less/preview.less new file mode 100644 index 000..61b470a --- /dev/null +++ b/less/preview.less @@ -0,0 +1,4 @@ +/* Hide the stupid editlink */ +.edit-page { + display: none; +} diff --git a/less/ui.less b/less/ui.less new file mode 100644 index 000..4fee95a --- /dev/null +++ b/less/ui.less @@ -0,0 +1,55 @@ +a.edit_section_button { +height: 32px; +width: 32px; + /* @embed */ +background-image: url(../images/edit.png); +background-size: 32px 32px; +float: right; +display: inline-float; +} + +.no-editing { +.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 { +border: 4px solid rgba(0, 0, 0, .1); +border-top: 4px solid rgba(0, 0, 0, .4); +border-radius: 100%; +-webkit-animation: rot .6s infinite linear; +} + +@-webkit-keyframes rot { +from { +-webkit-transform: rotate(0deg); +} +to { +-webkit-transform: rotate(359deg); +} +} + +#loading_sections { +margin: 8px auto; +height: 24px; +width: 24px; +} + +/* Last updated info */ +#attribution { + border-top: 1px solid #ccc; + padding: 8px; + text-align: center; + color: #888; + font-size: 80%; +} diff --git a/less/wikihacks.less b/less/wikihacks.less new file mode 100644 index 000..df4d440 --- /dev/null +++ b/less/wikihacks.less @@ -0,0 +1,52 @@ +/* +Imported from MobileFrontend. Should be made into a live link later. +A file for css that corrects known rendering issues on known Wikimedia wikis. + +the following definitions exist to deal with certain inline styles +present in wikitext. +This file should not need to exist +It will become redundant when the following RFC is resolved: +https://www.mediawiki.org/wiki/Requests_for_comment/Allow_styling_in_templates + +FIXME: Review all of these hacks to see if they still apply. +*/ + +/* Hide some on-wiki defined classes + - Issue boxes, Nav Boxes, co-ordinates are hidden + - Investigate
[MediaWiki-commits] [Gerrit] Merge common LESS files properly - change (mediawiki...MobileApp)
Brion VIBBER has submitted this change and it was merged. Change subject: Merge common LESS files properly .. Merge common LESS files properly Change-Id: Id8d6a2394130ca6a92c4cef59369e2d8e445450b --- M MobileApp.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/MobileApp.php b/MobileApp.php index dd2ec81..3f479aa 100644 --- a/MobileApp.php +++ b/MobileApp.php @@ -41,13 +41,13 @@ ); $wgResourceModules['mobile.app.pagestyle'] = array( - 'styles' = array( + 'styles' = array_merge( array( 'less/ui.less', - ) + $wgCommonMobileAppLESSFiles + ), $wgCommonMobileAppLESSFiles ) ) + $wgCommonMobileAppModuleDef; $wgResourceModules['mobile.app.preview'] = array( - 'styles' = array( + 'styles' = array_merge( array( 'less/preview.less', - ) + $wgCommonMobileAppLESSFiles + ), $wgCommonMobileAppLESSFiles ) ) + $wgCommonMobileAppModuleDef; -- To view, visit https://gerrit.wikimedia.org/r/133737 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id8d6a2394130ca6a92c4cef59369e2d8e445450b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileApp Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed extra files. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Removed extra files. .. Removed extra files. Change-Id: I479e1533039c23a3c0b545bdb5abda0617602df6 --- M wikipedia/View Controllers/Navigation/Center/CenterNavController.h D wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h D wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m D wikipedia/View Controllers/Navigation/Center/NavBarTextField.h D wikipedia/View Controllers/Navigation/Center/NavBarTextField.m D wikipedia/View Controllers/Navigation/Center/NavButtonLabel.h D wikipedia/View Controllers/Navigation/Center/NavButtonLabel.m D wikipedia/View Controllers/Navigation/Center/NavButtonView.h D wikipedia/View Controllers/Navigation/Center/NavButtonView.m 9 files changed, 1 insertion(+), 224 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h index 7e6ff88..cf28919 100644 --- a/wikipedia/View Controllers/Navigation/Center/CenterNavController.h +++ b/wikipedia/View Controllers/Navigation/Center/CenterNavController.h @@ -27,4 +27,4 @@ @end -//TODO: maybe use currentNavBarTextFieldText instead of currentSearchString? +//TODO: maybe use currentTopMenuTextFieldText instead of currentSearchString? diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h b/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h deleted file mode 100644 index a232121..000 --- a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.h +++ /dev/null @@ -1,8 +0,0 @@ -// Created by Monte Hurd on 2/6/14. -// Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! - -#import UIKit/UIKit.h - -@interface NavBarContainerView : UIView - -@end diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m b/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m deleted file mode 100644 index d0758e4..000 --- a/wikipedia/View Controllers/Navigation/Center/NavBarContainerView.m +++ /dev/null @@ -1,17 +0,0 @@ -// Created by Monte Hurd on 2/6/14. -// Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! - -#import NavBarContainerView.h - -@implementation NavBarContainerView - -- (void)drawRect:(CGRect)rect { -CGContextRef context = UIGraphicsGetCurrentContext(); -CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMaxY(rect)); -CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect)); -CGContextSetStrokeColorWithColor(context, [[UIColor lightGrayColor] CGColor] ); -CGContextSetLineWidth(context, 1.0f / [UIScreen mainScreen].scale); -CGContextStrokePath(context); -} - -@end diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.h b/wikipedia/View Controllers/Navigation/Center/NavBarTextField.h deleted file mode 100644 index 0e48205..000 --- a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.h +++ /dev/null @@ -1,11 +0,0 @@ -// Created by Monte Hurd on 11/23/13. -// Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! - -#import UIKit/UIKit.h - -@interface NavBarTextField : UITextField - -@property(nonatomic, copy) NSString *placeholder; -@property(nonatomic, strong) UIColor *placeholderColor; - -@end diff --git a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.m b/wikipedia/View Controllers/Navigation/Center/NavBarTextField.m deleted file mode 100644 index ccb5735..000 --- a/wikipedia/View Controllers/Navigation/Center/NavBarTextField.m +++ /dev/null @@ -1,77 +0,0 @@ -// Created by Monte Hurd on 11/23/13. -// Copyright (c) 2013 Wikimedia Foundation. Provided under MIT-style license; please copy and modify! - -#import NavBarTextField.h -#import Defines.h - -@implementation NavBarTextField - -@synthesize placeholder = _placeholder; -@synthesize placeholderColor = _placeholderColor; - -- (id)initWithFrame:(CGRect)frame -{ -self = [super initWithFrame:frame]; -if (self) { -self.placeholderColor = SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR; -} -return self; -} - -// Adds left padding without messing up leftView or rightView. -// From: http://stackoverflow.com/a/14357720 - -- (CGRect)textRectForBounds:(CGRect)bounds { -CGRect ret = [super textRectForBounds:bounds]; -ret.origin.x = ret.origin.x + 10; -ret.size.width = ret.size.width - 20; -return ret; -} - -- (CGRect)editingRectForBounds:(CGRect)bounds { -return [self textRectForBounds:bounds]; -} - --(void)setPlaceholder:(NSString *)placeholder -{ -_placeholder = placeholder; -self.attributedPlaceholder = [self getAttributedPlaceholderForString:(!placeholder) ? @:
[MediaWiki-commits] [Gerrit] Work in progress: language marker button in doc area (not ye... - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/134678 Change subject: Work in progress: language marker button in doc area (not yet functional) .. Work in progress: language marker button in doc area (not yet functional) Looks more or less like the mockup at https://trello-attachments.s3.amazonaws.com/52e98a603e6d08a53861025b/5363dc861f242dbd5eb6af22/4881x3543/879a1efeee2a2eb7ad4fa19e4de513e0/Apps_Language%26EditHistory_Sprint31.png though not 100% exact just yet. Do we need/want a single-character icon in the icon font for the Aあ bit? Change-Id: I46f40a347ee5d0c60b9c9b320c4bffc8da780d07 --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/styles.css M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings M www/Gruntfile.js 5 files changed, 55 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/78/134678/1 diff --git a/wikipedia/View Controllers/WebView/WebViewController.m b/wikipedia/View Controllers/WebView/WebViewController.m index ad60e83..762c914 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1308,7 +1308,9 @@ self.scrollOffset = scrollOffset; -[sectionTextArray addObject:[NSString stringWithFormat:@THIS MANY LANGS AVAILABLE = %d, langCount.integerValue]]; +if (mode != DISPLAY_LEAD_SECTION) { +[sectionTextArray addObject: [self renderLanguageButtonForCount: langCount.integerValue]]; +} // Join article sections text @@ -1331,6 +1333,15 @@ }]; } +-(NSString *)renderLanguageButtonForCount:(NSInteger)count +{ +NSString *aa = @span class=\mw-language-icon\Aあ/span; +NSString *countStr = [NSString stringWithFormat:@span class=\mw-language-count\%d/span, (int)count]; +NSString *otherLanguages = [NSString stringWithFormat:@span class=\mw-language-label\%@/span, MWLocalizedString(@language-button-other-languages, nil)]; + +return [NSString stringWithFormat:@button class=\mw-language-button\%@%@%@/button, aa, countStr, otherLanguages]; +} + #pragma mark Scroll to last section after rotate -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css index 60cf097..d64ed09 100644 --- a/wikipedia/assets/styles.css +++ b/wikipedia/assets/styles.css @@ -8,7 +8,8 @@ line-height: 26px; } html { --webkit-text-size-adjust: none; /* Never autoresize text */ + -webkit-text-size-adjust: none; + /* Never autoresize text */ } #ios_app_content { margin: 0px; @@ -154,3 +155,40 @@ -webkit-transform: scaleX(-1); transform: scaleX(-1); } + +.mw-language-button { + appearance: none; + -webkit-appearance: none; + display: -webkit-flex; + -webkit-flex-direction: row; + -webkit-flex-wrap: nowrap; + -webkit-align-items: center; + width: 200px; + color: #aaa; + background: #222; + font-size: 24px; + padding: 12px; +} +.mw-language-icon, +.mw-language-number, +.mw-language-label { + -webkit-flex-grow: 2; +} +.mw-language-icon { + text-align: right; + color: white; + padding-right: 12px; + border-right: solid 1px #aaa; + white-space: nowrap; + font-family: AvenirNextCondensed-Medium; +} +.mw-language-count { + text-align: center; + padding-left: 12px; +} +.mw-language-label { + -webkit-flex-grow: 5; + text-align: left; + padding-left: 12px; + font-size: 10px; +} diff --git a/wikipedia/en.lproj/Localizable.strings b/wikipedia/en.lproj/Localizable.strings index 9b0839f..ae19526 100644 --- a/wikipedia/en.lproj/Localizable.strings +++ b/wikipedia/en.lproj/Localizable.strings @@ -3,6 +3,8 @@ article-languages-downloading = Loading article languages...; article-languages-filter-placeholder = Filter; +language-button-other-languages = Other Languages; + history-label = Browsing History; history-section-today = Today; history-section-yesterday = Yesterday; diff --git a/wikipedia/qqq.lproj/Localizable.strings b/wikipedia/qqq.lproj/Localizable.strings index 9962213..58bb95e 100644 --- a/wikipedia/qqq.lproj/Localizable.strings +++ b/wikipedia/qqq.lproj/Localizable.strings @@ -110,3 +110,4 @@ credits-gerrit-repo = Text for item linking to the app's main gerrit repository; credits-github-mirror = Text for item linking to the app's mirrored GitHub repository; credits-external-libraries = Title for area of credits page showing external open source libraries used by app.\n{{Identical|External}}; +language-button-other-languages = Label for 'other languages' button in content area. Button also shows the number of available languages, but an indeterminate plural should be used here.; diff --git a/www/Gruntfile.js b/www/Gruntfile.js index ce00dff..759d6b5
[MediaWiki-commits] [Gerrit] Update to wikiFont adding temp supplemental ios characters. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update to wikiFont adding temp supplemental ios characters. .. Update to wikiFont adding temp supplemental ios characters. Change-Id: I09d42ba0e3deb38aeecc279c3e1109b00a48e302 --- M wikipedia/Base.lproj/Main_iPhone.storyboard M wikipedia/Defines/WMF_WikiFont_Chars.h M wikipedia/Fonts/WikiFont.ttf M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.h M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuButtonView.h M wikipedia/View Controllers/Navigation/Top/TopMenuButtonView.m M wikipedia/View Controllers/Navigation/Top/TopMenuLabel.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/Wikipedia-Prefix.pch 11 files changed, 193 insertions(+), 119 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 21c605a..1fd3ae6 100644 --- a/wikipedia/Base.lproj/Main_iPhone.storyboard +++ b/wikipedia/Base.lproj/Main_iPhone.storyboard @@ -1212,73 +1212,42 @@ rect key=frame x=0.0 y=0.0 width=320 height=45/ autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ subviews -button clearsContextBeforeDrawing=NO contentMode=scaleToFill horizontalHuggingPriority=251 enabled=NO contentHorizontalAlignment=center contentVerticalAlignment=center buttonType=roundedRect lineBreakMode=middleTruncation translatesAutoresizingMaskIntoConstraints=NO id=gmW-77-RAG userLabel=Back Button +view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=vRW-Da-kEk customClass=TopMenuButtonView rect key=frame x=0.0 y=0.0 width=40 height=45/ -autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ +autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/ +color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ constraints -constraint firstAttribute=width constant=40 id=ltg-Vu-7lf/ +constraint firstAttribute=width constant=40 id=eSx-Bm-x3b/ /constraints -fontDescription key=fontDescription type=system pointSize=25/ -state key=normal title=lt; -color key=titleColor white=0.0 alpha=1 colorSpace=calibratedWhite/ -color key=titleShadowColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ -/state -state key=highlighted -color key=titleColor white=0.0 alpha=1 colorSpace=calibratedWhite/ -color key=titleShadowColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ -/state -connections -action selector=backButtonPushed: destination=d5t-sx-LhF eventType=touchUpInside id=K4B-XY-xce/ -/connections -/button -button clearsContextBeforeDrawing=NO contentMode=scaleToFill horizontalHuggingPriority=251 enabled=NO contentHorizontalAlignment=center contentVerticalAlignment=center buttonType=roundedRect lineBreakMode=middleTruncation translatesAutoresizingMaskIntoConstraints=NO id=KXj-9d-MdS userLabel=Forward Button +/view +view contentMode=scaleToFill translatesAutoresizingMaskIntoConstraints=NO id=1LN-g3-9sh customClass=TopMenuButtonView rect key=frame x=75 y=0.0 width=40 height=45/ -autoresizingMask key=autoresizingMask flexibleMaxX=YES flexibleMaxY=YES/ +autoresizingMask key=autoresizingMask widthSizable=YES heightSizable=YES/ +color key=backgroundColor white=0.0 alpha=0.0 colorSpace=calibratedWhite/ constraints -constraint
[MediaWiki-commits] [Gerrit] Hooked up basic share sheet. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Hooked up basic share sheet. .. Hooked up basic share sheet. Change-Id: Ib2eb26ec68515a01204157cc207eee5db66d1e3c --- M wikipedia/Categories/NSString+Extras.h M wikipedia/Categories/NSString+Extras.m M wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m M wikipedia/View Controllers/History/HistoryViewController.m M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuButtonView.m M wikipedia/View Controllers/SavedPages/SavedPagesViewController.m M wikipedia/View Controllers/SearchResults/SearchResultsController.m M wikipedia/View Controllers/WebView/WebViewController.m 9 files changed, 58 insertions(+), 21 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/NSString+Extras.h b/wikipedia/Categories/NSString+Extras.h index 2d9a6dd..5574f05 100644 --- a/wikipedia/Categories/NSString+Extras.h +++ b/wikipedia/Categories/NSString+Extras.h @@ -14,6 +14,7 @@ - (NSString *)randomlyRepeatMaxTimes:(NSUInteger)maxTimes; -- (NSString *)cleanWikiTitle; +- (NSString *)wikiTitleWithoutUnderscores; +- (NSString *)wikiTitleWithoutSpaces; @end diff --git a/wikipedia/Categories/NSString+Extras.m b/wikipedia/Categories/NSString+Extras.m index 1b0975e..74fc208 100644 --- a/wikipedia/Categories/NSString+Extras.m +++ b/wikipedia/Categories/NSString+Extras.m @@ -99,9 +99,14 @@ return [NSString stringWithFormat:@%@, [randStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]]; } -- (NSString *)cleanWikiTitle +- (NSString *)wikiTitleWithoutUnderscores { return [self stringByReplacingOccurrencesOfString:@_ withString:@ ]; } +- (NSString *)wikiTitleWithoutSpaces +{ +return [self stringByReplacingOccurrencesOfString:@ withString:@_]; +} + @end diff --git a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m index 00048d1..376c605 100644 --- a/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadNonLeadSectionsOp.m @@ -68,7 +68,7 @@ NSMutableDictionary *mutableSection = section.mutableCopy; if ([mutableSection[@fromtitle] isKindOfClass:[NSString class]]) { NSString *fromTitle = mutableSection[@fromtitle]; -if ([[title cleanWikiTitle] isEqualToString:[fromTitle cleanWikiTitle]]) { +if ([[title wikiTitleWithoutUnderscores] isEqualToString:[fromTitle wikiTitleWithoutUnderscores]]) { [mutableSection removeObjectForKey:@fromtitle]; } }else{ diff --git a/wikipedia/View Controllers/History/HistoryViewController.m b/wikipedia/View Controllers/History/HistoryViewController.m index 4fffbe3..80fdd4e 100644 --- a/wikipedia/View Controllers/History/HistoryViewController.m +++ b/wikipedia/View Controllers/History/HistoryViewController.m @@ -283,7 +283,7 @@ historyEntry = (History *)[articleDataContext_.mainContext objectWithID:historyEntryId]; }]; -NSString *title = [historyEntry.article.title cleanWikiTitle]; +NSString *title = [historyEntry.article.title wikiTitleWithoutUnderscores]; NSString *language = [NSString stringWithFormat:@\n%@, historyEntry.article.domainName]; NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index 29602ef..a7ec2b2 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -12,6 +12,8 @@ #import TopMenuButtonView.h #import TopMenuLabel.h #import UIViewController+Alert.h +#import UIView+TemporaryAnimatedXF.h +#import NSString+Extras.h typedef NS_ENUM(NSInteger, BottomMenuItemTag) { BOTTOM_MENU_BUTTON_UNKNOWN = 0, @@ -70,14 +72,25 @@ #pragma mark Bottom bar button methods -//TODO: Pull bottomBarView and into own object (and its subviews - the back and forward view/buttons/methods, etc). - - (void)buttonPushed:(UITapGestureRecognizer *)sender { -TopMenuButtonView *tappedButton = (TopMenuButtonView *)sender.view; -if (!tappedButton.enabled)return; +// If the tapped item was a button, first animate it briefly, then perform action. +if([sender.view isKindOfClass:[TopMenuButtonView class]]){ +TopMenuButtonView *button = (TopMenuButtonView *)sender.view; +if (!button.enabled)return; +CGFloat animationScale = 1.25f; +[button.label animateAndRewindXF: CATransform3DMakeScale(animationScale, animationScale, 1.0f) +
[MediaWiki-commits] [Gerrit] Marked lang insertion point. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Marked lang insertion point. .. Marked lang insertion point. Change-Id: I5145eb987c54b3eb07c8c93ae13bb204da7f45a1 --- M wikipedia/View Controllers/WebView/WebViewController.m 1 file changed, 4 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 d029ea7..ad509ea 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -1302,6 +1302,10 @@ } self.scrollOffset = scrollOffset; + + +[sectionTextArray addObject:[NSString stringWithFormat:@THIS MANY LANGS AVAILABLE = %d, langCount.integerValue]]; + // Join article sections text NSString *joint = @; //@div style=\background-color:#ff;height:55px;\/div; -- To view, visit https://gerrit.wikimedia.org/r/134653 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5145eb987c54b3eb07c8c93ae13bb204da7f45a1 Gerrit-PatchSet: 3 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Work in progress: language marker button in doc area - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Work in progress: language marker button in doc area .. Work in progress: language marker button in doc area Looks more or less like the mockup at https://trello-attachments.s3.amazonaws.com/52e98a603e6d08a53861025b/5363dc861f242dbd5eb6af22/4881x3543/879a1efeee2a2eb7ad4fa19e4de513e0/Apps_Language%26EditHistory_Sprint31.png though not 100% exact just yet. Questions: * Should this be added to ToC as well? * Do we need/want a single-character icon in the icon font for the Aあ bit? Or should we use the existing one that's different from the mockup? * How should the button respond visually while being pressed? * How should the marker be displayed when no languages available? Or leave it out as now? * Exact wrapping/pixel-level details and localization questions... Change-Id: I46f40a347ee5d0c60b9c9b320c4bffc8da780d07 --- M wikipedia/View Controllers/WebView/WebViewController.m M wikipedia/assets/bundle.js M wikipedia/assets/styles.css M wikipedia/en.lproj/Localizable.strings M wikipedia/qqq.lproj/Localizable.strings M www/Gruntfile.js M www/js/listeners.js A www/less/langbutton.less 8 files changed, 189 insertions(+), 24 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 ad509ea..027e01c 100644 --- a/wikipedia/View Controllers/WebView/WebViewController.m +++ b/wikipedia/View Controllers/WebView/WebViewController.m @@ -678,7 +678,12 @@ [weakSelf showSectionEditor]; }]; - + +[self.bridge addListener:@langClicked withBlock:^(NSString *messageType, NSDictionary *payload) { +NSLog(@Language button pushed); +[weakSelf languageButtonPushed]; +}]; + [self.bridge addListener:@nonAnchorTouchEndedWithoutDragging withBlock:^(NSString *messageType, NSDictionary *payload) { NSLog(@nonAnchorTouchEndedWithoutDragging = %@, payload); @@ -1304,7 +1309,9 @@ self.scrollOffset = scrollOffset; -[sectionTextArray addObject:[NSString stringWithFormat:@THIS MANY LANGS AVAILABLE = %d, langCount.integerValue]]; +if (mode != DISPLAY_LEAD_SECTION) { +[sectionTextArray addObject: [self renderLanguageButtonForCount: langCount.integerValue]]; +} // Join article sections text @@ -1327,6 +1334,19 @@ }]; } +-(NSString *)renderLanguageButtonForCount:(NSInteger)count +{ +if (count 0) { +NSString *aa = @span class=\mw-language-icon\Aあ/span; +NSString *countStr = [NSString stringWithFormat:@span class=\mw-language-count\%d/span, (int)count]; +NSString *otherLanguages = [NSString stringWithFormat:@span class=\mw-language-label\%@/span, MWLocalizedString(@language-button-other-languages, nil)]; + +return [NSString stringWithFormat:@button class=\mw-language-button\span class=\mw-language-items\%@%@%@/span/button, aa, countStr, otherLanguages]; +} else { +return @; +} +} + #pragma mark Scroll to last section after rotate -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js index c4caa93..896ca6f 100644 --- a/wikipedia/assets/bundle.js +++ b/wikipedia/assets/bundle.js @@ -158,6 +158,41 @@ bridge.sendMessage( pong, payload ); }); +/** + * Quickie function to walk from the current element up to parents and match CSS-ish selectors. + * Think of it as a reverse element.querySelector :) + * + * Takes only element names, raw classes, and ids right now. Combines all given. + */ +function findParent(element, selector) { +var matches = selector.match(/^([a-z0-9]*)(?:\.([a-z0-9-]+))?(?:#([a-z0-9-]+))?$/i); +if (matches) { +var selectorName = matches[1] || null; +var selectorClass = matches[2] || null; +var selectorId = matches[3] || null; + +var candidate = element; +while (candidate) { +do { +if (selectorName candidate.tagName selectorName.toLowerCase() !== candidate.tagName.toLowerCase()) { +break; +} +if (selectorClass selectorClass !== candidate.className) { +break; +} +if (selectorId selectorId !== candidate.id) { +break; +} +return candidate; +} while (false); +candidate = candidate.parentNode; +} +} else { +throw new Error(Unexpected findParent selector format: + selector); +} +return null; +} + document.onclick = function() { /* @@ -171,15 +206,7 @@ encountered. */ -var
[MediaWiki-commits] [Gerrit] Fix for search term highlighting font size and TOC updates. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for search term highlighting font size and TOC updates. .. Fix for search term highlighting font size and TOC updates. When non-lead section of article were retrieved while TOC was open, there was a regression which caused new sections/images to not appear in the TOC until it was closed and opened again. Ran ttfautohint on WikiFont.ttf Fix for sharing some articles with special characters in their titles causing app crash. When you select a search result the top menu switches back to default chrome. Returned search result text size - had accidentally shrunken the result article titles. Change-Id: I1d96b8f9d01e5077f5091a4ad161a36272ac6112 --- M wikipedia/Categories/Article+Convenience.h M wikipedia/Categories/Article+Convenience.m M wikipedia/Defines/Defines.h M wikipedia/Fonts/WikiFont.ttf M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m M wikipedia/View Controllers/SearchResults/SearchResultsController.m M wikipedia/View Controllers/WebView/WebViewController.m 8 files changed, 54 insertions(+), 24 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/Article+Convenience.h b/wikipedia/Categories/Article+Convenience.h index 8c6dac3..ed58405 100644 --- a/wikipedia/Categories/Article+Convenience.h +++ b/wikipedia/Categories/Article+Convenience.h @@ -12,4 +12,6 @@ // larger than 99 x 99 px. - (UIImage *)getThumbnailUsingContext:(NSManagedObjectContext *)context; +- (NSURL *)desktopURL; + @end diff --git a/wikipedia/Categories/Article+Convenience.m b/wikipedia/Categories/Article+Convenience.m index 167ad22..70a22d0 100644 --- a/wikipedia/Categories/Article+Convenience.m +++ b/wikipedia/Categories/Article+Convenience.m @@ -5,6 +5,7 @@ #import ArticleCoreDataObjects.h #import Image+Convenience.h #import Defines.h +#import NSString+Extras.h @implementation Article (Convenience) @@ -88,4 +89,17 @@ return sectionImages; } +-(NSURL *)desktopURL +{ +NSString *titleWithoutSpaces = [self.title wikiTitleWithoutSpaces]; + +NSString *urlString = +[NSString stringWithFormat:@https://%@.%@/wiki/%@;, self.domain, self.site, titleWithoutSpaces]; + +NSString *encodedUrlString = +[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + +return encodedUrlString ? [NSURL URLWithString:encodedUrlString] : nil; +} + @end diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h index 2983b1b..01ab479 100644 --- a/wikipedia/Defines/Defines.h +++ b/wikipedia/Defines/Defines.h @@ -4,11 +4,14 @@ #define SEARCH_RESULT_HEIGHT 60 #define SEARCH_MAX_RESULTS @25 -#define SEARCH_FONT [UIFont systemFontOfSize:14.0] -#define SEARCH_FONT_COLOR [UIColor colorWithWhite:0.0 alpha:0.85] +#define SEARCH_TEXT_FIELD_FONT [UIFont systemFontOfSize:14.0] +#define SEARCH_TEXT_FIELD_HIGHLIGHTED_COLOR [UIColor blackColor] -#define SEARCH_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:16.0] -#define SEARCH_FONT_HIGHLIGHTED_COLOR [UIColor blackColor] +#define SEARCH_RESULT_FONT [UIFont systemFontOfSize:16.0] +#define SEARCH_RESULT_FONT_COLOR [UIColor colorWithWhite:0.0 alpha:0.85] + +#define SEARCH_RESULT_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:16.0] +#define SEARCH_RESULT_FONT_HIGHLIGHTED_COLOR [UIColor blackColor] #define SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR [UIColor colorWithRed:0.7 green:0.7 blue:0.7 alpha:1.0] diff --git a/wikipedia/Fonts/WikiFont.ttf b/wikipedia/Fonts/WikiFont.ttf index ab851d0..66ec0c0 100644 --- a/wikipedia/Fonts/WikiFont.ttf +++ b/wikipedia/Fonts/WikiFont.ttf Binary files differ diff --git a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m index a7ec2b2..b5df308 100644 --- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m +++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m @@ -14,6 +14,7 @@ #import UIViewController+Alert.h #import UIView+TemporaryAnimatedXF.h #import NSString+Extras.h +#import Article+Convenience.h typedef NS_ENUM(NSInteger, BottomMenuItemTag) { BOTTOM_MENU_BUTTON_UNKNOWN = 0, @@ -108,7 +109,7 @@ - (void)shareButtonPushed { NSString *title = @; -NSURL *URL = nil; +NSURL *desktopURL = nil; NSManagedObjectID *articleID = [articleDataContext_.mainContext getArticleIDForTitle: [SessionSingleton sharedInstance].currentArticleTitle @@ -116,13 +117,18 @@ if (articleID) { Article *article = (Article *)[articleDataContext_.mainContext objectWithID:articleID]; if (article) { -NSString *titleWithoutSpaces = [article.title wikiTitleWithoutSpaces]; -URL = [NSURL
[MediaWiki-commits] [Gerrit] Data migration for old saved pages - bookmarks - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/131539 Change subject: Data migration for old saved pages - bookmarks .. Data migration for old saved pages - bookmarks This is done once on first launch, synchronously. Should still be pretty fast since it's only saving the page title entries, not fetching any of their data. Change-Id: I4063447c9f29e4267cf547de040ddcf871dd7816 --- M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java A wikipedia/src/main/java/org/wikipedia/migration/ArticleImporter.java A wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java 3 files changed, 143 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/39/131539/1 diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 54bf450..102a3b7 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -7,10 +7,12 @@ import android.net.*; import android.os.*; import android.preference.*; +import android.util.Log; import android.webkit.*; import com.squareup.otto.*; import org.acra.*; import org.acra.annotation.*; +import org.json.JSONObject; import org.mediawiki.api.json.*; import org.wikipedia.analytics.*; import org.wikipedia.data.*; @@ -18,6 +20,8 @@ import org.wikipedia.editing.summaries.*; import org.wikipedia.history.*; import org.wikipedia.login.*; +import org.wikipedia.migration.ArticleImporter; +import org.wikipedia.migration.DataMigrator; import org.wikipedia.networking.*; import org.wikipedia.pageimages.*; import org.wikipedia.bookmarks.*; @@ -99,6 +103,24 @@ throw new RuntimeException(e); } +try { +DataMigrator dataMigrator = new DataMigrator(this); +if (dataMigrator.hasData()) { +// whee +Log.d(Wikipedia, Migrating old app data...); +ArticleImporter articleImporter = new ArticleImporter(this); +ListJSONObject pages = dataMigrator.extractSavedPages(); +Log.d(Wikipedia, Importing + pages.size() + old saved pages as bookmarks...); +articleImporter.importArticles(pages); +Log.d(Wikipedia, Deleting old saved pages table); +dataMigrator.removeOldData(); +Log.d(Wikipedia, Migration done.); +} else { +Log.d(Wikipedia, No old app data to migrate); +} +} catch (Exception e) { +Log.d(Wikipedia, Migration code fail: + e); +} } public Bus getBus() { diff --git a/wikipedia/src/main/java/org/wikipedia/migration/ArticleImporter.java b/wikipedia/src/main/java/org/wikipedia/migration/ArticleImporter.java new file mode 100644 index 000..2434221 --- /dev/null +++ b/wikipedia/src/main/java/org/wikipedia/migration/ArticleImporter.java @@ -0,0 +1,35 @@ +package org.wikipedia.migration; + +import org.json.JSONObject; +import org.wikipedia.PageTitle; +import org.wikipedia.Site; +import org.wikipedia.WikipediaApp; +import org.wikipedia.bookmarks.Bookmark; +import org.wikipedia.bookmarks.BookmarkPersister; + +import android.content.Context; +import java.util.List; + +public class ArticleImporter { +private final WikipediaApp app; + +public ArticleImporter(Context context) { +app = (WikipediaApp) context.getApplicationContext(); +} + +public void importArticles(ListJSONObject articles) { +// +BookmarkPersister persister = (BookmarkPersister) app.getPersister(Bookmark.class); + +for (JSONObject item : articles) { +PageTitle title = titleForItem(item); +Bookmark bookmark = new Bookmark(title); +persister.upsert(bookmark); +} +} + +private PageTitle titleForItem(JSONObject item) { +Site site = new Site(item.optString(lang) + .wikipedia.org); +return new PageTitle(null, item.optString(title), site); +} +} diff --git a/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java b/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java new file mode 100644 index 000..6d5a72b --- /dev/null +++ b/wikipedia/src/main/java/org/wikipedia/migration/DataMigrator.java @@ -0,0 +1,86 @@ +package org.wikipedia.migration; + +import android.content.Context; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.util.Log; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +public class DataMigrator { +Context context; + +public DataMigrator(Context context) { +super(); +this.context = context; +} + +/** + * @return Are databases from the
[MediaWiki-commits] [Gerrit] Removed un-used files. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Removed un-used files. .. Removed un-used files. Change-Id: Ia507dab9ac2fe98d81d7b5b551f69bf23034ece1 --- D wikipedia/View Controllers/TopNav/AlertLabel.h D wikipedia/View Controllers/TopNav/AlertLabel.m 2 files changed, 0 insertions(+), 63 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/TopNav/AlertLabel.h b/wikipedia/View Controllers/TopNav/AlertLabel.h deleted file mode 100644 index 85509de..000 --- a/wikipedia/View Controllers/TopNav/AlertLabel.h +++ /dev/null @@ -1,7 +0,0 @@ -// Created by Monte Hurd on 12/9/13. - -#import UIKit/UIKit.h - -@interface AlertLabel : UILabel - -@end diff --git a/wikipedia/View Controllers/TopNav/AlertLabel.m b/wikipedia/View Controllers/TopNav/AlertLabel.m deleted file mode 100644 index cb81062..000 --- a/wikipedia/View Controllers/TopNav/AlertLabel.m +++ /dev/null @@ -1,56 +0,0 @@ -// Created by Monte Hurd on 12/9/13. - -#import AlertLabel.h - -@implementation AlertLabel - -- (id)init -{ -self = [super init]; -if (self) { -self.alpha = 0.0f; - -self.minimumScaleFactor = 0.2; -self.font = [UIFont systemFontOfSize:10]; -self.textAlignment = NSTextAlignmentCenter; -self.textColor = [UIColor darkGrayColor]; -self.backgroundColor = [UIColor redColor];//colorWithWhite:1.0 alpha:0.7]; -} -return self; -} - --(void)setHidden:(BOOL)hidden -{ -if (hidden){ -[UIView beginAnimations:nil context:NULL]; -[UIView setAnimationDuration:0.35]; -[UIView setAnimationDelay:1.0f]; -[self setAlpha:0.0f]; -[UIView commitAnimations]; -}else{ -[self setAlpha:1.0f]; -} -} - --(void)setText:(NSString *)text -{ -if (text.length == 0){ -// Just fade out if message is set to empty string -self.hidden = YES; -}else{ -super.text = text; -self.hidden = NO; -} -} - -- (void)drawRect:(CGRect)rect { -[super drawRect:rect]; -CGContextRef context = UIGraphicsGetCurrentContext(); -CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMaxY(rect)); -CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect)); -CGContextSetStrokeColorWithColor(context, [[UIColor lightGrayColor] CGColor] ); -CGContextSetLineWidth(context, 1.0); -CGContextStrokePath(context); -} - -@end -- To view, visit https://gerrit.wikimedia.org/r/131543 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia507dab9ac2fe98d81d7b5b551f69bf23034ece1 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix for doubled self reference. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Fix for doubled self reference. .. Fix for doubled self reference. Change-Id: I3b46ae4dc0d1154427f9dc8082b31e1eae412782 --- M wikipedia/View Controllers/MainMenu/MainMenuViewController.m 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/View Controllers/MainMenu/MainMenuViewController.m b/wikipedia/View Controllers/MainMenu/MainMenuViewController.m index 8d5ec72..91c7441 100644 --- a/wikipedia/View Controllers/MainMenu/MainMenuViewController.m +++ b/wikipedia/View Controllers/MainMenu/MainMenuViewController.m @@ -214,19 +214,19 @@ NSAttributedString *searchWikiTitle = [MWLocalizedString(@main-menu-language-title, nil) attributedStringWithAttributes: nil substitutionStrings: @[[SessionSingleton sharedInstance].domainName] - substitutionAttributes: @[self.self.highlightedTextAttributes] + substitutionAttributes: @[self.highlightedTextAttributes] ]; NSAttributedString *saveArticleTitle = [MWLocalizedString(@main-menu-current-article-save, nil) attributedStringWithAttributes: nil substitutionStrings: @[currentArticleTitle] - substitutionAttributes: @[self.self.highlightedTextAttributes] + substitutionAttributes: @[self.highlightedTextAttributes] ]; NSAttributedString *pageHistoryTitle = [MWLocalizedString(@main-menu-show-page-history, nil) attributedStringWithAttributes: nil substitutionStrings: @[currentArticleTitle] - substitutionAttributes: @[self.self.highlightedTextAttributes] + substitutionAttributes: @[self.highlightedTextAttributes] ]; NSMutableArray *rowData = -- To view, visit https://gerrit.wikimedia.org/r/131538 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b46ae4dc0d1154427f9dc8082b31e1eae412782 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd mh...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add MCC-MNC once per app session on cellular. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add MCC-MNC once per app session on cellular. .. Add MCC-MNC once per app session on cellular. * http://lists.wikimedia.org/pipermail/wikimedia-l/2014-April/071131.html Change-Id: I1c145a623abb582449152f0cf37ffaac3e8829ff --- M wikipedia/Categories/NSURLRequest+DictionaryRequest.m M wikipedia/Zero/ZeroConfigState.h 2 files changed, 43 insertions(+), 0 deletions(-) Approvals: Mhurd: Looks good to me, but someone else must approve Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m index ae17b7e..cd285f4 100644 --- a/wikipedia/Categories/NSURLRequest+DictionaryRequest.m +++ b/wikipedia/Categories/NSURLRequest+DictionaryRequest.m @@ -3,7 +3,11 @@ #import NSURLRequest+DictionaryRequest.h #import NSString+Extras.h +#import SessionSingleton.h #import WikipediaAppUtils.h +#import CoreTelephony/CTCarrier.h +#import CoreTelephony/CTTelephonyNetworkInfo.h +#include SystemConfiguration/SystemConfiguration.h @implementation NSURLRequest (DictionaryRequest) @@ -30,6 +34,7 @@ [request addValue:@ forHTTPHeaderField:@Accept-Encoding]; [request addValue:[WikipediaAppUtils versionedUserAgent] forHTTPHeaderField:@User-Agent]; // NSLog(@%@, [WikipediaAppUtils versionedUserAgent]); +[self addMCCMNCToRequestIfAppropriate:request]; [request setHTTPBody:[[NSURLRequest constructEncodedURL:parameters] dataUsingEncoding:NSUTF8StringEncoding]]; return request; } @@ -45,6 +50,43 @@ [request addValue:[WikipediaAppUtils versionedUserAgent] forHTTPHeaderField:@User-Agent]; // NSLog(@%@, [WikipediaAppUtils versionedUserAgent]); [request addValue:@application/x-www-form-urlencoded forHTTPHeaderField:@Content-Type]; +[self addMCCMNCToRequestIfAppropriate:request]; return request; } + +#pragma MCC-MNC Logging + +// Add the MCC-MNC code asn HTTP (protocol) header once per session when user using cellular data connection. +// Logging will be done in its own file with specific fields. See the following URL for details. +// http://lists.wikimedia.org/pipermail/wikimedia-l/2014-April/071131.html + ++(void) addMCCMNCToRequestIfAppropriate: (NSMutableURLRequest*) req +{ +if ([SessionSingleton sharedInstance].zeroConfigState.sentMCCMNC) { +return; +} else { +CTCarrier *mno = [[[CTTelephonyNetworkInfo alloc] init] subscriberCellularProvider]; +if (mno) { +SCNetworkReachabilityRef reachabilityRef = SCNetworkReachabilityCreateWithName(NULL, + [[[req URL] host] UTF8String]); +SCNetworkReachabilityFlags reachabilityFlags; +SCNetworkReachabilityGetFlags(reachabilityRef, reachabilityFlags); + +// The following is a good functioning mask in practice for the case where +// cellular is being used, with wifi not on / there are no known wifi APs. +// When wifi is on with a known wifi AP connection, kSCNetworkReachabilityFlagsReachable +// is present, but kSCNetworkReachabilityFlagsIsWWAN is not present. +if (reachabilityFlags == (kSCNetworkReachabilityFlagsIsWWAN + | kSCNetworkReachabilityFlagsReachable + | kSCNetworkReachabilityFlagsTransientConnection)) { +NSString *mccMnc = [[NSString alloc] initWithFormat:@%@-%@, [mno mobileCountryCode], [mno mobileNetworkCode]]; +[SessionSingleton sharedInstance].zeroConfigState.sentMCCMNC = true; +[req addValue:mccMnc forHTTPHeaderField:@X-MCCMNC]; +// NSLog(@%@, mccMnc); +} +} +} +} + + @end diff --git a/wikipedia/Zero/ZeroConfigState.h b/wikipedia/Zero/ZeroConfigState.h index 3df69c4..44d5982 100644 --- a/wikipedia/Zero/ZeroConfigState.h +++ b/wikipedia/Zero/ZeroConfigState.h @@ -7,6 +7,7 @@ @property (strong, nonatomic) NSString *partnerXcs; @property (nonatomic) BOOL disposition; +@property (nonatomic) BOOL sentMCCMNC; @property (nonatomic, readonly) BOOL zeroOnDialogShownOnce; @property (nonatomic, readonly) BOOL zeroOffDialogShownOnce; @property (nonatomic, readonly) BOOL warnWhenLeaving; -- To view, visit https://gerrit.wikimedia.org/r/130674 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1c145a623abb582449152f0cf37ffaac3e8829ff Gerrit-PatchSet: 5 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org Gerrit-Reviewer: Mhurd mh...@wikimedia.org
[MediaWiki-commits] [Gerrit] Add API action=watchlistclear to bulk-clear watchlist. - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/132378 Change subject: Add API action=watchlistclear to bulk-clear watchlist. .. Add API action=watchlistclear to bulk-clear watchlist. Requested by bot runners, who often accumulate huge watchlists and have trouble resetting them. Requires POST and a token to prevent accidents or abuse. Same token as individual watching. https://www.mediawiki.org/wiki/API:WatchlistClear Bug: 65058 Change-Id: Id8476a1ba8b2661cf6451cacf3121d5c2d0675cf --- M includes/AutoLoader.php M includes/api/ApiMain.php A includes/api/ApiWatchlistClear.php 3 files changed, 107 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/132378/1 diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index bfee420..d6e1766 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -355,6 +355,7 @@ 'ApiUpload' = 'includes/api/ApiUpload.php', 'ApiUserrights' = 'includes/api/ApiUserrights.php', 'ApiWatch' = 'includes/api/ApiWatch.php', + 'APiWatchlistClear' = 'includes/api/ApiWatchlistClear.php', 'UsageException' = 'includes/api/ApiMain.php', # includes/cache diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 554bfa6..4b8febd 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -79,6 +79,7 @@ 'filerevert' = 'ApiFileRevert', 'emailuser' = 'ApiEmailUser', 'watch' = 'ApiWatch', + 'watchlistclear' = 'ApiWatchlistClear', 'patrol' = 'ApiPatrol', 'import' = 'ApiImport', 'userrights' = 'ApiUserrights', diff --git a/includes/api/ApiWatchlistClear.php b/includes/api/ApiWatchlistClear.php new file mode 100644 index 000..6f699af --- /dev/null +++ b/includes/api/ApiWatchlistClear.php @@ -0,0 +1,105 @@ +?php +/** + * Created on May 8, 2014 + * + * Copyright © 2014 Brion Vibber br...@pobox.com + * + * Based on ApiWatch.php, copyright © 2008 Yuri Astrakhan FirstnameLastname@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + */ + +/** + * API module to allow users to watch a page + * + * @ingroup API + */ +class ApiWatchlistClear extends ApiBase { + public function execute() { + $user = $this-getUser(); + if ( !$user-isLoggedIn() ) { + $this-dieUsage( 'You must be logged-in to have a watchlist', 'notloggedin' ); + } + + if ( !$user-isAllowed( 'editmywatchlist' ) ) { + $this-dieUsage( 'You don\'t have permission to edit your watchlist', 'permissiondenied' ); + } + + $params = $this-extractRequestParams(); + $res = $this-bulkUnwatch(); + $this-getResult()-addValue( null, $this-getModuleName(), $res ); + } + + private function bulkUnwatch() { + // We're going to do this in the database as a bulk operation + // instead of one at a time, so it doesn't time out on largeish lists. + + $this-getDB()-delete( 'watchlist', array( 'wl_user' = $this-getUser()-getId() ), __METHOD__ ); + + return array( 'unwatch' = true ); + } + + public function mustBePosted() { + return true; + } + + public function isWriteMode() { + return true; + } + + public function needsToken() { + return true; + } + + public function getTokenSalt() { + return 'watch'; + } + + public function getAllowedParams( $flags = 0 ) { + $result = array( + 'token' = array( + ApiBase::PARAM_TYPE = 'string', + ApiBase::PARAM_REQUIRED = true + ), + ); + + return $result; + } + + public function getParamDescription() { + return array( + 'token' = 'A token previously acquired
[MediaWiki-commits] [Gerrit] Allow mobile to reduce image quality - change (mediawiki/core)
Brion VIBBER has submitted this change and it was merged. Change subject: Allow mobile to reduce image quality .. Allow mobile to reduce image quality http://www.mediawiki.org/wiki/Requests_for_comment/Reducing_image_quality_for_mobile Per above RFC, this patch implements the core changes required to specify quality reduction of JPEG via URL. To test, make sure your setup uses 404-based thumb generation. Vagrant supports it by adding multimedia role: $ vagrant add-role multimedia vagrant provision * Pick any thumbnail jpeg URL that exists on the test wiki, e.g. http://.../images/thumb/4/49/Img.jpg/400px-Img.jpg * check that basic scaling works by altering 400 * add quality parameter qlow- right before px: http://.../images/thumb/4/49/Img.jpg/qlow-400px-Img.jpg Change-Id: I930ea06be6d302ffc8832d12b251422a9f1b3e75 --- M includes/Linker.php M includes/media/Bitmap.php M includes/media/Jpeg.php 3 files changed, 101 insertions(+), 18 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/includes/Linker.php b/includes/Linker.php index cfa0158..9ec7944 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -530,7 +530,7 @@ * * @param array $handlerParams Associative array of media handler parameters, to be passed * to transform(). Typical keys are width and page. -* @param string $time Timestamp of the file, set as false for current +* @param string|bool $time Timestamp of the file, set as false for current * @param string $query Query params for desc url * @param int|null $widthOption Used by the parser to remember the user preference thumbnailsize * @since 1.20 diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index 607c4e5..44be178 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -138,6 +138,10 @@ 'dstUrl' = $dstUrl, ); + if ( isset( $params['quality'] ) $params['quality'] === 'low' ) { + $scalerParams['quality'] = 30; + } + # Determine scaler type $scaler = self::getScalerType( $dstPath ); @@ -147,6 +151,7 @@ if ( !$image-mustRender() $scalerParams['physicalWidth'] == $scalerParams['srcWidth'] $scalerParams['physicalHeight'] == $scalerParams['srcHeight'] +!isset( $scalerParams['quality'] ) ) { # normaliseParams (or the user) wants us to return the unscaled image @@ -163,12 +168,14 @@ if ( $flags self::TRANSFORM_LATER ) { wfDebug( __METHOD__ . : Transforming later per flags.\n ); - $params = array( + $newParams = array( 'width' = $scalerParams['clientWidth'], 'height' = $scalerParams['clientHeight'] ); - - return new ThumbnailImage( $image, $dstUrl, false, $params ); + if ( isset( $params['quality'] ) ) { + $newParams['quality'] = $params['quality']; + } + return new ThumbnailImage( $image, $dstUrl, false, $newParams ); } # Try to make a target path for the thumbnail @@ -235,12 +242,14 @@ } elseif ( $mto ) { return $mto; } else { - $params = array( + $newParams = array( 'width' = $scalerParams['clientWidth'], 'height' = $scalerParams['clientHeight'] ); - - return new ThumbnailImage( $image, $dstUrl, $dstPath, $params ); + if ( isset( $params['quality'] ) ) { + $newParams['quality'] = $params['quality']; + } + return new ThumbnailImage( $image, $dstUrl, $dstPath, $newParams ); } } @@ -314,7 +323,8 @@ $animation_post = array(); $decoderHint = array(); if ( $params['mimeType'] == 'image/jpeg' ) { - $quality = array( '-quality', '80' ); // 80% + $qualityVal = isset( $params['quality'] ) ? (string) $params['quality'] : null; + $quality = array( '-quality', $qualityVal ?: '80' ); // 80% # Sharpening, see bug 6193 if ( ( $params['physicalWidth'] + $params['physicalHeight'] ) / ( $params['srcWidth'] + $params['srcHeight'] ) @@ -419,7 +429,8 @@
[MediaWiki-commits] [Gerrit] SpecialUserlogin: Error out when attempting to create a user... - change (mediawiki/core)
Brion VIBBER has submitted this change and it was merged. Change subject: SpecialUserlogin: Error out when attempting to create a username with a '#' .. SpecialUserlogin: Error out when attempting to create a username with a '#' Best practices? Ain't never heard of it. Bug: 64960 Change-Id: I88c479cea2bc9d2eab882e0ee8ebcbe2d1dd125e --- M includes/specials/SpecialUserlogin.php 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Brion VIBBER: Looks good to me, approved diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 4006e49..5ce2812 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -435,7 +435,11 @@ // Normalize the name so that silly things don't cause invalid username // errors. User::newFromName does some rather strict checking, rejecting - // e.g. leading/trailing/multiple spaces. + // e.g. leading/trailing/multiple spaces. But first we need to reject + // usernames that would be treated as titles with a fragment part. + if ( strpos( $this-mUsername, '#' ) !== false ) { + return Status::newFatal( 'noname' ); + } $title = Title::makeTitleSafe( NS_USER, $this-mUsername ); if ( !is_object( $title ) ) { return Status::newFatal( 'noname' ); -- To view, visit https://gerrit.wikimedia.org/r/132584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88c479cea2bc9d2eab882e0ee8ebcbe2d1dd125e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński matma@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Anonymous editing killswitch. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Anonymous editing killswitch. .. Anonymous editing killswitch. Syncs with config/ios.json at most once a day. Adjusts saving interface to hide anon saving option if ios.json has flag for disabling anon editing. The periodic sync code is done in generic fashion to make future sync between server and bundled app json files painless. Note: will need to amend copyBundledFolderToAppDataDocuments to copy files and folders which don't exist in documents directory after initial install. Right now it won't copy if it sees the Json folder has already been copied from the bundle to the writable documents dir. Will also need to rename all of the bundled things from this commit as they're not really bundled now that they've been moved to the documents directory. Change-Id: Ia64c060806c14cbf08cacb3168af8f471c8de048 --- M Wikipedia.xcodeproj/project.pbxproj M wikipedia/AppDelegate.m A wikipedia/BundledJson/BundledJson.h A wikipedia/BundledJson/BundledJson.m A wikipedia/BundledJson/BundledJsonEnum.h A wikipedia/BundledPaths/BundledPaths.h A wikipedia/BundledPaths/BundledPaths.m A wikipedia/BundledPaths/BundledPathsEnum.h A wikipedia/Data/Operations/ConfigFileSyncOp.h A wikipedia/Data/Operations/ConfigFileSyncOp.m M wikipedia/Data/Operations/DownloadLangLinksOp.h M wikipedia/Data/Operations/DownloadLangLinksOp.m R wikipedia/Json/Languages/languages.json R wikipedia/Json/Languages/mainpages.json A wikipedia/Json/config/ios.json M wikipedia/Queues/QueuesSingleton.h M wikipedia/Queues/QueuesSingleton.m M wikipedia/Session/SessionSingleton.h M wikipedia/Session/SessionSingleton.m M wikipedia/View Controllers/Languages/LanguagesTableVC.m M wikipedia/View Controllers/Preview/PreviewChoicesMenuView.m M wikipedia/View Controllers/Preview/PreviewChoicesMenuView.xib M wikipedia/View Controllers/TopNav/NavController.m M wikipedia/View Controllers/WebView/WebViewController.m 24 files changed, 414 insertions(+), 49 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/Wikipedia.xcodeproj/project.pbxproj b/Wikipedia.xcodeproj/project.pbxproj index 262a856..cc69069 100644 --- a/Wikipedia.xcodeproj/project.pbxproj +++ b/Wikipedia.xcodeproj/project.pbxproj @@ -43,6 +43,10 @@ 043DAC4B1901C3EE001CD17C /* CreditsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 043DAC4A1901C3EE001CD17C /* CreditsViewController.m */; }; 043F18E118D9691D00D8489A /* TopActionSheetLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 043F18DC18D9691D00D8489A /* TopActionSheetLabel.m */; }; 043F18E518D9691D00D8489A /* UINavigationController+TopActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 043F18E018D9691D00D8489A /* UINavigationController+TopActionSheet.m */; }; + 044213C8191C3C2A006C03BF /* ConfigFileSyncOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 044213C7191C3C2A006C03BF /* ConfigFileSyncOp.m */; }; + 044213D0191D6F43006C03BF /* BundledPaths.m in Sources */ = {isa = PBXBuildFile; fileRef = 044213CF191D6F43006C03BF /* BundledPaths.m */; }; + 044213D4191D70E9006C03BF /* BundledJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 044213D3191D70E9006C03BF /* BundledJson.m */; }; + 044213D8191D99FB006C03BF /* Json in Resources */ = {isa = PBXBuildFile; fileRef = 044213D7191D99FB006C03BF /* Json */; }; 0442F57B19006DCC00F55DF9 /* PageHistoryLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 0442F57A19006DCC00F55DF9 /* PageHistoryLabel.m */; }; 0442F57E190071A100F55DF9 /* WikiFont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0442F57D190071A100F55DF9 /* WikiFont.ttf */; }; 0447862F185145090050563B /* HistoryResultCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 04478621185145090050563B /* HistoryResultCell.m */; }; @@ -107,7 +111,6 @@ 04C695CE18ED08D900D9F2DA /* UIView+SearchSubviews.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C695CD18ED08D900D9F2DA /* UIView+SearchSubviews.m */; }; 04C695D218ED213000D9F2DA /* UIScrollView+NoHorizontalScrolling.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C695D118ED213000D9F2DA /* UIScrollView+NoHorizontalScrolling.m */; }; 04C8781018F4A42700FA3B99 /* AccountCreationTokenOp.m in Sources */ = {isa = PBXBuildFile; fileRef = 04C8780F18F4A42700FA3B99 /* AccountCreationTokenOp.m */; }; - 04CF1CB6187C8F4400E9516F /* Languages in Resources */ = {isa = PBXBuildFile; fileRef = 04CF1CB5187C8F4400E9516F /* Languages */; }; 04D122321899B8AC006B9A30 /* AlertWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D122311899B8AC006B9A30 /* AlertWebView.m */; }; 04D149DD18877343006B4104 /* AlertLabel.m in Sources */ = {isa =
[MediaWiki-commits] [Gerrit] bump version to 47 (2.0-alpha-2014-05-10) - change (apps...wikipedia)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/132677 Change subject: bump version to 47 (2.0-alpha-2014-05-10) .. bump version to 47 (2.0-alpha-2014-05-10) Change-Id: I3c4de07fc48ec410fca548022ba1dd8735a9a90c --- M wikipedia/AndroidManifest.xml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/77/132677/1 diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml index 1fe5989..cd47c9d 100644 --- a/wikipedia/AndroidManifest.xml +++ b/wikipedia/AndroidManifest.xml @@ -1,8 +1,8 @@ ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.wikipedia -android:versionCode=46 -android:versionName=2.0-alpha-2014-05-09 +android:versionCode=47 +android:versionName=2.0-alpha-2014-05-10 uses-sdk android:minSdkVersion=10 -- To view, visit https://gerrit.wikimedia.org/r/132677 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3c4de07fc48ec410fca548022ba1dd8735a9a90c Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CSS style to make HTML5 wbr work on IE 8-11 - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/132750 Change subject: CSS style to make HTML5 wbr work on IE 8-11 .. CSS style to make HTML5 wbr work on IE 8-11 (Note that using the zero-width space directly is roughly equivalent; see https://en.wikipedia.org/wiki/Zero-width_space ) Bug: 65155 Change-Id: I53f62fdb26cec65a3f4a5bea1bb9b1d7a9cb9c13 --- M skins/common/shared.css 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/50/132750/1 diff --git a/skins/common/shared.css b/skins/common/shared.css index ac7f407..f9f0372 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -38,7 +38,11 @@ background-color: yellow; color: black; } - +/* Helper for wbr element on IE 8+; in HTML5 but not supported by default as of IE 11 */ +/* Note canonical HTML5 styles recommend content: \u200B but this doesn't work as of IE 11 */ +wbr { + display: inline-block; +} /* Input types that should follow user direction, like buttons */ /* TODO: What about buttons in wikipage content ? */ input[type=submit], -- To view, visit https://gerrit.wikimedia.org/r/132750 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53f62fdb26cec65a3f4a5bea1bb9b1d7a9cb9c13 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tyop fxi - change (mediawiki/core)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/132906 Change subject: tyop fxi .. tyop fxi Change-Id: I05cd37b3dab7d0eeffb4df81f906fd1e881b7f9f --- M includes/content/ContentHandler.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/06/132906/1 diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index defa7da..dd7e27d 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -454,7 +454,7 @@ /** * Creates a new Content object that acts as a redirect to the given page, -* or null of redirects are not supported by this content model. +* or null if redirects are not supported by this content model. * * This default implementation always returns null. Subclasses supporting redirects * must override this method. -- To view, visit https://gerrit.wikimedia.org/r/132906 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05cd37b3dab7d0eeffb4df81f906fd1e881b7f9f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Migrate strings to qqq file. - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Migrate strings to qqq file. .. Migrate strings to qqq file. Will need another pass for making strings which are presently set in storyboards rather be set in code so the same qqq approach can be used for these strings. Change-Id: I32e7c6f9f4b14264af3580ac89c3431c47cc1592 --- M Wikipedia-iOS/Data/Operations/AccountCreationOp.m M Wikipedia-iOS/Data/Operations/DownloadSectionWikiTextOp.m M Wikipedia-iOS/Data/Operations/LoginOp.m M Wikipedia-iOS/Data/Operations/SearchOp.m M Wikipedia-iOS/Data/Operations/UploadSectionWikiTextOp.m M Wikipedia-iOS/Defines/Defines.h M Wikipedia-iOS/View Controllers/AccountCreation/AccountCreationViewController.m M Wikipedia-iOS/View Controllers/ArticleLanguages/ArticleLanguagesTableVC.m M Wikipedia-iOS/View Controllers/MainMenu/MainMenuTableViewController.m M Wikipedia-iOS/View Controllers/Preview/PreviewAndSaveViewController.m M Wikipedia-iOS/View Controllers/SavedPages/SavedPagesViewController.m M Wikipedia-iOS/View Controllers/SearchResults/SearchResultsController.m M Wikipedia-iOS/View Controllers/SectionEditor/SectionEditorViewController.m M Wikipedia-iOS/View Controllers/TopNav/NavController.m M Wikipedia-iOS/View Controllers/WebView/WebViewController.m M Wikipedia-iOS/en.lproj/Localizable.strings M Wikipedia-iOS/qqq.lproj/Localizable.strings 17 files changed, 205 insertions(+), 66 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved Siebrand: Looks good to me, but someone else must approve diff --git a/Wikipedia-iOS/Data/Operations/AccountCreationOp.m b/Wikipedia-iOS/Data/Operations/AccountCreationOp.m index 2cb1a71..6a3d5db 100644 --- a/Wikipedia-iOS/Data/Operations/AccountCreationOp.m +++ b/Wikipedia-iOS/Data/Operations/AccountCreationOp.m @@ -108,7 +108,7 @@ if ([createAccountResult isEqualToString:@NeedToken]) { NSMutableDictionary *errorDict = @{}.mutableCopy; -errorDict[NSLocalizedDescriptionKey] = @CAPTCHA verification required.; +errorDict[NSLocalizedDescriptionKey] = NSLocalizedString(@account-creation-captcha-required, nil); // Make the capcha id and url available from the error. errorDict[@captchaId] = weakSelf.jsonRetrieved[@createaccount][@captcha][@id]; diff --git a/Wikipedia-iOS/Data/Operations/DownloadSectionWikiTextOp.m b/Wikipedia-iOS/Data/Operations/DownloadSectionWikiTextOp.m index 6f6c5a9..f1a84e4 100644 --- a/Wikipedia-iOS/Data/Operations/DownloadSectionWikiTextOp.m +++ b/Wikipedia-iOS/Data/Operations/DownloadSectionWikiTextOp.m @@ -60,7 +60,7 @@ if (!weakSelf.error !revision) { NSMutableDictionary *errorDict = [@{} mutableCopy]; -errorDict[NSLocalizedDescriptionKey] = @Unable to obtain latest revision.; +errorDict[NSLocalizedDescriptionKey] = NSLocalizedString(@wikitext-download-failed, nil); // Set error condition so dependent ops don't even start and so the errorBlock below will fire. weakSelf.error = [NSError errorWithDomain:@Download Wikitext Op code:002 userInfo:errorDict]; diff --git a/Wikipedia-iOS/Data/Operations/LoginOp.m b/Wikipedia-iOS/Data/Operations/LoginOp.m index b8b4012..7fcd865 100644 --- a/Wikipedia-iOS/Data/Operations/LoginOp.m +++ b/Wikipedia-iOS/Data/Operations/LoginOp.m @@ -106,21 +106,29 @@ { // Error types from: http://www.mediawiki.org/wiki/API:Login#Errors NSString *errorMessage = [NSString stringWithFormat:@Unknown login error. Code '%@', result]; + if ([result isEqualToString:@NoName]) { -errorMessage = @User name is required to login.; +errorMessage = NSLocalizedString(@login-name-not-found, nil); + }else if ([result isEqualToString:@Illegal]) { -errorMessage = @You provided an illegal user name.; +errorMessage = NSLocalizedString(@login-name-illegal, nil); + }else if ([result isEqualToString:@NotExists]) { -errorMessage = @The user name you provided doesn't exist.; +errorMessage = NSLocalizedString(@login-name-does-not-exist, nil); + }else if ([result isEqualToString:@EmptyPass]) { -errorMessage = @Password is required to login.; +errorMessage = NSLocalizedString(@login-password-empty, nil); + }else if ([result isEqualToString:@WrongPass] || [result isEqualToString:@WrongPluginPass]) { -errorMessage = @The password you provided is incorrect.; +errorMessage = NSLocalizedString(@login-password-wrong, nil); + }else if ([result isEqualToString:@Throttled]) { -errorMessage = @You've logged in too many times in a short time.; +errorMessage = NSLocalizedString(@login-throttled, nil); + }else if ([result
[MediaWiki-commits] [Gerrit] Use .equals not == for comparing strings - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Use .equals not == for comparing strings .. Use .equals not == for comparing strings Change-Id: Ief36183409d91475eb052eae4dc18d1edfd8f54f --- M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java index b0f7013..08f2142 100644 --- a/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -134,7 +134,7 @@ public void onCatch(Throwable caught) { if (caught instanceof EditingException) { EditingException ee = (EditingException) caught; -if (app.getUserInfoStorage().isLoggedIn() ee.getCode() == badtoken) { +if (app.getUserInfoStorage().isLoggedIn() ee.getCode().equals(badtoken)) { // looks like our session expired. app.getEditTokenStorage().clearAllTokens(); app.getCookieManager().clearAllCookies(); -- To view, visit https://gerrit.wikimedia.org/r/118054 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief36183409d91475eb052eae4dc18d1edfd8f54f Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add simple Edit Summary option to preview window - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Add simple Edit Summary option to preview window .. Add simple Edit Summary option to preview window Change-Id: I321f8e79bab9f6684e66e76f1e300a52d68bb2e8 --- M wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java M wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java M wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java M wikipedia/res/layout/activity_edit_section.xml A wikipedia/res/layout/group_edit_summary.xml M wikipedia/res/values/strings.xml M wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java M wikipedia/src/main/java/org/wikipedia/editing/EditSectionActivity.java A wikipedia/src/main/java/org/wikipedia/editing/EditSummaryHandler.java A wikipedia/src/main/java/org/wikipedia/styledviews/StyledAutocompleteEditText.java 10 files changed, 133 insertions(+), 16 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java index 71072c0..f26c7d5 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java @@ -27,7 +27,7 @@ app.getEditTokenStorage().get(title.getSite(), new EditTokenStorage.TokenRetreivedCallback() { @Override public void onTokenRetreived(String token) { -new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 3, token) { +new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 3, token, ) { @Override public void onFinish(EditingResult result) { assertNotNull(result); diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java index c711c84..91780be 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java @@ -23,7 +23,7 @@ runTestOnUiThread(new Runnable() { @Override public void run() { -new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 0, +\\) { +new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 0, +\\, ) { @Override public void onFinish(EditingResult result) { assertNotNull(result); @@ -45,7 +45,7 @@ runTestOnUiThread(new Runnable() { @Override public void run() { -new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 0, +\\) { +new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 0, +\\, ) { @Override public void onFinish(EditingResult result) { assertNotNull(result); diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java index 35648cc..4be0494 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java @@ -23,7 +23,7 @@ runTestOnUiThread(new Runnable() { @Override public void run() { -new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 0, +\\) { +new DoEditTask(getInstrumentation().getTargetContext(), title, wikitext, 0, +\\, ) { @Override public void onFinish(EditingResult result) { assertNotNull(result); diff --git a/wikipedia/res/layout/activity_edit_section.xml b/wikipedia/res/layout/activity_edit_section.xml index c243235..6c959c5 100644 --- a/wikipedia/res/layout/activity_edit_section.xml +++ b/wikipedia/res/layout/activity_edit_section.xml @@ -78,8 +78,18 @@ /LinearLayout /ScrollView -fragment android:layout_width=match_parent android:layout_height=match_parent - android:id=@+id/edit_section_preview_fragment - class=org.wikipedia.editing.EditPreviewFragment -/ +LinearLayout +android:layout_width=match_parent +android:layout_height=match_parent +android:id=@+id/edit_section_preview_container +android:orientation=vertical + +fragment android:layout_width=match_parent + android:layout_height=0dp +
[MediaWiki-commits] [Gerrit] Don't let users type more than 255char long edit summary - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Don't let users type more than 255char long edit summary .. Don't let users type more than 255char long edit summary MW actually defines it to be *bytes* not chars, so eventually this needs to be a bit more complicated. But having this now is better than not having it, so... Change-Id: I1e144c7440581ae57717b6fff3893bd4e6b5e467 --- M wikipedia/res/layout/group_edit_summary.xml 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/wikipedia/res/layout/group_edit_summary.xml b/wikipedia/res/layout/group_edit_summary.xml index e45d13d..6ab5c9a 100644 --- a/wikipedia/res/layout/group_edit_summary.xml +++ b/wikipedia/res/layout/group_edit_summary.xml @@ -28,5 +28,6 @@ android:paddingLeft=16dp android:paddingRight=16dp android:singleLine=true +android:maxLength=255 / /LinearLayout \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/118198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1e144c7440581ae57717b6fff3893bd4e6b5e467 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update pullfiles to account for new package name - change (apps...wikipedia)
Brion VIBBER has submitted this change and it was merged. Change subject: Update pullfiles to account for new package name .. Update pullfiles to account for new package name Change-Id: I387b2731f36bbe443f6713a6cd78413032033098 --- M scripts/pullfiles.bash 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Brion VIBBER: Verified; Looks good to me, approved diff --git a/scripts/pullfiles.bash b/scripts/pullfiles.bash index 7481d06..914f8df 100755 --- a/scripts/pullfiles.bash +++ b/scripts/pullfiles.bash @@ -1,3 +1,3 @@ #!/bin/bash # Pulls all files from the device and extracts them under app/ -adb backup -noapk org.wikimedia.wikipedia dd if=backup.ab bs=1 skip=24 | python -c import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read())) | tar -xvf - +adb backup -noapk org.wikipedia dd if=backup.ab bs=1 skip=24 | python -c import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read())) | tar -xvf - -- To view, visit https://gerrit.wikimedia.org/r/118211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I387b2731f36bbe443f6713a6cd78413032033098 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits