Display plans associated with a log or asset

Created on 21 December 2021, about 3 years ago
Updated 30 October 2023, about 1 year ago

Problem/Motivation

When viewing a log or asset entity we should display a message with a link to the plan(s) that reference the entity. This has come up as a feature request for a client project but seems like something farmOS core could support more generally (I forget if we had similar functionality in 1.x?)

The farmOS core version of this could support the default plan.log and plan.asset references, but it would be great if other modules could hook into this to display additional information based on their own custom logic.

This could be more generalized to support any "contextual information" associated with a log or asset (maybe even plans themselves?). Displaying plans associated with log/asset is one example, but another use case may be the Farm REI module which has a similar requirement to display a message on log and asset pages. This module has not been ported to 2.x but will be soon so perhaps there could be some overlap here!

Steps to reproduce

N/A

Proposed resolution

Provide an event or perhaps a tagged service for modules to provide information.

I think it would be great if this could be implemented in a custom block, eg: FarmPlanReferenceBlock or FarmContextBlock. This would allow this feature to be somewhat customized with additional settings and entity view modes and/or layout builder. We could also use custom theming/templating improve the placement of this block (maybe in a sidebar?). Possibly related to #3244733: Don't force two column layout on default display mode when Layout Builder is enabled β†’

Alternatively, we could hook into entity view pages, collect all the information, and display the info accordingly. But this would be less "configurable."

Remaining tasks

Decide if this can be abstracted past plan references to "contextual information" more generally.

Decide on a method of displaying this info on farm entity pages (block, hook, etc).

Implement!

User interface changes

Display additional plan and/or contextual info on farm entity pages.

API changes

None

Data model changes

None

✨ Feature request
Status

Active

Version

3.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States paul121 Spokane, WA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024