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

Code Refactoring #37

Open
4 of 5 tasks
mhdostal opened this issue Mar 23, 2022 · 2 comments
Open
4 of 5 tasks

Code Refactoring #37

mhdostal opened this issue Mar 23, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mhdostal
Copy link
Member

mhdostal commented Mar 23, 2022

Since the initial completion of the first few components, the best practices and coding style guidelines have evolved. This issue enumerates those changes that should be incorporated across all components.

  • @State, @Binding, and other property wrappers should be on the same line as the variable declaration.

  • View models should be internal and created by the main component view. Required model properties should be passed in as arguments to the view constructor, with additional properties set via view modifiers.

  • Loading a geoModel before being passed to a component and loading a geomodel in a component should be standardized, including the display of loading progress and error(s).

List of components:

  • BasemapGallery - PR
    • Associated SwiftAPI issue: #1311
  • OverviewMap - PR
  • Search
  • Compass
  • Floating Panel (?)
@mhdostal mhdostal added the enhancement New feature or request label Mar 23, 2022
@mhdostal mhdostal self-assigned this Mar 23, 2022
@dfeinzimer
Copy link
Collaborator

Two things that've just come on my radar that may be worth adding to this list:

  1. Disabling Xcode's auto trimming of trailing whitespace (highlighted by @njarecha here). The Swift SDK doesn't seem to trim trailing whitespace.
  2. Verifying correct indentation for modifiers on views that are multiline vs views that are single line, also highlighted by Nimesh here.

@mhdostal
Copy link
Member Author

mhdostal commented Mar 30, 2022

Potential UI/UX improvements:

Overview Map

  • Change the massive width segmented control to a nav bar trailing button with
    context menu to choose between map and scene.

Basemap Gallery

  • Minus sign for unloaded map is typically for removing an item. The X is kind
    of similar for removing an item (home screen tap and hold to remove an app).
    There are SFSymbols for "! triangle" triangular error and a warning one. ("i"
    with a triangle badge)
  • Can animate "ShowBasemapGallery", slide in from side or out. Would have to be
    different for Compact popovers are transient, and that may not be what we
    want if we want users to keep it open to try different basemaps maybe custom

Search

  • Change color of subtitle from title (primary and secondary)
    (foregroundColor(.secondary))
  • Maps on iOS has an automatic re-search

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

No branches or pull requests

2 participants