Skip to content

Form logic: collapsed summary is lowercased with CSS, and the operator badge sits off the baseline #16109

Description

@helloDanuk

Bug description

The collapsed field and page logic rules in the form builder (resources/js/components/forms/logic/FieldLogicRule.vue, PageLogicRule.vue) have two display issues:

  1. Lowercased with CSS. The summary is wrapped in <span class="lowercase">. This works for English ("configure conditions", "always show"), but German capitalizes nouns. "Bedingungen festlegen" (Configure conditions) shows as "bedingungen festlegen", and "Keine Bedingungen festgelegt" (No conditions configured) as "keine bedingungen festgelegt". Other languages with capitalized nouns or proper names are affected the same way.
  2. Operator badge off the baseline. In a summary like "Yes/No is yes", the text in the operator badge doesn't sit on the same baseline as the field name and the value around it. The badge has its own padding (py-1.5) and st-text-trim-ex-alphabetic, while the container aligns its items with items-center. This is the same in English.
issue 18

Suggested fix

  1. Remove the lowercase class from the summary span and let the translations decide the casing. The English strings could be lowercased in the source if that look is wanted:

    - <span class="lowercase">{{ collapsedSummary }}</span>
    + <span>{{ collapsedSummary }}</span>

    The operator badges use lowercase too. That's fine for German («ist», «enthält»), but could be checked for other languages.

  2. Align the summary items on the baseline (e.g. items-baseline on the container), or adjust the badge's padding.

How to reproduce

  1. Set the CP language to German. (there is no German translation yet merged in 6.44.1, I am preparing one in [6.x] German translations for Forms 2, plus consistency and accuracy fixes #16029 at the moment)
  2. In a form, open the Logic tab of a field and add a condition without choosing a field or value.
  3. Collapse the rule. The summary shows "bedingungen festlegen".
  4. Choose a field, an operator and a value, and collapse the rule again. The operator badge sits slightly off the line of the text around it.

Logs

Environment

Environment
Laravel Version: 13.44.1
PHP Version: 8.4.27
Composer Version: 2.11.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.44.1 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions