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

Re-do UI of About screens and Settings screens in Compose #5719

Merged
merged 96 commits into from
Jul 7, 2024

Conversation

westnordost
Copy link
Member

@westnordost westnordost commented Jul 3, 2024

This is quite large.

About screens


  • Re-did About screen in compose
  • Re-did Changelog screen in compose
  • Re-did Credits screen in compose
  • Re-did Privacy statement screen in compose
  • Re-did Logs screen in compose (also fixes Logs view crash #5613)
  • Screens that used a WebView before to display simple HTML for markup don't anymore (no official multiplatform WebView), instead, I wrote an own simple HTML parser + simple renderer for compose 🤯
  • About screen no longer displays in a split-screen when in landscape mode. Didn't re-implement this behavior, I never was such a fan of it anyway. E.g. for the log-screen, it is better to show it at full-width always, and for the other sub-screens it actually also makes sense (credits, changelog, ...)

Settings screens


  • Re-did Settings screen in compose
    • Changed how the settings are laid out a bit: The currently selected value is now always shown on the right, rather than below the name of the preference for settings selectable from a list or picker. This is also how it is usually done in iOS settings screens. This is more consistent and the design of settings screen was never part of any Material design guidelines anyway. The text below the setting name is now reserved for explanations of what this setting does
    • Subsequently, changed some wording / naming to be more brief and clear
    • Removes dependency to androidx.settings or how it was called
    • Removed the setting for map tile cache size (irrelevant for soon-to-be-merged MapLibre implementation and would have been more effort to implement, as there are no number pickers out-of-the-box in compose)
    • Removed the "auto" theme setting, which would change the theme based on time of day. Users that selected that option before will follow the system setting now. (As of June 2024, 95% of active installs from google play use an Android where AUTO setting is deprecated)
  • Re-did Quest selection screen in compose
    • search interface looks different now
    • Reordering quests with drag & drop is no longer supported because this is a missing feature in compose so far
  • Re-did managing quest presets in compose
    • re-did sharing quest presets with QR code diaog
    • Replaces dependency on google's all-purpose QRCode library zxing with qrose, a multiplatform compose-based QR code renderer
  • Re-did showing quest forms in compose (debug feature)
  • Settings screen no longer displays in a split-screen when in landscape mode. Didn't re-implement this behavior, I never was such a fan of it anyway. The UI looked so crammed that way.

Preferences store

  • I made it so that any access to the persistent key-value store (i.e. SharedPreferences on Android) goes through the new Preferences class which provides a type-safe interface to access, edit and listen to changes to that data

Caveats

(all also noted as TODO Compose in the code)

  • AlertDialogs are not scrollable in Compose. I worked around this by creating an own ScrollableAlertDialog, but this one always takes the maximum possible size for dialogs. E.g. the "What's New" dialog will fill basically the whole screen also if the changelog is really short
  • scrollbars are not shown yet in Compose (it is in the roadmap, but in the backlog), hence the changelog, logs view, quest selection screen have no scrollbars
  • also noted above: Compose offers no built-in possibility to easily implement drag and drop in lists, so reordering quest priorities has been disabled

Notes

  • on landscape mode, the QR code dialog and the logs filters dialog are too long to fit. This is not new, so I didn't redesign it. Possible solutions (for anyone wanting to perfect the UI): Make them each a new screen, or specifically for the logs screen, have the filters inline in the same screen, e.g. like the search input in the quest selection screen.

TODOs for Multiplatform

  • Compose is lacking (Android) toasts
  • there are no date and time pickers in Compose (yet). Necessary for the logs filters and later also for the opening hours stuff

@riQQ

This comment was marked as resolved.

@westnordost westnordost merged commit 8928b52 into master Jul 7, 2024
@westnordost westnordost deleted the preferences-class branch July 7, 2024 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging this pull request may close these issues.

Logs view crash
4 participants