localgovdrupal / localgov_microsites_group

LocalGov Drupal Microsites Group integration
1 stars 2 forks source link

UI: Add node lookup to 'Link' paragraph type #65

Open richard-s-rowley opened 2 years ago

richard-s-rowley commented 2 years ago

Assuming this is just adding the linkit.

If complexities arise due to group etc.... it might get bigger!

finnlewis commented 2 years ago

Add linkit! This might be in localgov_paragraphs.

@markconroy pointed out that we might need a patch for linkit to work with link fields.

finnlewis commented 2 years ago

@ekes points out that if this is changing field formatters on existing installs, it might get complex.

In general, we don't want to enforce changes to config on existing installed sites. so maybe this is simply for new sites and we bump the version of localgov_paragraphs?

markconroy commented 2 years ago

Can someone let me know why we are using plain text field for this link field in the localgov_link paragraph type?

We can't set the formatter for that field to use linkit (since it's not a link field). If we are doing to delete that field to change it to a link field, then we don't need linkit, since the link field type will look up nodes by default (just won't look up other entities).

markconroy commented 2 years ago

Ping @finnlewis, any idea re ^

finnlewis commented 2 years ago

OK - let's move this back to no status for now.

willguv commented 2 years ago

@finnlewis @msayoung can you explain the issue here? Cheers

markconroy commented 2 years ago

The issue is that the "link" field we are using is actually just a basic text field, not an entity reference type field, so it has nothing dynamic in it that we can hook into to make a look up. Without that, I'm not sure we can solve this without removing the current text field, creating it as an actual link field, then providing an upgrade path to the new field (but this will then mean everyone will also need to update their themes if they did any custom work on displays of those fields).

mccrodp commented 3 weeks ago

Just a thought, and a question.

Is there no way to smooth this upgrade path for users, to do in phases? Because the longer it's left, the more sites will be using the plain text field, in their themes etc. Eg.

  1. Create the new link field and copy the content into it from the old plain text field
  2. Preserve both fields in the interim and signal that the old field will be deprecated soon
  3. Release this version as a minor upgrade to the module
  4. Release a major version at a suitable time that removes the old field (if it was really smart it could warn/block users using the old field during upgrade)
markconroy commented 2 weeks ago

I like your thinking @mccrodp