-
Notifications
You must be signed in to change notification settings - Fork 11
Feature template picker #993
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
base: v.next
Are you sure you want to change the base?
Conversation
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
I added tests |
ok, added tutorial now as well |
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've tested this with the Feature Forms Micro App. It looks and works great! I noticed a couple of issues, which I've commented on. I'll look at the code in another go-round.
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
…TemplatePicker.swift Co-authored-by: Mark Dostal <[email protected]>
Ok, I fixed the image size so that it will limit it to 50x50, but not enlarge the smaller icon sizes. |
The only issue I see with that is when Dynamic Type is used the text will increase in size but not the icons. That would be "nice-to-have", but it's not a dealbreaker for me. I did add padding around the image to keep the size in check.
Here's what it looks like with Dynamic Type: And without it: |
I'd rather have features that are under 50x50 draw correctly in their correct size. To me that's important. If there is a way to do that and let the larger features grow up to the dynamic font size, that would be ideal. But I couldn't find a way to do that unfortunately. |
The tool for that job is |
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Show resolved
Hide resolved
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
32af9db
to
3ffb37d
Compare
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
...s/ArcGISToolkit/Documentation.docc/Resources/FeatureTemplatePicker/FeatureTemplatePicker.png
Outdated
Show resolved
Hide resolved
Sources/ArcGISToolkit/Documentation.docc/Tutorials/FeatureTemplatePickerTutorial.tutorial
Outdated
Show resolved
Hide resolved
…latePickerTutorial.tutorial Co-authored-by: David Feinzimer <[email protected]>
…arcgis-maps-sdk-swift-toolkit into ryan/featureTemplatePicker
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.
Just 2 last comments and I think that'll be it.
) | ||
} |
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.
Should the templates be sorted alphabetically by name?
) | |
} | |
) | |
infos.sort { $0.template.name < $1.template.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.
Perhaps the sections too?
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'm not sure. I could see alphabetizing them. Currently it is in the order of layers and then the templates that the layers report. So I'm not sure what is desirable. @mhdostal do you recall what the obj-c based version did?
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'm not sure. I could see alphabetizing them. Currently it is in the order of layers and then the templates that the layers report. So I'm not sure what is desirable. @mhdostal do you recall what the obj-c based version did?
There was no sorting in the obj-c template picker.
...s/ArcGISToolkit/Documentation.docc/Resources/FeatureTemplatePicker/FeatureTemplatePicker.png
Outdated
Show resolved
Hide resolved
One enhancement request would be to only show the templates that apply to a specific geometry type. In the Swft FF test app, we are only allowing creating point symbols, so limiting the feature templates to those supporting point geometries would be nice. |
Cool. Did the original template picker in the other toolkit do this as well? |
No, but it's something that I'm doing for the Swift Feature Form test app; we're not concerned with the full geometry-editing experience yet, so we're only supporting adding point features. |
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.
Updated the image. PR looks good 👍
Sources/ArcGISToolkit/Components/FeatureTemplatePicker/FeatureTemplatePicker.swift
Outdated
Show resolved
Hide resolved
…TemplatePicker.swift
We have one of these in the objc toolkit.
This is an initial PR. I still need to add tests and a tutorial. Also the map that I use in the example is not a good map for this. I need to find a better map.