Page MenuHomePhabricator

Inconsistent ellipsis behavior between evas text and evas textblock
Open, NormalPublic

Description

Some doc stuff first:

Evas Text:(https://docs.enlightenment.org/auto/eio/group__Evas__Object__Text.html#ga06da1d81bf84cfb6247791b4696125f9)
void evas_object_text_ellipsis_set ( Evas_Object * obj, double ellipsis )

Sets the ellipsis that should be used for the text object.

This is a value between 0.0 and 1.0 indicating the position of the text to be shown. 0.0 means the start will be shown and the end trimmed, 1.0 means the beginning will be trimmed and the end will be shown, and any value in between will cause ellipsis to be added in both end of the text and the requested part to be shown. -1.0 means ellipsis is turned off.

Evas Textblock :(https://docs.enlightenment.org/auto/eet/evas_textblock_style_page.html#evas_textblock_style_ellipsis)

Ellipsis

Sets ellipsis mode. The value should be a number. Any value smaller than 0.0 or greater than 1.0 disables ellipsis. A value of 0 means ellipsizing the leftmost portion of the text first, 1 on the other hand the rightmost portion.

Inconsistency:

ellipsis value = 0.5
Text = ABCDrrrrrEFGH

Evas Text:
Result: ...CDrrrrEF...

Evas Textblock:

Result: ABCD...EFGH

According to documentation both behavior is correct but why two different behavior ?

subodh6129 updated the task description. (Show Details)
subodh6129 raised the priority of this task from to Normal.
subodh6129 added a project: efl.
subodh6129 added a subscriber: subodh6129.
subodh6129 updated the task description. (Show Details)Aug 26 2015, 4:40 AM
subodh6129 assigned this task to cedric.
subodh6129 added subscribers: tasn, shilpasingh.
tasn reassigned this task from cedric to herdsman.Aug 26 2015, 8:21 AM
tasn closed this task as Wontfix.
tasn added a subscriber: cedric.

Two different behaviours, that sucks, but nothing we can do about it without breaking things. It was actually an oversight, when I added ellipsis to textblock, I didn't think text did it the way it did. Whatever happened, we are now stuck.

Actually, textblock behavior is more accurate and widely acceptable but not for evas text. if we can do something about it, app developers keep on asking why such behaviour.

tasn reopened this task as Open.Sep 1 2015, 2:11 AM

I was actually a bit too harsh with closing it (sorry, super busy nowadays). It was already discussed before. We need to add a flag that enables "sane ellipsis" (not sure about the name) and implement it in Evas text.

The behaviour in evas text was created by raster in 2001 or something like that, and yes, I know it's bad, but I couldn't have changed it.

I agree. Let's mark the current ellipsis mode of Evas Text as "inverse ellipsis" (as I understand the consensus is with Textblock's behavior), and have it on by default.
Then, add handling for the case of the new ellsipsis in Evas Text.

Also, add an option for the TEXT part in edje to disable it, like inverse_ellipsis: 0 (default is 1).

@subodh6129, sounds good?

tasn added a comment.Dec 2 2015, 8:14 AM

Not sure I like the name. I think I would prefer having something that's off by default and you turn on, an example would be: "sane_ellipsis: 1 (default 0)". Though that's a really bad name.

I agree. Let's mark the current ellipsis mode of Evas Text as "inverse ellipsis" (as I understand the consensus is with Textblock's behavior), and have it on by default.
Then, add handling for the case of the new ellsipsis in Evas Text.

Yes, this sounds good but with flag as @tasn suggested

Also, add an option for the TEXT part in edje to disable it, like inverse_ellipsis: 0 (default is 1).

@subodh6129, sounds good?

Not a good idea, as it will be confusing and not consistent with TB, simply enabling the flag for this looks better option.
Opinion?

tasn added a comment.Dec 21 2015, 6:39 AM

I think @subodh6129 and I are in agreement here, so just waiting on you @herdsman.

tasn added a comment.Dec 21 2015, 7:04 AM

No problem == you'll continue as agreed?

Oh, I didn't notice it was assigned to me.
Anyway, this is going into the queue until we fix other Evas Text issues like the current ellipsis.

zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 7:00 AM
zmike edited projects, added efl: rendering; removed Restricted Project.Jun 11 2018, 9:21 AM
zmike added a subscriber: zmike.Jan 22 2019, 12:37 PM

This seems somewhat relevant now

zmike changed the visibility from "All Users" to "Public (No Login Required)".