Skip to content

feat(frontend): truncate long operator descriptions with ellipsis and tooltip#5677

Open
rbelavadi wants to merge 3 commits into
apache:mainfrom
rbelavadi:fix/4494-truncate-operator-description
Open

feat(frontend): truncate long operator descriptions with ellipsis and tooltip#5677
rbelavadi wants to merge 3 commits into
apache:mainfrom
rbelavadi:fix/4494-truncate-operator-description

Conversation

@rbelavadi

@rbelavadi rbelavadi commented Jun 13, 2026

Copy link
Copy Markdown

What changes were proposed in this PR?

Fixes the description truncation part of #4494 (operator name truncation was already addressed separately per maintainer comment).

Long operator descriptions in the property editor panel break the layout and make the panel harder to read. This change clamps the description text to 3 lines with an ellipsis, and shows the full description in a tooltip on hover using the existing nz-tooltip component already used throughout the project.

Before: long descriptions overflow with no limit
before

After: descriptions clamp to 3 lines with ..., full text visible on hover
after without hover

after with hover

Any related issues, documentation, discussions?

Fixes #4494

How was this PR tested?

Added 2 unit tests to operator-property-edit-frame.component.spec.ts:

  • should truncate text with CSS line-clamp when description is long
  • should show tooltip attribute on description container

All existing tests continue to pass.

Was this PR authored or co-authored using generative AI tooling?

Co-authored using Claude (Anthropic). Changes were reviewed and verified
by the author.

@github-actions github-actions Bot added fix frontend Changes related to the frontend GUI labels Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Thanks for your first contribution to Texera, @rbelavadi!

If you're looking for a good place to start, browse issues labeled starter-task; they're scoped to be approachable for newcomers.

You can drive common housekeeping yourself by commenting one of these commands on its own line:

  • Issues. Comment /take to assign an open issue to yourself, or /untake to release it. You can find unclaimed work with the search filter is:issue is:open no:assignee.
  • Sub-issues. To link issues into a parent/child hierarchy, comment /sub-issue #5166 #5222 on the parent to attach those children (or /unsub-issue #5166 #5222 to detach them). From a child issue, comment /parent-issue #5166 to set its parent, or /unparent-issue to clear it (the current parent is detected automatically). References may be written as #5166 or as a bare 5166; cross-repository references are not supported.
  • Pull requests (author only). Comment /request-review @user to request a review from someone, or /unrequest-review @user to withdraw that request.

Each command must match exactly: /take this will not work, only /take does. For the full contribution flow, see CONTRIBUTING.md.

@xuang7

xuang7 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Hi @rbelavadi, thanks for the PR! Since this PR includes a UI improvement, could you please add a screenshot to the PR description?

@Yicong-Huang

Copy link
Copy Markdown
Contributor

Hi @rbelavadi thanks for the PR. For UI changes, please include screenshot before and after so reviewer can understand the change. Also please add test cases to guard this behavior programmatically. Thanks.

@rbelavadi

Copy link
Copy Markdown
Author

Hi @rbelavadi thanks for the PR. For UI changes, please include screenshot before and after so reviewer can understand the change. Also please add test cases to guard this behavior programmatically. Thanks.

Hi, thank you for the feedback. I'm working on it right now.

@xuang7 xuang7 changed the title fix(frontend): truncate long operator descriptions with ellipsis and tooltip feat(frontend): truncate long operator descriptions with ellipsis and tooltip Jun 14, 2026
@rbelavadi

Copy link
Copy Markdown
Author

Hi @xuang7 and @Yicong-Huang,
I've updated the PR with before/after screenshots and added unit tests as requested. Also fixed a bug where the tooltip attributes were being rendered as plain text, they're now correctly placed as attributes on the container div.

@codecov-commenter

codecov-commenter commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.73%. Comparing base (07ca5d4) to head (0b2d2b8).
⚠️ Report is 56 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5677      +/-   ##
============================================
+ Coverage     52.38%   52.73%   +0.35%     
  Complexity     2484     2484              
============================================
  Files          1070     1075       +5     
  Lines         41359    41677     +318     
  Branches       4441     4490      +49     
============================================
+ Hits          21666    21980     +314     
+ Misses        18427    18399      -28     
- Partials       1266     1298      +32     
Flag Coverage Δ *Carryforward flag
access-control-service 64.61% <ø> (ø) Carriedforward from a373fe1
agent-service 33.76% <ø> (ø) Carriedforward from a373fe1
amber 53.31% <ø> (ø) Carriedforward from a373fe1
computing-unit-managing-service 1.65% <ø> (ø) Carriedforward from a373fe1
config-service 56.06% <ø> (ø) Carriedforward from a373fe1
file-service 38.21% <ø> (ø) Carriedforward from a373fe1
frontend 47.87% <100.00%> (+0.96%) ⬆️
pyamber 90.72% <ø> (ø) Carriedforward from a373fe1
python 90.75% <ø> (ø) Carriedforward from a373fe1
workflow-compiling-service 58.69% <ø> (ø) Carriedforward from a373fe1

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xuang7 xuang7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good to me! The two new tests currently set styles/attributes on throwaway elements and assert them back, so they may not be testing the actual component behavior. It might be better to render the component and assert that .operator-description renders the description and has the tooltip wired correctly.

@rbelavadi

Copy link
Copy Markdown
Author

@xuang7 Updated the tests to render the actual component instead of throwaway elements. The tests now verify that .operator-description renders with the nz-tooltip directive when a description is set and doesn't render when description is undefined.

@xuang7 xuang7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Labels

fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit displayed operator name and description length in the UI

4 participants