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

Enable field editing in multiselection #7306

Merged
merged 9 commits into from
Jan 31, 2020
Merged

Conversation

quincylvania
Copy link
Collaborator

@quincylvania quincylvania commented Jan 30, 2020

Closes #7276.

Been working on this for a week and it's really shaping up. I wouldn't want to ship multiselection raw tag editing without also enabling it fields, since iD mappers are discouraged from editing raw tags anyway.

Each field now has a "mixed" state which indicates that more than one value exists between all the features in the selection. The values are listed in the tooltip when hovering over the input. When features of different presets are selected, only fields common to all of them are shown.

I'm certain this feature will be a big time saver, especially coupled with repeat drawing in iD v3!

multiselection field editing

Fields still to support:

  • Name / localized
  • Structure / radio
  • Wikipedia

…#7276)

Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
@quincylvania quincylvania added the new-feature A new feature for iD label Jan 30, 2020
@quincylvania quincylvania added this to the Next Release milestone Jan 30, 2020
@quincylvania quincylvania self-assigned this Jan 30, 2020
Copy link
Collaborator

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m having a lot of fun playing around with this branch!

If I select two features that are different geometries (like a line and a node), the only available feature types are all barriers. Not sure why that is, since there are other presets that apply to multiple geometries.

If I select multiple features, and the name of one of them is locked due to a wikidata tag, the Name field remains editable and affects all the selected features. I’m not sure if it would be too annoying to lock the field as soon as one of the selected features has a locked name, or if it would be too surprising that editing the field would silently skip any locked names.

If I select two features that have issues, the issues aren’t visible. I realize this PR is focused on the fields, but maybe some validator warnings like the one for fixme are useful with multiple selection.

modules/ui/fields/combo.js Outdated Show resolved Hide resolved
@quincylvania
Copy link
Collaborator Author

@1ec5 Thanks for testing! 📏

If I select two features that are different geometries (like a line and a node), the only available feature types are all barriers.

Hmm you mean when changing the preset? I'm not seeing this. The default list is lacking right now but more options show up when you start searching.

If I select multiple features, and the name of one of them is locked due to a wikidata tag, the Name field remains editable and affects all the selected features.

We should probably lock the field if any feature has Wikidata since it'd be pretty bad to override the name of an important place in a multiselection by accident.

if it would be too surprising that editing the field would silently skip any locked names.

It does sound confusing for any features to get skipped for any field. Let's try to avoid this.

If I select two features that have issues, the issues aren’t visible. I realize this PR is focused on the fields, but maybe some validator warnings like the one for fixme are useful with multiple selection.

Yep, I'd like to enable an issues section too, but that's future work!

@1ec5
Copy link
Collaborator

1ec5 commented Jan 31, 2020

Hmm you mean when changing the preset? I'm not seeing this. The default list is lacking right now but more options show up when you start searching.

Oh you’re right, I was just confused by the initial list.

@quincylvania quincylvania merged commit 04bd811 into 2.x Jan 31, 2020
@quincylvania quincylvania deleted the multiselection-field-editing branch January 31, 2020 19:36
@quincylvania
Copy link
Collaborator Author

quincylvania commented Jan 31, 2020

This feature can now be tested on our 2.x preview site: https://2-x--ideditor.netlify.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A new feature for iD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable field editing for multiple selected features
3 participants