Skip to content
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

Feature/sharing update to fluxc #5933

Merged
merged 41 commits into from
May 25, 2017

Conversation

nbradbury
Copy link
Contributor

Updates the long-awaited sharing feature to support FluxC.

kwonye and others added 30 commits May 3, 2017 14:18
…er instead that the WebViewFragment passes in
Copy link
Contributor

@kwonye kwonye left a comment

Choose a reason for hiding this comment

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

Looks great!

One question: why are you passing in a SiteModel to PublicizeWebView/Detail/ListFragment instead of the siteId? Looks like siteId is all we use there still. Not blocking, just curious.

@@ -157,9 +162,6 @@ private void loadConnectUrl() {
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);

// TODO: remove logging from final - only here for debugging
AppLog.d(AppLog.T.SHARING, "onPageFinished > " + url);
Copy link
Contributor

Choose a reason for hiding this comment

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

Great catch

@@ -51,7 +51,7 @@
android:textColor="@color/grey_dark"
android:textSize="@dimen/text_sz_medium" />

<org.wordpress.android.widgets.WPButton
<Button
Copy link
Contributor

Choose a reason for hiding this comment

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

This leaves the button barely visible. I'm ok with it since this still has to go through the design work. Just want to make sure you know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how that would affect the button's size, but that was a change you made here: 4590c8f

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, didn't mean size, I meant background. Yea, I made the change, just wanted to make sure it was conscious that it wasn't touched 👍

@@ -191,7 +182,7 @@ private void configureSharingButtons(JSONObject response) throws JSONException {
protected void initPreferences() {
configureSharingAndMoreButtonsPreferences();
mLabelPreference = (SummaryEditTextPreference) findPreference(getString(R.string.publicize_label));
mButtonStylePreference = (DetailListPreference) findPreference(getString((R.string.publicize_button_style));
mButtonStylePreference = (DetailListPreference) findPreference(getString(R.string.publicize_button_style));
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for this clean up 👍

@nbradbury
Copy link
Contributor Author

why are you passing in a SiteModel to PublicizeWebView/Detail/ListFragment instead of the siteId?

I did that because it's the convention used elsewhere in the app, but you're right - we really only need to pass the site ID. Changed in 0ff514e.

@kwonye
Copy link
Contributor

kwonye commented May 25, 2017

I did that because it's the convention used elsewhere in the app

Oh, if that's the case I'm totally down with keeping it! I'm still unfamiliar with FluxC and would rather stay with convention than optimize a tiny model passing through.

@kwonye
Copy link
Contributor

kwonye commented May 25, 2017

:shipit:

@kwonye kwonye merged commit ef8c7ed into feature/sharing-master May 25, 2017
@kwonye kwonye deleted the feature/sharing-update-to-fluxc branch May 25, 2017 22:35
@oguzkocer
Copy link
Contributor

why are you passing in a SiteModel to PublicizeWebView/Detail/ListFragment instead of the siteId?

I know this is already merged, but the idea behind passing the model instead of the id is to avoid confusion about if that's a local id or a remote one. So, if we do want to pass the id, we should name the variables to reflect their type. So, in this case using ARG_SITE_REMOTE_ID instead of ARG_SITE_ID would probably better. I hope this helps!

For reference, here are @maxme's comments on the subject: #5856 (comment) & #5856 (comment)

@maxme
Copy link
Contributor

maxme commented May 26, 2017

ut the idea behind passing the model instead of the id is to avoid confusion about if that's a local id or a remote one

Yes exactly this. It's not a big deal but we should only see ids when we call the REST api (we shouldn't see then if we use FluxC actions) and keep the model everywhere else.

@kwonye
Copy link
Contributor

kwonye commented May 26, 2017

@oguzkocer @maxme thanks for the info! @nbradbury can you revert 0ff514e in your next PR please? Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants