Skip to content

Conversation

aforcier
Copy link
Contributor

@aforcier aforcier commented Aug 3, 2017

Adds a promo dialog, shown the first time a user presses the 'Publish' button:

async-promo-dialog-pr

Note: For now, the 'How does it work?' text is hidden. Closer (or just after) the beta we'll put up a post on mobile make, link to that, and unhide the link text.

I also added a new PromoDialogAdvanced, intended for reuse for any dialogs requiring a link or negative button field (the existing PromoDialogEditor now extends this one, adding an extra title field for 'Beta'). The pre-existing PromoDialog can be used for simple (image, title, description, positive button) promos.

Also some design changes:

  • All promo dialogs (currently this includes Aztec, the stats widget, and this one) now have a divider above the button row:

dialogs-with-divider

cc @iamthomasbishop (no visual changes to the async promo since we last spoke)

import org.wordpress.android.ui.accounts.login.Login2FaFragment;
import org.wordpress.android.ui.accounts.login.LoginEmailFragment;
import org.wordpress.android.ui.accounts.login.LoginEmailPasswordFragment;
import org.wordpress.android.ui.accounts.login.LoginEpilogueFragment;
Copy link
Contributor

Choose a reason for hiding this comment

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

nice name

void inject(ReaderPostPagerActivity object);

void inject(EditorReleaseNotesActivity object);
void inject(ReleaseNotesActivity object);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice reuse

resizePhotoPicker();
}

// If we're showing the Async promo dialog, we need to redraw it so it takes into account
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure what the comment meant, it should continue but ends abruptly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops! Fixed in 0a81c29.

*/
public class PromoDialogAdvanced extends PromoDialog {
public static class Builder extends PromoDialog.Builder {
@StringRes int linkId;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make these linkResId, buttonNegativeResId, descriptionResId etc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in f4e7063.