filament icon indicating copy to clipboard operation
filament copied to clipboard

Rename helper text to description and support position

Open zepfietje opened this issue 2 years ago • 7 comments

Option to show helper text below label instead of below field.

https://github.com/filamentphp/filament/discussions/4333#discussioncomment-6419262 https://github.com/filamentphp/filament/pull/7258

zepfietje avatar Jul 28 '23 08:07 zepfietje

Form fields:

  • hint() -> textAsideLabel() / textBelowLabel() for inline layouts
  • hintActions() -> actionsAsideLabel() / actionsBelowLabel() for inline layouts
  • hintColor() -> textAsideLabelColor() / textBelowLabelColor() for inline layouts
  • hintIcon() -> iconAsideLabel() / iconBelowLabel() for inline layouts
  • hintIconTooltip() -> iconAsideLabelTooltip() / iconBelowLabelTooltip() for inline layouts
  • helperText() -> textBelowField()

Infolist entries:

  • hint() -> textAsideLabel() / textBelowLabel() for inline layouts
  • hintActions() -> actionsAsideLabel() / actionsBelowLabel() for inline layouts
  • hintColor() -> textAsideLabelColor() / textBelowLabelColor() for inline layouts
  • hintIcon() -> iconAsideLabel() / iconBelowLabel() for inline layouts
  • hintIconTooltip() -> iconAsideLabelTooltip() / iconBelowLabelTooltip() for inline layouts
  • helperText() -> textBelowContent()

danharrin avatar Dec 29 '23 10:12 danharrin

Gonna push this to v4, otherwise it could result in quite a lot of internal tech debt if implemented in a BC way. Especially to do with custom form fields / infolist entries.

danharrin avatar Dec 29 '23 10:12 danharrin

In my opinion, helper text can just be renamed to description with an option for position like below field and above field.

Or am I missing something?

zepfietje avatar Dec 29 '23 15:12 zepfietje

any update?

faizananwerali avatar Mar 22 '24 13:03 faizananwerali

It would be cool to have an extra option to show text below the label, but I personally don't see the reason to rename these methods (helperText -> description would be the only one I could understand). These methods are used in basically every Filament app and everyone is now used to helperText and hint. Even if you keep the old methods supported by aliasing them to the new method, every single Filament project in existence would now suddenly have a code chore to remove these deprecations.

ralphjsmit avatar May 10 '24 12:05 ralphjsmit

Are there any pull requests to resolve this issue?

faizananwerali avatar May 10 '24 14:05 faizananwerali

I don't think, I just saw this on roadmap for "at some point".

ralphjsmit avatar May 10 '24 14:05 ralphjsmit