Log status CSS broken on translated sites

Created on 18 April 2023, over 1 year ago

Problem/Motivation

Originally reported here: https://farmos.discourse.group/t/farmos-calendar-module-v2/1617/12?u=mst...

The CSS class it looks for is Pending not pending

Steps to reproduce

Create a pending log in a translated site and observe that the circle is solid in the calendar.

Proposed resolution

Use the log status machine name, not the label, for the CSS class.

Remaining tasks

  • Figure out a way to get the log status machine name.
  • Update CSS accordingly.

User interface changes

Pending logs will appear as an empty circle in the calendar.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

1.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

  • Issue created by @m.stenta
  • πŸ‡ΊπŸ‡ΈUnited States m.stenta

    Figure out a way to get the log status machine name.

    Unfortunately, this is the crux of the issue. The State Machine module does not provide a Views field plugin that shows the status machine name. It only allows showing the status label, and the label gets translated before it ends up in the class attribute.

    We could fix this ourselves by adding a Views field plugin. A machine name one would be pretty simple on its own.

    I would prefer to see this added upstream in the State Machine module itself, but in the interest of fixing this NOW for farmOS users who are affected, it probably makes sense to do it in this module first. Then in the future if State Machine adds its own plugin we can switch to it.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States m.stenta
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024