Skip to content

Text Field trailing visual text is always truncated #3800

@myabc

Description

@myabc

To reproduce:

  1. Create a form with a text field and text trailing visual:
      form do |f|
        f.text_field(
          name: :days_displayed,
          label: "Days displayed on project activity"
          type: :number,
          trailing_visual: {
            text: { text: "minutes" }
          },
        )

Actual behavior

The trailing visual text is always truncated.

PVC rendering trailing visual - with truncation

Expected behavior

  • The trailing visual text should not be truncated by default.
  • Truncation could be provided as an option.

Note

The behavior of PVC differs from Primer React implementation.

Primer React rendering trailing visual - no truncation
      <FormControl>
        <FormControl.Label>Enter monies</FormControl.Label>
        <TextInput trailingVisual="minutes" placeholder="200" />
      </FormControl>

(example taken from Primer React Storybook)

OpenProject ticket (for internal tracking)

https://community.openproject.org/wp/69504

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrails

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions