-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat/add lottie animation #428
Conversation
It appears that again some weird linter error occurred. Imo this happens only if build_runner has not been sent before push. And sure, I agree, task with offline menu should be created separately (since directed for beginners). I will create one and assign it for you, as a task for next week ;) |
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 don't think it's good to make these changes (gradle properties and java version)
That wasn't the whole review and I'm not an expert in android build tools, but I'm pretty sure that it's not proper to do this changes |
I think @mikolaj-jalocha can say more it that matter |
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.
First of all, congrats of your first commit here and working code! Animation looks great😎
I left few suggestions of mine regarding UI. I think button could be removed (as of now) and some text regarding error could be displayed as well.
I also left notes regarding better use of lottie and some regarding changes of files that should only be made locally.
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
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.
We don't really want to have magic nubers in code.
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
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 good job and congrats for the first completed task.
I've left one note about the sized box, but everything else was pretty much covered by Tomek and Mikołaj, so good job guys too.
As for java build settings, let's not change anything globally for now. I've actually seen that Andrea has made some fancy tool related on the topic, so someone can investigate on that: https://gist.github.com/bizz84/605e2ca2088cb4acb7a076ca993f41cd?trk=public_post_comment-text But let's rollback for now
lib/features/sks-menu/presentation/widgets/sks_menu_loading.dart
Outdated
Show resolved
Hide resolved
Sorry for pushing java path etc., @mikolaj-jalocha was right (some demands of Android Studio), will not happen again. |
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.
Good job! Code looks cleaner now. I tested it and animations works good on my device.
I left few notes (one is crucial, pls see what happens if menu is offline)
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.
Name of the file could be different since this animation's not responsible for loading. In fact we could use that class inside top level sks_menu_screen as a private class.
), | ||
), | ||
Align( | ||
child: Text( |
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.
Maybe it'd be good to add detailed error message (error message that comes from api). Maybe in small print and in different color.
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { |
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.
It'd be great to add logger somewhere here:
Logger().e(error.toString());
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.
and one more
@@ -63,11 +56,7 @@ class _SksMenuView extends StatelessWidget { | |||
@override | |||
Widget build(BuildContext context) { | |||
if (sksMenuData.meals.isEmpty) { |
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 we should check if menu's online or not and then show animation (list of meals now is only empty in case of error, if sks's closed cached data are provided, so this condition'll never work)
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.
LGTM! 🚀
… and adding sks_old_menu text
9187dba
to
d44cab9
Compare
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.
Looks good to me. I would maybe think of changing the animation color, but that's secondary consern. Merging it now. Good job!
* feat: add lottie animation for sks menu * feat: adding statefull widget for showing the menu from the latest update * feat: changing to CircularProgressIndicator() for loading of sks menu and adding sks_old_menu text * feat: add sks menu loading * feat: sks menu not available message * chore: fix linter complaints * feat: show error on screen --------- Co-authored-by: mikolaj-jalocha <[email protected]>
When error occurres or SKS's closed, the lottie animation "closed" is showing on SKS Menu.
In my opinion, the offline menu functionality is out of scope for this task and should be addressed as a separate task.