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

az/context-aware info links to app manual on encointer.org #1169

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

azackmatoff
Copy link
Collaborator

Showing Frequently asked questions for users from web.

NOTE: Added mixin as an example, could be deleted, but I'd suggest using it from now on.

@azackmatoff azackmatoff added enhancement New feature or request F0-pure flutter Flutter taks; does not need A0-ux PR changes the UX B1-medium Elevates a release containing this PR to "medium priority" C0-breaksnothing PR does not introduce any breaking changes labels Apr 26, 2023
@azackmatoff azackmatoff self-assigned this Apr 26, 2023
@azackmatoff
Copy link
Collaborator Author

@clangenb Can we merge it?

@azackmatoff
Copy link
Collaborator Author

@clangenb @Eldar2021 @SourbaevaJanaraJ I need your approval here guys ))

Copy link
Member

@clangenb clangenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good in general, but I think instead of having a general FAQ page @brenzi would like to have an (i) icon at the relevant locations, which opens an info link about the context of the icon buttons. (if I am not mistaken, see #1146).

/// a lot through out the project
/// we could use this mixin instead
/// this is just an example
mixin PostFrameMixin<T extends StatefulWidget> on State<T> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mixin help the compiler in any way? Or is it just syntactic sugar so that we save a few characters?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second one :D

void postFrame(void Function() callback) => WidgetsBinding.instance.addPostFrameCallback(
(_) {
// Execute callback if page is mounted
if (mounted) callback();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is it dangerous to have the callback executed if the page is not mounted? Or is just most-likely unintended in most cases?

Copy link
Collaborator Author

@azackmatoff azackmatoff May 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WidgetsBinding.instance.addPostFrameCallback used to get context inside initState usually, so it should be called when mounted.

context is available when build or inside didChangeDependencies

app/lib/utils/translations/translations_profile.dart Outdated Show resolved Hide resolved
app/lib/utils/translations/translations_profile.dart Outdated Show resolved Hide resolved
app/lib/utils/translations/translations_profile.dart Outdated Show resolved Hide resolved
app/lib/utils/translations/translations_profile.dart Outdated Show resolved Hide resolved
@azackmatoff
Copy link
Collaborator Author

Nice, looks good in general, but I think instead of having a general FAQ page @brenzi would like to have an (i) icon at the relevant locations, which opens an info link about the context of the icon buttons. (if I am not mistaken, see #1146).

I'm opening all these pages, anything else I'm missing? Maybe the naming not right? I thought it looked like FAQ.

@clangenb
Copy link
Member

clangenb commented May 20, 2023

Yes, you have covered all the links and I think it is good to have that in an organised FAQ like structure, but I am uncertain if it resolves #1146. I think it was meant that we use these links in places like this:

image

@brenzi
Copy link
Member

brenzi commented May 20, 2023

We don't yet have all the direct anchor links in place at encointer.org AFAIK. We may want to pause this for a week. Should be there soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-ux PR changes the UX B1-medium Elevates a release containing this PR to "medium priority" C0-breaksnothing PR does not introduce any breaking changes enhancement New feature or request F0-pure flutter Flutter taks; does not need
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants