Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
104 stars 71 forks source link

Make A New Linked Agent? #1685

Open rosiel opened 3 years ago

rosiel commented 3 years ago

Thank you to Amy Blau for bringing this up in the user call.

In the node form for an islandora object, you can add existing linked agents but not make new ones. This is frustrating, because there's no indication of how/why/what to do.

The use case is: I have an item in hand, I have started creating (/editing) a node, so I need to be able to check if the agent is already in the system, and if not, make a new one - preferably without leaving this form. But i want it to be clear to me when i'm making a new agent that i'm making a new agent. (i.e. I refuse to use the autocomplete with "create new terms" enabled because that leads to way too many misspellings, and/or new terms being created because when the autocomplete comes up it's easy to think you selected from the autocomplete but didn't.

1 - create documentation in the 'help text' there on the form, that says that agents need to already exist in the Person / Family / Corporate Body vocabulary, and to create new ones, go to structure > taxonomy.

2 - If Inline Entity Form doesn't work with the Linked Agent field type, fix that

3 - If it becomes possible to "check if the agent is already in the system, and if not, make a new one - preferably without leaving this form" then make Islandora Defaults use that.

elizoller commented 3 years ago

i wonder if @seth-shaw-unlv has any thoughts on this as he is the original creator of the linked agent field. but i would be hesitant to have an inline form because an agent can be quite complicated - like a person entity that has many fields besides just the label and the authority source. i don't think it'd be very difficult to add a link out to create a new taxonomy term, but you'd have to have something that asks what kind of term to create (ie person, corporate body, etc)

seth-shaw-unlv commented 3 years ago

I have not used Inline Entity Form, so I can't form any opinion along those lines. I do like the help text addition as a quick-and-easy bandage though.

The main trouble with auto-creating new terms is that it will only support selecting a single taxonomy to add it to. So, you could configure it to add new terms automatically to person OR corporate body OR family but that is it. It isn't smart enough to sort them out. I imagine Inline Entity Form will suffer from the same issue... which form should it use?

Our staff are used to CONTENTdm controlling these agent fields so they've already trained students to submit new agent recommendations through a separate process which requires the name to be approved before they can use it. Admittedly this is not friendly UI for those shops where the metadata creators also have rights to add new agents.

I wonder though, if we can find a way to create a modal window for creating new agents similar to how ArchiveSpace does it. So, a user with appropriate permissions, would see a button next to the Linked Agent widget that opens a modal window with a list of allowed taxonomies and, based on the which one is selected, loads the appropriate term edit window. Once they are done creating the new agent it would then be available in the drop-down (or auto populated).

There might be a module that could help us with this, but failing that it would probably take more JS prowess and time than I have now to implement it.

rosiel commented 3 years ago

@elizoller your hesitation is understandable, but islandora defaults was supposed to be something easy to use, not the way everyone has to do things. [edit - oops hit enter too soon]

rosiel commented 3 years ago

@seth-shaw-unlv the fact that a field can pick from many vocabs but only add to one seems like a drupal bug. Having to choose a default vocabulary though is not a dealbreaker, I'd still like the ability to use inline entity form with this field type.

Our staff do not distinguish between adding 'authorities' and putting text in fields. You seem to have a very specialized shop.

The modal window idea is cool as an option for this! If we can get a module to open and submit a form in a modal, that would be great, and would be a very nice step from my PR (where clicking on new person, corporate body, or family opens a new window listing the terms where you can add a new one) to a situation where clicking those links launches a modal with a new term form.

But, Islandora Defaults is not the only user of the Typed Relation field (had to look up the name of the field type - why isn't it documented in the readme?) and for the general case, Typed Relation should be able to have inline entity form.

elizoller commented 3 years ago

i know literally nothing about this module but it might be worth a test: https://www.drupal.org/project/inline_entity_form could require a custom plugin for custom field type though

manez commented 3 years ago

Linking @rosiel 's PR here since GitHub didn't make the connection automatically: https://github.com/Islandora/islandora_defaults/pull/39

Edit: the PR is to add the help text