-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove progress dialogs #1280
Remove progress dialogs #1280
Conversation
Change-Id: Ie8e5a0c5dd0105b1b9d79ef385836286cfe6375f
Change-Id: I5b39edaa31002baa1352628b818ff46b55f28fbf
Lint error:
Looks like negative margin trick is not cool. I'll have to find another way to jam the progress bar under the action bar. Edit: I could solve it using this library But I am not sure if that's worth it: Edit 2: went for the library. It doesn't have any deps we don't already have. |
Change-Id: I95e08b3f2150387918ddf6a7455eda54a71f8296
Change-Id: I85f2cc7aa3a0e33234f7819e15fc955633175fb1
Change-Id: Iee54a95d47c0af7cc2e83cb0986153d2172007c3
Change-Id: I04e32ea437446ba4240187a3cb2d42b0a706b338
Change-Id: Ia02bdc186239fe32e804f37ac2c3c74ea715dd14
Review note: a lot of the changes are just churn from having to indent some layouts by another level. Github's new "hide whitespace changes" setting will help a lot with that. |
Sorry for the delay, I've been bogged down writing samples for issues I submitted about I/O announcements (if only stuff worked on the first try, am I right? 🤣). Anyway, hoping to look at this and the phone auth rewrite tomorrow. If not, definitely Wednesday. 👍 |
Damn, I just watched the videos... lookin' hot! 🔥 |
Change-Id: I6d6429742bf3d4293c611a7ac741dac2654e2ec0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say this enough: thank you! This has been nagging me months now and I just never got around to it. I have a few comments, but other than those, it's looking great so far! 😊
@@ -11,7 +11,7 @@ | |||
import com.google.firebase.auth.FirebaseUser; | |||
|
|||
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) | |||
public class FragmentBase extends Fragment { | |||
public class FragmentBase extends Fragment implements ProgressView { | |||
private HelperActivityBase mActivity; | |||
private ProgressDialogHolder mProgressDialogHolder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we haven't gotten rid of all of progress dialogs yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think once you're done with Phone auth we can really kill the whole ProgressDialogHolder thing.
|
||
import com.firebase.ui.auth.R; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: extra new line
setContentView(R.layout.fui_activity_invisible); | ||
|
||
// Create an indeterminate, circular progress bar in the app's theme | ||
mProgressBar = new ProgressBar(new ContextThemeWrapper(this, getFlowParams().themeId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use the material library version to get sexiness pre-L? (And consistent behavior in general.)
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) | ||
public class InvisibleActivityBase extends HelperActivityBase { | ||
|
||
private static final long MIN_SPINNER_MS = 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooof, this seems like a long time. How about 500ms or even 750?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to 750. You'd be surprised how "flickery" 500 feels.
@Override | ||
public void showProgress(int message) { | ||
if (mProgressBar.getVisibility() == View.VISIBLE) { | ||
mHandler.removeCallbacksAndMessages(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see you know that trick too! I've been burned so many times using removeCallbacks
without the messages bit. 🤦♂️😆
style="@style/FirebaseUI.TopProgressBar" | ||
android:visibility="invisible" | ||
app:layout_constraintTop_toTopOf="parent" | ||
tools:visibility="visible"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: space before />
@@ -7,31 +7,44 @@ | |||
android:layout_height="match_parent"> | |||
|
|||
<LinearLayout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't motivate you to use ConstraintLayout? 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think once @lsirac finishes the ToS update I'll have to use ConstraintLayout
to get around the merge conflicts anyway.
<me.zhanghai.android.materialprogressbar.MaterialProgressBar | ||
android:id="@+id/top_progress_bar" | ||
style="@style/FirebaseUI.TopProgressBar" | ||
android:visibility="invisible" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the visibility to the style as well?
@@ -12,11 +12,11 @@ | |||
|
|||
<style name="FirebaseUI.Transparent" parent="FirebaseUI"> | |||
<item name="android:windowIsTranslucent">true</item> | |||
<item name="android:windowBackground">@android:color/transparent</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scared of Samsung, I see! 🤣
auth/src/main/res/values/styles.xml
Outdated
<item name="android:layout_width">match_parent</item> | ||
<item name="android:layout_height">4dp</item> | ||
<item name="android:indeterminate">true</item> | ||
<item name="mpb_progressStyle">horizontal</item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish the Android team would fix style attributes, those look so dang ugly! 😭 Anyway, 👍
Change-Id: I7a60cd497bc00b6b9e6f92b44df1527725d96daa
Change-Id: Id976c22c8a9a820377940a953265484bf6e1dfae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, all of your explanations make sense. 👍 Just a few more invisible thingys that could be GONE
. Or would that shift the rest of the layout around?
@Override | ||
public void hideProgress() { | ||
mNextButton.setEnabled(true); | ||
mProgressBar.setVisibility(View.INVISIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
@Override | ||
public void hideProgress() { | ||
mNextButton.setEnabled(true); | ||
mProgressBar.setVisibility(View.INVISIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
@Override | ||
public void hideProgress() { | ||
mDoneButton.setEnabled(true); | ||
mProgressBar.setVisibility(View.INVISIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
|
||
@Override | ||
public void hideProgress() { | ||
mProgressBar.setVisibility(View.INVISIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
@Override | ||
public void hideProgress() { | ||
mDoneButton.setEnabled(true); | ||
mProgressBar.setVisibility(View.INVISIBLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here
@SUPERCILEX now that you mention it, I have gone back to all |
Change-Id: I65272097018400f1f9df498d757151985650d747
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM!
Gonna wait to merge this until the ToS/PP thing is done to save @lsirac from the nasty layout merge commits. Don't say I never did anything for you Leo! |
Change-Id: I540fca91aa8e33f79cc364a5ed267a4fb76e6cf4
Beginning investigate of #724
Video of what a Google sign in looks like:
https://drive.google.com/open?id=1LSKpQMyT1yew4A2ardO97AhoP1gbXH40
Video of full email flow (no dialogs at all!):
https://drive.google.com/open?id=1VP-fRyEut_FHlsSfDrS3aawVRZtuiAQq
General approach:
TODO:
Future TODO:
cc @SUPERCILEX wdyt of the approach?