Unified flag styling mechanism

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

Problem/Motivation

farmOS 2.x only provides CSS for the three flags it provides (Monitor, Needs Review, and Priority). All other flags are given the default green style.

It is possible for modules that provide flags to add their own CSS, but this requires them to implement hook_preprocess_field__flag() like farmOS core does: https://github.com/farmOS/farmOS/blob/2ec41cbe1cd821bfabc6020d37e57f71e0...

There is also a complication in map popups that requires hook_preprocess_farm_map() to be implemented as well: https://github.com/farmOS/farmOS/blob/2ec41cbe1cd821bfabc6020d37e57f71e0...

Another consideration here is that the CSS that farmOS core provides is specific to the Gin theme (encapsulated in the Gin-specific farm_ui_theme module). Should we try to abstract the styling mechanism so that it is not directly tied to Gin somehow?

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

✨ Feature request
Status

Active

Version

3.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States m.stenta

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