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

Draft: feature editor prototype #236

Draft
wants to merge 312 commits into
base: v.next
Choose a base branch
from

Conversation

fpearson1111
Copy link
Collaborator

This is an initial prototype of the feature editor component.

I have tried to mimic the architecture of the feature form component (and its microapp), and basically wrap the feature form in a containing component that also has a toolbar that controls a geometry editor.

My main architectural concern is that the feature editor may need to be able to see the state of the Map or (Composable) MapView for later enhancements. So maybe the feature editor itself should take in a MapState (rather than abstracting the MapView stuff away using the map lambda as it does currently). However, maybe that's making the feature editor component unnecessarily large and heavy -- maybe doing that can be avoided. Maybe we could leave it the way it is now and if required change it later without too much trouble (i.e. let's not speculate about it now; let's change it if a problem actually arises)?

Members of the Bistromath and Apollo teams: feel free to look over this code and add any comments or start any discussions you would like. Remember that we shouldn't have deep technical discussions here because this PR is publicly-visible :)

Soren Roth and others added 30 commits July 13, 2023 10:38
kaushikrw and others added 28 commits November 16, 2023 08:35
* make values focusable (and copyable) when isEditable = false.

* organize color defaults for BaseTextField

---------

Co-authored-by: Soren Roth <sor10874@esri.com>
To consume fix to snap-to-north
This test app contains a feature which has a feature form
definition -- necessary for displaying a feature form.
Need to set this to use in the editor.
App is also responsible for identifying features
By stopping tap events until the editor stops again.
Rather than waiting until the end of editing. This
doesn't actually make any difference right now; eventually
it might be useful for the form to see a more up-to-date
geometry in case some fields of the form rely on the
geometry.

This isn't as reactive as it could be. The geometry is only
pushed after each geometry editor interaction finishes, but
not "live" as the interaction is happening. I don't know if
we could really achieve that without a lot of effort at the
API level.
Just for point features, for now...
To match the sketches we have in our prototyping issue.
I tried to make it that the bottom sheet can be pulled from
the bottom to open, but I don't know how to do that. The Compose
doc suggests using a button so we can go with that approach instead.
If we run this code when the geometry try is not point
or multi-point (I have only tested with lines and points,
but presumably applies in other cases), `getSymbol` gives us
a symbol that doesn't display (or maybe null) so it messes
up the symbology of the editor.
To see how the form elements updates as the geometry is changed,
without recreating the form (as is done when you have to swap
between form and map view.

Also updated the edit icon :)
So that form fields that use the geometry (e.g. showing
length of line geometry) will update as the geometry is updated
(note that it's not a completely live update -- it only happens
when the `geometry` event fires on the geometry editor, so after
each interaction completes).
And other small changes (c)
We need to access it to see things about the editor such as undo/redo state.
The sizing logic is not great with this toolbar. If the two
sub-toolbars (the "control one" -- stop, discard, att/geom --
and the geometry one) have different numbers of buttons then
the whole thing will shift around.

I think we will need to do something more complicated to fix that.
Possibly getting an intrinsic measurement of the width of the control
toolbar and using that as a minimum width of the geometry toolbar,
in combination with making it scrollable.
Apply feature symbology to the geometry editor for simple cases.
Base automatically changed from feature-branches/forms to v.next April 3, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants