-
Notifications
You must be signed in to change notification settings - Fork 11
Update Example groupings #1123
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
Update Example groupings #1123
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,21 +56,31 @@ struct Examples: View { | |
} | ||
|
||
static func makeCategories() -> [Category] { | ||
let common: [Category] = [ | ||
.geoview, | ||
.views | ||
] | ||
#if os(iOS) && !targetEnvironment(macCatalyst) | ||
return [.augmentedReality] + common | ||
[.accessories, .augmentedReality, .data, .other] | ||
#else | ||
return common | ||
[.accessories, .data, .other] | ||
#endif | ||
} | ||
} | ||
|
||
@MainActor | ||
extension Category { | ||
/// Components that can be used with any geoview. | ||
static var accessories: Self { | ||
.init( | ||
name: "Accessories", | ||
examples: [ | ||
Example("Basemap Gallery", content: BasemapGalleryExampleView()), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved Basemap Gallery into this category since my original proposal since it can be initialized without specific data on any geoview. |
||
Example("Compass", content: CompassExampleView()), | ||
Example("Overview Map", content: OverviewMapExampleView()), | ||
Example("Scalebar", content: ScalebarExampleView()) | ||
] | ||
) | ||
} | ||
|
||
#if os(iOS) && !targetEnvironment(macCatalyst) | ||
/// Augmented reality components. | ||
static var augmentedReality: Self { | ||
.init( | ||
name: "Augmented Reality", | ||
|
@@ -83,27 +93,26 @@ extension Category { | |
} | ||
#endif | ||
|
||
static var geoview: Self { | ||
/// Components requiring specific data. | ||
static var data: Self { | ||
.init( | ||
name: "GeoView", | ||
name: "Data", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would "Advanced", "Specialty", or "Specialized" be better for this category? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Data is OK for now. |
||
examples: [ | ||
Example("Basemap Gallery", content: BasemapGalleryExampleView()), | ||
Example("Bookmarks", content: BookmarksExampleView()), | ||
Example("Compass", content: CompassExampleView()), | ||
Example("Feature Form", content: FeatureFormExampleView()), | ||
Example("Floor Filter", content: FloorFilterExampleView()), | ||
Example("Overview Map", content: OverviewMapExampleView()), | ||
Example("Popup", content: PopupExampleView()), | ||
Example("Scalebar", content: ScalebarExampleView()), | ||
Example("Search", content: SearchExampleView()), | ||
Example("Utility Network Trace", content: UtilityNetworkTraceExampleView()) | ||
] | ||
) | ||
} | ||
|
||
static var views: Self { | ||
/// General purpose components. | ||
static var other: Self { | ||
.init( | ||
name: "Views", | ||
name: "Other", | ||
examples: [ | ||
Example("Floating Panel", content: FloatingPanelExampleView()) | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would "Basic" be a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Accessories is fine.