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

Update Metadata Customization page to suggest how to implement booleans #11064

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

luddaniel
Copy link
Contributor

@luddaniel luddaniel commented Dec 5, 2024

What this PR does / why we need it:

Explains how to implement a kind of boolean fieldtype in metadata customization
Related to #7961 (comment)

Which issue(s) this PR closes:

Is there a release notes update needed for this change?:

Included.

Preview doc changes at https://dataverse-guide--11064.org.readthedocs.build/en/11064/admin/metadatacustomization.html (search for "boolean").

@pdurbin pdurbin self-assigned this Dec 10, 2024
@pdurbin pdurbin added the Size: 0.5 A percentage of a sprint. 0.35 hours label Dec 10, 2024
@pdurbin pdurbin changed the title Update Metadata Customization page Update Metadata Customization page to suggest how to implement booleans Dec 10, 2024
@pdurbin
Copy link
Member

pdurbin commented Dec 13, 2024

@luddaniel this looks great to me but I'm going to request a review from @jggautier and @scolapasta who think about creating custom metadata blocks more than I do.

I did just make a pull request with some suggestions on wording. Please feel free to close and ignore if you don't them! Here:

@jggautier
Copy link
Contributor

Hey all. I'm commenting here since @pdurbin asked me to help review.

I agree with @pdurbin's edits I see at Recherche-Data-Gouv#9.

I read the points that @luddaniel very helpfully wrote at #7961 (comment). Thanks so much!

I'd like to learn more about the third and fourth points:

  • Being able to internationalize "true" / "false" or third value depending on the input title
  • Being able to export the "boolean"

And maybe it would be help to ask: From those two points, is it fair to say that using "Yes" / "No" makes it more difficult to internationalize values and makes it difficult to export the "boolean"? I think I don't have any experience to know this. But I'm thinking of cases where users are already using metadata fields with dropdown menus that show "Yes" and "No".

@jggautier
Copy link
Contributor

Hmm, I'll limit my review to the text changes being made and not try to understand why we're recommending this, since others worked on this earlier.

I'll review the latest text changes today 👍🏽

@pdurbin pdurbin removed their assignment Dec 16, 2024
@pdurbin
Copy link
Member

pdurbin commented Dec 16, 2024

@jggautier sounds good. Thanks!

| | The text fieldtype can be used |
| | combined with |
| | #controlledVocabulary as boolean. |
| | The text fieldtype may used to |
Copy link
Contributor

Choose a reason for hiding this comment

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

@luddaniel There's just a missing "be" between may and used. Could you add that?

Copy link
Member

Choose a reason for hiding this comment

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

@jggautier whoops, that was my bad, part of my rewrite. I just fixed it in 649e2af.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool thanks. That was my only suggestion for the changes in the documentation. I'll remove myself from the Assignment list on this PR.

@jggautier
Copy link
Contributor

jggautier commented Dec 16, 2024

Cool thanks. That was my only suggestion for the changes in the documentation. I'll remove myself from the Assignment list on this PR.

@jggautier jggautier removed their assignment Dec 16, 2024
@jggautier jggautier requested review from jggautier and removed request for jggautier December 16, 2024 19:49
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks, @luddaniel! Approved.

@luddaniel
Copy link
Contributor Author

luddaniel commented Dec 17, 2024

Hi @jggautier

I'd like to learn more about the third and fourth points:

  • Being able to internationalize "true" / "false" or third value depending on the input title
  • Being able to export the "boolean"

And maybe it would be help to ask: From those two points, is it fair to say that using "Yes" / "No" makes it more difficult to internationalize values and makes it difficult to export the "boolean"? I think I don't have any experience to know this. But I'm thinking of cases where users are already using metadata fields with dropdown menus that show "Yes" and "No".

In fact, exported metadata will not use any properties language, so exported values will match tsv values : True/False or Yes/No but Yes/No is likely unusable by a machine/code interpretor.
And it's not complicated to add internationalized value (GUI) .properties file to change True/False to Yes/No Oui/Non.

For users who are already using Yes/No in TSV : the damage is done haha! Nah it's just a recommendation, let's say to clarify our position on the boolean field type : use controlled values. I didn't tested but maybe you can use alternative value in TSV to change/add Yes/No to True/False.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: 0.5 A percentage of a sprint. 0.35 hours
Projects
Status: Ready for QA ⏩
Status: 🚧 Dev by Recherche Data Gouv
Development

Successfully merging this pull request may close these issues.

Custom Metadata: support boolean values
3 participants