Skip to content

feat(DynamicValueHandler): truncate middle of key instead of the end#592

Open
stravo1 wants to merge 6 commits into
frappe:developfrom
stravo1:middle-ellipsis
Open

feat(DynamicValueHandler): truncate middle of key instead of the end#592
stravo1 wants to merge 6 commits into
frappe:developfrom
stravo1:middle-ellipsis

Conversation

@stravo1
Copy link
Copy Markdown
Member

@stravo1 stravo1 commented May 10, 2026

In deeply nested dynamic values, truncating end of the word gives very little context (if not none). Dynamic Value keys can be truncated at the middle to preserve context (similar to how file managers truncate filenames/paths), we also show full key on hover.

Before:
Screenshot 2026-05-10 at 11 57 05 PM

After:
Screenshot 2026-05-10 at 11 59 36 PM

@stravo1 stravo1 requested a review from surajshetty3416 May 10, 2026 18:35
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.62%. Comparing base (e27292c) to head (47603df).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #592   +/-   ##
========================================
  Coverage    57.62%   57.62%           
========================================
  Files           29       29           
  Lines         3193     3193           
========================================
  Hits          1840     1840           
  Misses        1353     1353           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

stravo1 added 2 commits May 11, 2026 00:31
using index as keys caused unexpected results on middle ellipsis upon search as the middle ellpsis status was being stored in the index
Copy link
Copy Markdown
Member

@surajshetty3416 surajshetty3416 left a comment

Choose a reason for hiding this comment

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

MiddleTruncate instead (better defines functionality)?

And support 'as' prop?

<MiddleTruncate as='code' text='Looooooooooong-text-of-an-image.jpg'>

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