Skip to content

Add a mechanism to specify dynamic key-value pairs in the prefill email body of a bug report #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 3, 2015

Conversation

dfed
Copy link
Collaborator

@dfed dfed commented Aug 24, 2015

cc @shawnwelch @rhgills @mthole

This should allow us to stop setting the prefilledEmailBody at setup time, and start providing key/value pairs on-demand. This will allow us to easily provide the correct user token or wifi network (among other dynamic content) at bug file time.

@dfed dfed force-pushed the federman/bug_report_additions branch 2 times, most recently from e83ab73 to 86869c2 Compare August 24, 2015 16:52
@@ -40,6 +51,9 @@ NS_ASSUME_NONNULL_BEGIN
/// The email body that will be presented to the user when they compose a report.
@property (nonatomic, copy) NSString *prefilledEmailBody;

/// The email body delegate, responsible for providing key/value pairs to include in the bug report at the time the bug is filed.
@property (nullable, nonatomic) id <ARKEmailBugReporterEmailBodyAdditionsDelegate> emailBodyAdditionsDelegate;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be weak? I can see arguments for both.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because there's the possibility of a retain cycle it should be weak. Good catch!

@rhgills
Copy link
Collaborator

rhgills commented Sep 3, 2015

LGTM! We should probably write a test for what the email body looks like when there is no email body additions delegate and when there is one returning some keys and values.

@dfed dfed force-pushed the federman/bug_report_additions branch 2 times, most recently from 7e3ec3d to f9644ea Compare September 3, 2015 17:26
@dfed dfed force-pushed the federman/bug_report_additions branch from f9644ea to abe56f1 Compare September 3, 2015 17:26
@dfed dfed force-pushed the federman/bug_report_additions branch from 54be3ef to 714abd3 Compare September 3, 2015 17:57
@@ -368,6 +370,22 @@ - (void)_dismissEmailComposeWindow;
}
}

- (NSMutableString *)_prefilledEmailBodyWithEmailBodyAdditions:(nullable NSDictionary *)emailBodyAdditions;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's beautiful!

@rhgills
Copy link
Collaborator

rhgills commented Sep 3, 2015

Still good!

dfed added a commit that referenced this pull request Sep 3, 2015
Add a mechanism to specify dynamic key-value pairs in the prefill email body of a bug report
@dfed dfed merged commit 4284e7f into master Sep 3, 2015
@dfed dfed deleted the federman/bug_report_additions branch September 3, 2015 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants