Skip to content

[FEATURE] Add column character limit with ellipsis and Flux tooltip - #2136

Merged
luanfreitasdev merged 2 commits into
Power-Components:7.xfrom
aleRibeiro0209:feature/PG-add-limit-caracters-tooltip-on-table
Sep 4, 2026
Merged

luanfreitasdev merged 2 commits into
Power-Components:7.xfrom
aleRibeiro0209:feature/PG-add-limit-caracters-tooltip-on-table

Conversation

@aleRibeiro0209

Copy link
Copy Markdown
Contributor

⚡ PowerGrid - Pull Request

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change

Description

Adds two new column methods to control text display:

  • ->limit(int $characters, string $end = '...') — truncates the displayed
    value to the given number of characters with an ellipsis. Works in every theme.
  • ->tooltip(bool $enabled = true, string $position = 'top') — shows the full,
    untruncated value in a tooltip. Rendered via <flux:tooltip> in the Flux theme;
    themes that don't ship a table.column-tooltip view simply keep the plain
    truncated text.

Example:

Column::add()
    ->title('Description')
    ->field('description')
    ->limit(24)
    ->tooltip();

Implementation notes:

  • Shipped as a built-in TruncatePlugin that registers the two Column macros;
    the actual rendering lives in CellRenderer so it composes with content classes
    and is skipped for templated/index columns.
  • The tooltip only renders when the value was actually shortened — a value
    shorter than the limit shows in full with no tooltip.
  • Added @method annotations on Column so IDEs autocomplete the new methods.
  • Covered by feature tests (truncation, no-truncation below limit, theme scoping).

Related Issue(s):

Documentation

This PR requires Documentation update?

  • Yes
  • No
  • I have already submitted a Documentation pull request.

@luanfreitasdev
luanfreitasdev merged commit ce1c320 into Power-Components:7.x Sep 4, 2026
@aleRibeiro0209
aleRibeiro0209 deleted the feature/PG-add-limit-caracters-tooltip-on-table branch September 17, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants