Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jun 8, 2017
2 parents bff5ac2 + 5f13f32 commit 9f8ab47
Show file tree
Hide file tree
Showing 181 changed files with 7,954 additions and 1,938 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md merge=union
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,10 @@ coverage
# Use a custom, cached location for Jest to save transpiling
# on every PR
.jest/cache

# A commit deploy using `yarn bundle-with-storybooks` generates these
Emission.js
Emission.js.meta

# Danger artifacts
tslint-errors.json
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_js:
- "6.7"

script:
- scripts/deploy_commit.sh
- yarn ci
- yarn danger

Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"jpoissonnier.vscode-styled-components",
"Orta.vscode-danger",
"christian-kohler.npm-intellisense",
"eg2.tslint",
"djabraham.vscode-yaml-validation",
"vsmobile.vscode-react-native",
"Orta.vscode-react-native-storybooks"
"Orta.vscode-react-native-storybooks",
"esbenp.prettier-vscode"
]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
},
"eslint.enable": false,
"flow.enabled": false,

"prettier.singleQuote": false,
"prettier.trailingComma": "es5",
"prettier.typescriptEnable": [
"typescript",
"typescriptreact"
],
"prettier.semi": false,
"prettier.printWidth": 120,

"files.trimTrailingWhitespace": true,
"editor.renderWhitespace": "boundary",
"editor.rulers": [120],
Expand Down
19 changes: 13 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
### Master

#### Emission

- [dev] Applies prettier, and adds it to the webhooks + extension settings - orta
- [dev] Adds stories for new messaging components - maxim
- [Messaging] Adds Conversation, Composer, and Message components - sarah
- [dev] Upgrades Sentry to 3.0, note Eigen integrator, this may require changes to Eigen - orta
- [Messaging] Adds Inbox view with real data - luc
- [dev] Upgrades React Native to v0.45 - sarah
- [dev] Allows toggling the back button by pressing space - orta
- Users/Devs can run any PR from inside beta/sim - orta
- Users now can access stories from inside the app - orta

#### Consignments

- [dev] Adds component for attaching buttons to the keyboard - orta
- [dev] Adds component for artist search - orta
- [dev] Adds component for consignments todo - orta
- [dev] Adds a root component for the Consignments flow - orta
- [dev] Adds storybooks for consignments - orta
- [dev] Adds some form elements for consignments - orta
- Added the Welcome/Overview screen for consignments - orta

### Emission

- Users now can access stories from inside the app - orta
- [dev] Upgrades React Native to v0.45 - sarah
- [dev] Allows toggling the back button by pressing space - orta

### 1.3.6

- Fixes missing compiled bundle - alloy
Expand Down
109 changes: 55 additions & 54 deletions Example/Emission.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Example/Emission/ARAdminTableViewCell.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "ARAdminTableViewCell.h"
#import <Artsy_UIFonts/UIFont+ArtsyFonts.h>
#import <Artsy_UIColors/UIColor+ArtsyColors.h>
#import <Artsy+UIFonts/UIFont+ArtsyFonts.h>
#import <Artsy+UIColors/UIColor+ArtsyColors.h>

CGFloat ARTableViewCellSettingsHeight = 60;

Expand Down
2 changes: 1 addition & 1 deletion Example/Emission/ARAnimatedTickView.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "ARAnimatedTickView.h"
#import <Artsy_UIColors/UIColor+ArtsyColors.h>
#import <Artsy+UIColors/UIColor+ArtsyColors.h>

#define TICK_DIMENSION 32

Expand Down
2 changes: 2 additions & 0 deletions Example/Emission/ARDefaults.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#import <Foundation/Foundation.h>

extern NSString *const ARUseStagingDefault;
extern NSString *const ARUsePREmissionDefault;
extern NSString *const ARPREmissionIDDefault;
2 changes: 2 additions & 0 deletions Example/Emission/ARDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
#import <Foundation/Foundation.h>

NSString *const ARUseStagingDefault = @"ARUseStagingDefault";
NSString *const ARUsePREmissionDefault = @"ARUsePREmissionDefault";
NSString *const ARPREmissionIDDefault = @"ARPREmissionIDDefault";
4 changes: 2 additions & 2 deletions Example/Emission/ARRootViewController+AppHub.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ @implementation ARRootViewController(AppHub)

- (ARSectionData *)appHubSectionData;
{
ARSectionData *section = [[ARSectionData alloc] initWithCellDataArray: @[
ARSectionData *section = [[ARSectionData alloc] initWithCellDataArray:@[
[self appHubBuildChooser],
[self appHubMetadata],
[self showPRForBuild]
]];
section.headerTitle = [@"AppHub" uppercaseString];
[self setupSection:section withTitle:@"AppHub"];
return section;
}

Expand Down
8 changes: 8 additions & 0 deletions Example/Emission/ARRootViewController+PRs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#import "ARRootViewController.h"

@class ARSectionData;
@interface ARRootViewController(PR)

- (ARSectionData *)prSectionData;

@end
57 changes: 57 additions & 0 deletions Example/Emission/ARRootViewController+PRs.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#import "ARRootViewController+AppHub.h"
#import "NSDateFormatter+TimeAgo.h"
#import "ARDefaults.h"
#import "EmissionPRChooseViewController.h"

#import <ARGenericTableViewController/ARGenericTableViewController.h>

@implementation ARRootViewController(PR)

- (ARSectionData *)prSectionData;
{
ARSectionData *section = [[ARSectionData alloc] initWithCellDataArray:@[
[self togglePRBuilds]
]];

[self setupSection:section withTitle:@"Code Review"];
return section;
}

- (ARCellData *)togglePRBuilds
{
ARCellData *cellData = [[ARCellData alloc] initWithIdentifier:AROptionCell];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

cellData.cellConfigurationBlock = ^(UITableViewCell *cell) {
BOOL usingPR = [defaults boolForKey:ARUsePREmissionDefault];

if (usingPR) {
cell.textLabel.text = @"Disable PR Build";

} else {
cell.textLabel.text = @"Use a PR build of Emission";
}
};

cellData.cellSelectionBlock = ^(UITableView *tableView, NSIndexPath *indexPath) {
BOOL usingPR = [defaults boolForKey:ARUsePREmissionDefault];

if (!usingPR) {
// Show a PR chooser
[self presentViewController:[EmissionPRChooseViewController new] animated:YES completion:NULL];
} else {
// Undo the changes and restart
[self showAlertViewWithTitle:@"Restarting to undo PR mode" message:@"This will revert back to dev, or apphub based JS" actionTitle:@"Do it" actionHandler:^{
[defaults setBool:NO forKey:ARUsePREmissionDefault];
[defaults synchronize];

exit(0);
}];
}
};

return cellData;
}


@end
40 changes: 34 additions & 6 deletions Example/Emission/ARRootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
#import "ARAdminTableViewCell.h"
#import <SAMKeychain/SAMKeychain.h>

#import "AppDelegate.h"
#import "ARDefaults.h"

// See https://github.com/artsy/eigen/blob/master/Artsy/View_Controllers/Admin/ARAdminSettingsViewController.m
// for examples of how to work with this.

#import "ARRootViewController+AppHub.h"
#import "ARRootViewController+PRs.h"

#import <Emission/ARArtistComponentViewController.h>
#import <Emission/ARHomeComponentViewController.h>
#import <Emission/ARGeneComponentViewController.h>
#import <Emission/ARWorksForYouComponentViewController.h>
#import <Emission/ARComponentViewController.h>
#import <Emission/ARInboxComponentViewController.h>
#import "ARStorybookComponentViewController.h"

@implementation ARRootViewController
Expand All @@ -29,20 +33,24 @@ - (void)viewDidLoad

ARSectionData *appData = [[ARSectionData alloc] init];
[self setupSection:appData withTitle:[self titleForApp]];
[appData addCellData:self.emissionJSLocationDescription];
[appData addCellData:self.generateStagingSwitch];
[tableViewData addSectionData:appData];

#if TARGET_OS_SIMULATOR && defined(DEBUG)
ARSectionData *developerSection = [self developersSection];
[tableViewData addSectionData:developerSection];
#endif

ARSectionData *reviewSection = [self prSectionData];
[tableViewData addSectionData:reviewSection];

ARSectionData *userSection = [self userSection];
[tableViewData addSectionData:userSection];

ARSectionData *viewControllerSection = [self jumpToViewControllersSection];
[tableViewData addSectionData:viewControllerSection];

#if TARGET_OS_SIMULATOR && defined(DEBUG)
ARSectionData *developerSection = [self developersSection];
[tableViewData addSectionData:developerSection];
#endif

#if defined(DEPLOY)
ARSectionData *appHubSection = [self appHubSectionData];
[tableViewData addSectionData:appHubSection];
Expand All @@ -65,6 +73,7 @@ - (ARSectionData *)jumpToViewControllersSection
[sectionData addCellData:self.jumpToRefinedGene];
[sectionData addCellData:self.jumpToWorksForYou];
[sectionData addCellData:self.jumpToConsignments];
[sectionData addCellData:self.jumpToInbox];

return sectionData;
}
Expand Down Expand Up @@ -165,7 +174,6 @@ - (ARCellData *)jumpToWorksForYou
}];
}


- (ARCellData *)jumpToConsignments
{
return [self tappableCellDataWithTitle:@"Start Consignment Flow" selection:^{
Expand All @@ -174,6 +182,13 @@ - (ARCellData *)jumpToConsignments
}];
}

- (ARCellData *)jumpToInbox
{
return [self tappableCellDataWithTitle:@"Inbox" selection:^{
id viewController = [[ARInboxComponentViewController alloc] initWithInbox];
[self.navigationController pushViewController:viewController animated:YES];
}];
}

- (ARCellData *)generateStagingSwitch
{
Expand All @@ -196,6 +211,19 @@ - (ARCellData *)generateStagingSwitch
return crashCellData;
}

- (ARCellData *)emissionJSLocationDescription
{
AppDelegate *appDelegate = (id)[UIApplication sharedApplication].delegate;

ARCellData *crashCellData = [[ARCellData alloc] initWithIdentifier:AROptionCell];
[crashCellData setCellConfigurationBlock:^(UITableViewCell *cell) {
cell.textLabel.text = [appDelegate emissionLoadedFromString];
}];

return crashCellData;
}


- (ARSectionData *)userSection
{
ARSectionData *sectionData = [[ARSectionData alloc] init];
Expand Down
1 change: 1 addition & 0 deletions Example/Emission/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, strong) NSString *emissionLoadedFromString;
@end

Loading

0 comments on commit 9f8ab47

Please sign in to comment.