StanfordSpezi / SpeziAccount

The Spezi Account module to enable login and signup functionality
https://swiftpackageindex.com/StanfordSpezi/SpeziAccount/documentation/
MIT License
5 stars 5 forks source link

Add a Footer Views to the `AccountOverview` #25

Closed PSchmiedmayer closed 12 months ago

PSchmiedmayer commented 1 year ago

Problem

Some applications like the Spezi Template application could display some additional information such as licensing information or other settings at the bottom of the Account Overview. This information might be placed before or after the logout or delete button.

Solution

Add a customizable footer (maybe two?) ViewBuilder customization points to the AccountOverview to add additional views to the AccountOverview that seamlessly integrate into the AccountOverview.

Additional context

This feature might be useful for the https://github.com/StanfordSpezi/SpeziTemplateApplication/pull/36 PR to allow the position of the licensing information in the account overview.

Code of Conduct

Supereg commented 1 year ago

I think it definitely makes sense to add customization points for the AccountOverview, e.g., to add smaller sections like a About section to provide licensing information. I think, design wise, it makes sense to place it always above the Logout/Delete button (at least be that the primary thing; one could place some footnote text below the Logout/Delete button of course).

Nonetheless, once this gets more cluttered (e.g. Help, Contact, Feedback Sections or even general settings or notifications settings) I would highly recommend to go for a dedictaed Settings Tab (or Sheet with same button placement) and making the AccountOverview a subview of that main settings view (e.g. via a prominent account header like in the Apple settings app). I don't think that for the long term it is sensible to mix account information with other settings or app information. Does that make sense?

NikolaiMadlener commented 1 year ago

In the end, it doesn't matter whether we (1) include settings within the AccountOverview or, vice versa, (2) include account information within a settings sheet/tab. I think that's just a matter of personal preference, and every app does it differently. I believe that if a developer wants to build either of them, they should find the right components in SpeziAccount for it. To ensure this, we could do the following:

Now, one would have full flexibility. Also, if one chooses to implement option (1) and the footer section would get too cluttered, one could still pass a NavigationLink to a dedicated settings page in the footer, right? And, for option (2), one could just use the AccountHeader in their settings sheet/page, perhaps as a NavigationLink to the AccountOverview.

What do you think, does that make sense?

BTW, would love to dig into this ;)

PSchmiedmayer commented 1 year ago

Thank you for the PR @NikolaiMadlener, just reviewed it and provided a feedback on there. Thank you for taking a look at this and adding the nice header view; I like the approach 👍

PSchmiedmayer commented 12 months ago

Merged with the work done by @NikolaiMadlener in #27 🚀