gdg-x / frisbee

[DEPRECATED] Android application for GDG members and organizers
https://play.google.com/store/apps/details?id=org.gdg.frisbee.android
Apache License 2.0
265 stars 169 forks source link

Replace Croutons with new Snackbar implementation. #365

Closed tasomaniac closed 9 years ago

tasomaniac commented 9 years ago

More info : http://developer.android.com/reference/android/support/design/widget/Snackbar.html

PareshMayani commented 9 years ago

Is anyone making this enhancement?

friedger commented 9 years ago

assigned to @PareshMayani :-)

tasomaniac commented 9 years ago

Nope. No one is working on this. I've sorted out the Croutons. They are shown perfectly now. But they need to be changed. As far as I remember there are few of them left. I have changed 2 of them (asking logins) to Dialogs with Login button.

On Thu, Jul 9, 2015, 12:31 PM Friedger Müffke notifications@github.com wrote:

assigned to @PareshMayani https://github.com/PareshMayani :-)

— Reply to this email directly or view it on GitHub https://github.com/gdg-x/frisbee/issues/365#issuecomment-119889202.

PareshMayani commented 9 years ago

@tasomaniac I didn't get about it:

"I've sorted out the Croutons. They are shown perfectly now. But they need to be changed.".

I guess I am missing something about the crouton implementation!

tasomaniac commented 9 years ago

I was talking about the issue #343 and the solution #353 Croutons are designed to be displayed at top of the window below ActionBar. When Toolbar is included in the layout, Croutons started to be displayed on top of Toolbar. And they were ugly. I fixed that but now they have to be replaced with Snackbar's

PareshMayani commented 9 years ago

Would this implementation work? Please suggest if any change is required in snackbar styling :)

device-2015-07-21-232054

tasomaniac commented 9 years ago

Looks really good to me.

stefanhoth commented 9 years ago

:+1: Noice!

Splaktar commented 9 years ago

Does it need to have a red background? Would red text on default background work or is red not needed at all?

I have seen discussions lately about coloring toasts or snackbars being outside the spec.

tasomaniac commented 9 years ago

I think it looks great. We can go outside of the specs.

But in general my opinion is that we don't need Toast or Snackbar for errors. For example if you look at the error here. It is on the first open of the app. The user cannot even pass this screen. Apps become unusable. For other GET request network errors, we should utilize the empty layout of the pages, instead of displaying a message with a timeout on a blank screen. For POST operations (which we don't have much) if the operation is important, I would say we can go for a Dialog instead of a Snackbar. If the operation is not that important, we can show a gray Snackbar.

PareshMayani commented 9 years ago

@Splaktar I had two ideas while implementing the snackbar:

  1. Make the Snackbar looking same as Crouton
  2. Or display the default snackbar but with different colors, say for example red for alert message.

So I went ahead with displaying snackbar with different background colors, just to make it same as Crouton, it's fine if we want to go beyond the specs.

Or and otherwise, let's go with specs and have different colors for the message.

Let me know your final thoughts!

PareshMayani commented 9 years ago

@tasomaniac agree with your point that user should be able to see at least a home screen, but for that we will have to sync data in background, if network is available!

If network is not available then we can utilize the empty layout of the pages with RETRY button. Thanks to Taylor Ling for the tip :)

tasomaniac commented 9 years ago

Fixed by #384