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

[VIVO-1756] - Make data property richtext editor option selectable from UI #138

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

gneissone
Copy link
Member

JIRA Issue: [VIVO-1756]

What does this pull request do?

Makes the rich text editor for data properties selectable via the UI

What's new?

Adds a drop down menu to the data property settings form. Selecting 'rich text' from this menu results in a triple being added for the data property in the form http://vitro.mannlib.cornell.edu/ns/vitro/0.7#editing "HTML" .

How should this be tested?

Add a new data property or edit an existing one.

Screen Shot 2020-03-21 at 7 22 03 PM

Add the bottom of the form, there should be a new option for enabling the rich text editor.

Screen Shot 2020-03-21 at 7 22 16 PM

Select rich text and confirm that the value 'HTML' is populated

Screen Shot 2020-03-21 at 7 22 29 PM

Add or edit an instance of the property, confirm it uses the rich text editor.

Screen Shot 2020-03-21 at 7 22 39 PM

Edit the property settings again to switch the editor back to the default. Confirm the rich text editor is no longer used.

Screen Shot 2020-03-21 at 7 32 23 PM

Additional Notes:

'HTML' is currently the only value that has any effect, and it is hard coded into both the default form (https://github.com/vivo-project/Vitro/blob/master/webapp/src/main/webapp/templates/freemarker/edit/forms/defaultDataPropertyForm.ftl#L34) and the proposed DatapropRetryController.java here. Perhaps there's a more eloquent way to handle this but given the current situation it seemed sufficient.

Interested parties

@VIVO-project/vivo-committers

@awoods
Copy link
Member

awoods commented Mar 24, 2020

@gneissone : Is there value in additionally enabling a "textarea" option for larger textual content, per #76 (review) ?

Copy link
Member

@awoods awoods left a comment

Choose a reason for hiding this comment

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

Works as advertised. 👍

@gneissone
Copy link
Member Author

@gneissone : Is there value in additionally enabling a "textarea" option for larger textual content, per #76 (review) ?

Yes, I think so. Do you have a suggestion for what value of the editing property should result in a bigger plaintext editor? Since it also requires changes to defaultDataPropertyForm.ftl I think it should be in a followup PR.

@awoods
Copy link
Member

awoods commented Mar 24, 2020

@gneissone : Is there value in additionally enabling a "textarea" option for larger textual content, per #76 (review) ?

Yes, I think so. Do you have a suggestion for what value of the editing property should result in a bigger plaintext editor? Since it also requires changes to defaultDataPropertyForm.ftl I think it should be in a followup PR.

A follow-up ticket/PR makes sense. I would defer to the ontologists for the term.

@awoods
Copy link
Member

awoods commented Mar 30, 2020

Follow-on ticket, per: #138 (comment)
https://jira.lyrasis.org/browse/VIVO-1757

@roflinn roflinn self-requested a review March 31, 2020 16:19
Copy link
Member

@roflinn roflinn left a comment

Choose a reason for hiding this comment

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

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants