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

feat(digital-guide): add accessibility modes dialog #537

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

simon-the-shark
Copy link
Member

@simon-the-shark simon-the-shark commented Jan 18, 2025

Nagranie z ekranu Jan 18 2025 (1)

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

Copy link
Member

@24bartixx 24bartixx left a 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

@mikolaj-jalocha
Copy link
Member

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 ;)

@simon-the-shark simon-the-shark force-pushed the feat/accessibility-mode-dialog branch from f38e00d to b27f380 Compare January 18, 2025 21:15
Copy link
Member

@mikolaj-jalocha mikolaj-jalocha left a 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.

Copy link
Member

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.

thesun901
thesun901 previously approved these changes Jan 19, 2025
Copy link
Contributor

@thesun901 thesun901 left a 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(
Copy link
Contributor

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)

Copy link
Member Author

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

Copy link
Member Author

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,
Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Member Author

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

Copy link
Member Author

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

@simon-the-shark simon-the-shark force-pushed the feat/accessibility-mode-dialog branch from b27f380 to dd576a5 Compare January 19, 2025 17:21
@simon-the-shark simon-the-shark merged commit 10c98f9 into main Jan 19, 2025
2 checks passed
@simon-the-shark simon-the-shark deleted the feat/accessibility-mode-dialog branch January 19, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(digital-guide): add accessibility modes dialog
4 participants