-
Notifications
You must be signed in to change notification settings - Fork 10
[New] Edit geometries with programmatic reticle tool #662
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?
[New] Edit geometries with programmatic reticle tool #662
Conversation
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 haven't reviewed everything yet, but here is some initial feedback.
Shared/Samples/Edit geometries with programmatic reticle tool/README.md
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
} | ||
} | ||
} label: { | ||
Label("Geometry Editor", systemImage: "pencil.tip.crop.circle") |
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.
Menu
has an initializer for this:
Menu("Geometry Editor", systemImage: "pencil.tip.crop.circle") {
...
}
Please use that instead.
Also, that system image is the one that Apple uses for markup, which could be confusing. Consider using a different symbol. Perhaps pencil.line
? In addition, when a geometry is selected, consider updating this button's image to match the selected geometry. It is a bit confusing for the button image to stay the same, yet open different menus based on the context.
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 systemImage
remain the same to look like the menu in the Create and Edit Geometries
sample?
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 don't know. I wasn't aware that the same icon is used in a different sample.
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.
Ok, I updated the systemImage
to pencil.line
.
...eometries with programmatic reticle tool/EditGeometriesWithProgrammaticReticleToolView.swift
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
private extension GeometryEditorMenu { |
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.
Some of the properties in this extension are a single line and are only called from a single place, so there is no code being consolidated and in fact the code is more complex. I suggest inlining the body of these properties where they are called and then just getting rid of this extension.
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 removed and inlined the single line non-optional properties and kept the unwrapped optional properties in this extension.
Description
This PR implements
Edit geometries with programmatic reticle tool
inEdit and Manage Data
category.URL to README: URL
Linked Issue(s)
swift/issues/7071
How To Test
Screenshots