Page MenuHomePhabricator

Example: Add efl_canvas_textblock_obstacles example
ClosedPublic

Authored by AbdullehGhujeh on Dec 23 2019, 1:24 AM.

Details

Summary

Add efl canvas textblock example based on unified APIs (converted from legacy)

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
AbdullehGhujeh created this revision.Dec 23 2019, 1:24 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

AbdullehGhujeh requested review of this revision.Dec 23 2019, 1:24 AM
AbdullehGhujeh edited the summary of this revision. (Show Details)Dec 23 2019, 1:29 AM
AbdullehGhujeh added a reviewer: ali.alzyod.
segfaultxavi requested changes to this revision.Dec 23 2019, 4:34 AM
segfaultxavi added a subscriber: segfaultxavi.

The example clearly does not work (the text lines are overlapped and illegible).
This is probably the implementation's fault, not this example's, but do we have any idea of where the problem is? I would like to be 100% sure the problem is not in the example.

src/examples/elementary/efl_canvas_textblock_obstacles_example.c
5

Eina.h is automatically included.
Elementary.h is a legacy header and you don't need it now.

88–89

warning: unused parameter ‘data’

196

Missing i in "registering".

This revision now requires changes to proceed.Dec 23 2019, 4:34 AM
This comment was removed by AbdullehGhujeh.

remove unneeded headers, fix warning and fixing spelling

AbdullehGhujeh marked 3 inline comments as done.EditedDec 23 2019, 5:36 AM

The example clearly does not work (the text lines are overlapped and illegible).
This is probably the implementation's fault, not this example's, but do we have any idea of where the problem is? I would like to be 100% sure the problem is not in the example.

We have ported it from legacy, the legacy example has the same behavior (the text lines are overlapped and illegible).

woohyun added a subscriber: woohyun.EditedDec 26 2019, 8:24 PM

@AbdullehGhujeh

I don't think that "keeping this example with current status" is good idea.
Plus, I also don't think that "legacy one has the same result" can be a good reason for keeping this as it is.

We need to fix the problem and make the example be shown properly. This is an example for EFL developers.

AbdullehGhujeh added a comment.EditedDec 29 2019, 12:38 AM

@woohyun

Of course it need's to be fixed.
The example code here works same as the legacy one (which supposed to work fine in the past and never changed).
In my comment I said that this is the same as the legacy, to say it is an implementation issue not an example issue (agreed with what segfaultxavi has said).

@AbdullehGhujeh

Oh - So, do you mean that the problem is caused not by your example but by "efl_canvas_textblock" . Am I right ?

AbdullehGhujeh added a comment.EditedDec 31 2019, 2:03 AM

It needs more investigation but for now

This is the commit that caused the issue
Aug 23, 2017 e63be982d904a01ade5aced9ef9924a78d155b8a

@woohyun

This should be fixed after D11005

@AbdullehGhujeh

I think D11005 is not sufficient to fix the problem.
As you can see the result of the test, some meaningless space is existing between "object" and "can".

That is, "... Any evas object can register ...".

The space seems like being increased (or decreased) following the item width. (i.e. 72 in <item size=72x16>)

Could you check this a bit more ?

segfaultxavi accepted this revision.Jan 3 2020, 2:38 AM

With this almost-working example you have convinced me that the remaining issues are implementation issues, and therefore the obstacles API is usable.

I would land this example and create tasks for the remaining implementation issues.

This revision is now accepted and ready to land.Jan 3 2020, 2:38 AM
Closed by commit rEFL7107d6cf903e: Example: Add efl_canvas_textblock_obstacles example (authored by abdulleh Ghujeh <a.ghujeh@samsung.com>, committed by segfaultxavi). · Explain WhyJan 3 2020, 2:42 AM
This revision was automatically updated to reflect the committed changes.