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

Add source subfield to other fields #217

Merged

Conversation

pedromml
Copy link

@pedromml pedromml commented Jun 4, 2024

This PR aims to facilitate the tagging of sources for individual fields in the iD editor.
To do it, a new button, labeled "Add source" is was added besides the "Info" button of each field that, when clicked, creates a "subfield" below the main field that allows users to set a value to the tag *:source, like start_date:source
The goal of this is to encourage users to add specific sources to certain fields without them having to manually add the *:source tag.

This is the first PR related to my GSoC project that has the goal of revamping the way users register sources for features.
I'm open to feedback regarding design choices, code style and if the general idea of the update!

This update touches on the *:source tag only, it doesn't change the main "Source" field. An update to that field will be proposed in the future.

ohm_video.mp4

image

@pedromml pedromml linked an issue Jun 4, 2024 that may be closed by this pull request
Copy link
Member

@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 excited to see this feature taking shape! Thank you for taking the initiative to solicit feedback on the forum. I’ll wait to look more closely at the code until you’re ready for review, but here’s some preliminary design feedback. Take my feedback with a grain of salt: others on the forum might have different opinions; ultimately it’ll be your judgment call.

modules/ui/source_subfield.js Outdated Show resolved Hide resolved
modules/ui/field.js Outdated Show resolved Hide resolved
@pedromml pedromml marked this pull request as ready for review June 20, 2024 16:58
Copy link
Member

@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.

This is looking good. I’ve played around with it locally and don’t see any glaring issues. Just a few minor things left, and then we can merge this and move on to the main Sources field and other improvements.

modules/ui/source_subfield.js Outdated Show resolved Hide resolved
modules/ui/source_subfield.js Outdated Show resolved Hide resolved
modules/ui/field.js Show resolved Hide resolved
modules/ui/source_subfield.js Show resolved Hide resolved
data/core.yaml Outdated Show resolved Hide resolved
Copy link
Member

@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.

🎉

@1ec5 1ec5 merged commit 06caacc into OpenHistoricalMap:staging Jun 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add fields to represent the *:source subkey
2 participants