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 a "quotes" multi-value text field in the external mentions content type. #1001

Open
klonos opened this issue Jun 19, 2023 · 9 comments · May be fixed by #1011
Open

Add a "quotes" multi-value text field in the external mentions content type. #1001

klonos opened this issue Jun 19, 2023 · 9 comments · May be fixed by #1011

Comments

@klonos
Copy link
Member

klonos commented Jun 19, 2023

This came up in a thread in Zulip, where we were discussing the mentions to Backdrop in the recent Dries Q&A session in DrupalCon Pittsburg:

@keiserjb

Watching/listening the Driesnot Q and A for the Backdrop question that is supposed to be there. Will report.

Question is at 36:05. Backdrop is a "friendly fork" and has been a "net positive for Drupal." "Backdrop might be a great solution," for organizations that cannot move to Drupal 10 or 11.

@cellear

Could we get away with putting this quote on our home page?

@klonos

What we can surely do is add a "quotes" field in our external mentions content type, so that when we are adding links to videos/podcasts, we can include these (which will be equally useful for non-video, textual external mentions too).

@bugfolder
Copy link
Contributor

These are the current fields for that content type:

image

So this addition would presumably be something like:

  • Title: Quote
  • Machine name: field_mention_quote
  • Field type: Text (long)

Sound OK?

We need to give attribution for the quote. There is an existing "Link to author(s)" field, but what if the author isn't linkable? Should we also have a field_mention_quote_attribution textfield?

Anything else? Other suggestions on the details of implementation?

@klonos
Copy link
Member Author

klonos commented Jun 19, 2023

Sound OK?

I was thinking that this should be a multi-value field, in case there may be multiple quotes in the same source that we'd like to add. So field_mention_quotes? (plural)

...but what if the author isn't linkable?

Link fields allow for an "Optional URL" setting, which is enabled for the current "Link to author(s)" field, and which allows to add an author name w/o a link to it. We can do the same for the new "Link to quoter" field (in the case of videos or podcasts, the person that makes the quote might not be the author/owner of the site/platform where the mention was published).

@bugfolder
Copy link
Contributor

bugfolder commented Jun 19, 2023

So on the "Link to quoter" field, we want a "Required Title" (because all quotes should be attributed) but an "Optional URL" (because there may not be a link to the person being quoted).

And I'm assuming that the "Link to quoter" field only allows one entry, right? In a single "External mention", a single person can give multiple quotes. But trying to allow multiple people giving multiple quotes via a single External Mention seems problematic.

[EDIT] If the URL is optional, then that field should be called just "Quoter" (or something like it) since it isn't necessarily a link.

@bugfolder
Copy link
Contributor

Here's what the two fields mentioned above would look like on the "Create External mention" page:

image

@jenlampton
Copy link
Member

This looks great, but can we change the label from "Quoter" to "Quote author"? :)

Let's also make sure this field is hidden on the node view displays (since we will be pulling them out via a view instead)

@bugfolder
Copy link
Contributor

That's done. Fields are added to the content type, but hidden on the default display.

@bugfolder
Copy link
Contributor

I was going to close this issue (since the fields are now added) and link to an example for reference. One such example is https://backdropcms.org/node/5012/edit.

But then I noticed that although we give the verbal instruction "If you include a quote, you must give attribution in the "Quote author" field following," in that example, that quote doesn't have attribution in the "Quote author" field.

Which makes me wonder if we need to add some conditional validation to the node edit form: if the "Quote(s)" field is non-empty, make the "Quote author" field required. @jenlampton, @klonos?

@bugfolder
Copy link
Contributor

@klonos, @yorkshire-pudding, I've created a PR #1011 that adds validation to the quote author field if a quote is present.

@yorkshire-pudding
Copy link
Contributor

@bugfolder - I don't have a way to test it, but comparing the code to the elements on the page, it looks good.

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

Successfully merging a pull request may close this issue.

4 participants