-
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(digital-guide): add accessibility modes dialog #537
Conversation
a1431fa
to
f38e00d
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.
The concept of abstract layers seems okay to me. We could have done it like this or simply hardcode and both options have their nuances. We are programmers and we like abstract things, right? haha
Besides, really good work <3
lib/features/digital_guide_view/tabs/accessibility_dialog/presentation/red_dialog.dart
Outdated
Show resolved
Hide resolved
lib/features/digital_guide_view/tabs/accessibility_dialog/presentation/red_dialog.dart
Outdated
Show resolved
Hide resolved
lib/features/digital_guide_view/tabs/accessibility_dialog/presentation/mode_checkbox.dart
Show resolved
Hide resolved
lib/features/digital_guide_view/tabs/accessibility_dialog/presentation/checkboxes_list.dart
Show resolved
Hide resolved
lib/features/digital_guide_view/tabs/accessibility_dialog/presentation/checkboxes_list.dart
Outdated
Show resolved
Hide resolved
This looks like significant part of code :-) I will look into that carefully but currently short on time. Will do that till tomorrow's weekly ;) |
f38e00d
to
b27f380
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.
LGTM! Clean, understandable code that will make possible future upgrades not painful at all (everything we'd need to do is to add next class to sealed
wrapper).
I'm huge fan of this although I suppose for totally fresh devs such solution is complex and not obvious to understand at first glance. In our app, that's in constant development, architecture that enable us to freely extend existing features is imo priority and there's not such a thing as an overkill.
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 like this. In Android native environment this "style" of coding is extremely common making features less painful to extend in the future.
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.
Implementing it in many levels of abstraction is really good sollution IMO. Everything looks clean. I left some nitpicks about the styling (looks like paddings will haunt us forever :D) But I dont think it's priority to change that now
Very impressive work!
padding: const EdgeInsets.symmetric(horizontal: 20), | ||
child: Text( | ||
subtitle, | ||
style: context.aboutUsTheme.body.copyWith( |
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.
Someday, someone will be really surprised that after some theme changes in aboutUs some random dialog in buildings information will also change :D
(we should organise our themes and other UIConfigs before we end digital_guide section)
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.
true xd but our designers are using random fonts
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.
also the paddings need some common design system
controlAffinity: ListTileControlAffinity.leading, | ||
title: Text( | ||
mode.localizedLabel(context), | ||
style: context.aboutUsTheme.body, |
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.
the same theme issues imo, but overall its acceptable for now
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.
yeah, it's a problem but in half of the app
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.
if you want, you can try to unify some shit
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.
but imo the paddings are even more crucial than fonts
lib/features/digital_guide_view/tabs/accessibility_dialog/presentation/red_dialog.dart
Outdated
Show resolved
Hide resolved
dd576a5
b27f380
to
dd576a5
Compare
so when it comes to code, i went kinda crazy...
cause this could have been easily hardcoded, and I'm not sure if the layers of abstractions are not too much a bit for the use case. Also some functional programming concepts were used, allowing us to define any number of custom accessibility modes and nest them into each other in any way we want. So please tell me if this is still readable or would you prefer something more hardcoded in a way, and not fully abstract.
this could be usefull to read before the review: https://dart.dev/language/class-modifiers#sealed