Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiTextTruncate] Binary algorithm spike #7203

Closed
wants to merge 1 commit into from

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Sep 19, 2023

This PR was a WIP spike that I eventually gave up on. I'm opening and closing a PR for it mostly to preserve It works for start, end, middle, and startEndAtMiddle truncation, but falls apart when a truncation position is passed to startEnd.

I eventually investigated another approach (using width ratios) which uses equal or fewer iterations than binary search and additionally feels much easier to grok code-wise - see #7210

@cee-chen cee-chen closed this Sep 19, 2023
@cee-chen cee-chen deleted the truncation-binary branch September 19, 2023 23:12
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.

1 participant