Mhurd has uploaded a new change for review. https://gerrit.wikimedia.org/r/220636
Change subject: For easier debugging of 5.0, show "Read" button. ...................................................................... For easier debugging of 5.0, show "Read" button. Read button calls up full article view. Search icon dismisses full article view so you can search with the new search bits. Change-Id: I7b0e085d71bd0422f83c4cec9ac8466375e7a0af --- M Wikipedia/UI-V5/WMFArticleListCollectionViewController.m M Wikipedia/UI-V5/WMFArticleViewController.m M Wikipedia/UI-V5/iPhone_Root.storyboard M Wikipedia/View Controllers/WebView/WebViewController.m 4 files changed, 21 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/36/220636/1 diff --git a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m index 987fb1a..7e2df06 100644 --- a/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m +++ b/Wikipedia/UI-V5/WMFArticleListCollectionViewController.m @@ -10,7 +10,6 @@ #import "WMFArticleCardTranstion.h" -#import "WebViewController.h" #import "UIViewController+WMFStoryboardUtilities.h" @interface WMFArticleListCollectionViewController ()<TGLStackedLayoutDelegate> @@ -143,18 +142,6 @@ - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; - - - - - - - - - - -// Warning! remove this! debugging code for showing web view! - [[WMFArticlePresenter sharedInstance] presentCurrentArticle]; } - (void)viewDidLayoutSubviews { diff --git a/Wikipedia/UI-V5/WMFArticleViewController.m b/Wikipedia/UI-V5/WMFArticleViewController.m index eff0bdf..2e656eb 100644 --- a/Wikipedia/UI-V5/WMFArticleViewController.m +++ b/Wikipedia/UI-V5/WMFArticleViewController.m @@ -1,6 +1,7 @@ #import "WMFArticleViewController.h" #import <Masonry/Masonry.h> +#import "WMFArticlePresenter.h" @interface WMFArticleViewController () @@ -11,6 +12,10 @@ @implementation WMFArticleViewController +- (IBAction)readButtonTapped:(id)sender { + [[WMFArticlePresenter sharedInstance] presentArticleWithTitle:self.article.title discoveryMethod:MWKHistoryDiscoveryMethodSearch]; +} + - (void)setContentTopInset:(CGFloat)contentTopInset { if (contentTopInset == _contentTopInset) { return; diff --git a/Wikipedia/UI-V5/iPhone_Root.storyboard b/Wikipedia/UI-V5/iPhone_Root.storyboard index 89893f5..4bc94e4 100644 --- a/Wikipedia/UI-V5/iPhone_Root.storyboard +++ b/Wikipedia/UI-V5/iPhone_Root.storyboard @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="15A178w" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="O8j-Xm-zXE"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="O8j-Xm-zXE"> <dependencies> - <deployment identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/> <capability name="Constraints to layout margins" minToolsVersion="6.0"/> </dependencies> <scenes> @@ -225,10 +224,22 @@ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/> <nil key="highlightedColor"/> </label> + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Llu-j4-JGU"> + <rect key="frame" x="280" y="45" width="36" height="30"/> + <state key="normal" title="Read"> + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> + </state> + <connections> + <action selector="readButtonTapped:" destination="r3R-dd-kNR" eventType="touchUpInside" id="GhA-xA-JnH"/> + </connections> + </button> </subviews> <animations/> <color key="backgroundColor" red="0.91030293699999998" green="0.12721729279999999" blue="0.28739702700000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> + <constraint firstItem="Llu-j4-JGU" firstAttribute="top" secondItem="Myt-29-qy0" secondAttribute="bottom" constant="16" id="7gg-ju-ska"/> + <constraint firstAttribute="centerX" secondItem="Llu-j4-JGU" secondAttribute="centerX" id="9QY-5K-otN"/> <constraint firstItem="Myt-29-qy0" firstAttribute="top" secondItem="rdC-bu-Efj" secondAttribute="top" constant="8" id="BpY-2f-f2T"/> <constraint firstAttribute="centerX" secondItem="Myt-29-qy0" secondAttribute="centerX" id="Ldy-Zr-x9q"/> <constraint firstAttribute="centerX" secondItem="Myt-29-qy0" secondAttribute="centerX" id="pMk-fk-lzv"/> diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 6f6b8e2..6815e87 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -103,8 +103,8 @@ }]; UIBarButtonItem* buttonMagnify = [UIBarButtonItem wmf_buttonType:WMF_BUTTON_MAGNIFY handler:^(id sender){ - //@strongify (self) - NSLog(@"TODO: hook this up to search somehow..."); + @strongify(self) + [self dismissViewControllerAnimated : YES completion : nil]; }]; self.navigationItem.leftBarButtonItems = @[buttonW, buttonMagnify]; -- To view, visit https://gerrit.wikimedia.org/r/220636 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b0e085d71bd0422f83c4cec9ac8466375e7a0af Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: 5.0 Gerrit-Owner: Mhurd <mh...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits