Discussion:
[E-devel] Elm_Entry assuming markup input???
Andrew Williams
2017-06-18 20:18:33 UTC
Permalink
Hi team,

Netstar pointed out something to me today that I had completely missed for
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
will return "a>b" - what is the reason for this? It seems completely
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?

Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
Daniel Hirt
2017-06-18 20:59:34 UTC
Permalink
Hi Andrew,

Markup uses tags like "<color=#fff> hello </color>".
It is clear why it's essential to do "character escaping" like "&gt;"
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.

Hope that clears things up a bit.

--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed for
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Andrew Williams
2017-06-18 21:11:54 UTC
Permalink
Marking up an input field is not the most common use-case - and is surely
inputted by the app rather than the user normally?

I propose that ...text_get should return stripped markup and a new method
markup_text_get returns the current stuff. That would cater for both use
cases...

Thanks,
Andrew
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Al Poole
2017-06-18 21:19:33 UTC
Permalink
It's certainly a bit of a surprising feature. An additional method would
save loads of code duplication? Also documenting the behaviour?
Post by Andrew Williams
Marking up an input field is not the most common use-case - and is surely
inputted by the app rather than the user normally?
I propose that ...text_get should return stripped markup and a new method
markup_text_get returns the current stuff. That would cater for both use
cases...
Thanks,
Andrew
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Kai Huuhko
2017-06-18 21:38:30 UTC
Permalink
Post by Andrew Williams
Marking up an input field is not the most common use-case - and is surely
inputted by the app rather than the user normally?
I propose that ...text_get should return stripped markup and a new method
markup_text_get returns the current stuff. That would cater for both use
cases...
This would break existing applications relying on the old behavior. I
think we should not to break things more; if anything a method could
be added for returning utf8 text directly. But I believe the helper
functions do their job just as well.
Post by Andrew Williams
Thanks,
Andrew
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Andrew Williams
2017-06-18 22:07:09 UTC
Permalink
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live with
it forever!
Simple user input such as "user<email>" is not being returned as expected
and I really don't want to be the kind of framework that instructs
developers to use workarounds especially as we roll out a shiny new API.

Andy
Post by Kai Huuhko
Post by Andrew Williams
Marking up an input field is not the most common use-case - and is surely
inputted by the app rather than the user normally?
I propose that ...text_get should return stripped markup and a new method
markup_text_get returns the current stuff. That would cater for both use
cases...
This would break existing applications relying on the old behavior. I
think we should not to break things more; if anything a method could
be added for returning utf8 text directly. But I believe the helper
functions do their job just as well.
Post by Andrew Williams
Thanks,
Andrew
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and
text_get
completely
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Cedric BAIL
2017-06-18 22:22:04 UTC
Permalink
Hi,
Post by Andrew Williams
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live with
it forever!
Simple user input such as "user<email>" is not being returned as expected
and I really don't want to be the kind of framework that instructs
developers to use workarounds especially as we roll out a shiny new API.
I do agree with both of you, Kai and Andrew. My proposal to fix this
problem is to fix it in the new API, eo based, and make sure that we
don't repeat this problem. What do you think Daniel ?

Best,
Cedric
Post by Andrew Williams
Post by Kai Huuhko
Post by Andrew Williams
Marking up an input field is not the most common use-case - and is surely
inputted by the app rather than the user normally?
I propose that ...text_get should return stripped markup and a new method
markup_text_get returns the current stuff. That would cater for both use
cases...
This would break existing applications relying on the old behavior. I
think we should not to break things more; if anything a method could
be added for returning utf8 text directly. But I believe the helper
functions do their job just as well.
Post by Andrew Williams
Thanks,
Andrew
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and
text_get
completely
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
Cedric BAIL
Carsten Haitzler (The Rasterman)
2017-06-18 22:58:12 UTC
Permalink
Post by Cedric BAIL
Hi,
Post by Andrew Williams
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live with
it forever!
Simple user input such as "user<email>" is not being returned as expected
and I really don't want to be the kind of framework that instructs
developers to use workarounds especially as we roll out a shiny new API.
I do agree with both of you, Kai and Andrew. My proposal to fix this
problem is to fix it in the new API, eo based, and make sure that we
don't repeat this problem. What do you think Daniel ?
i disagree. we should do markup by default in most places where text is to be
displayed. not only do the back-ends already do it (textblock) it's convenient
for just adding some bold or underlined text but also allows us to trivially
extend. add another method to get/set plain utf8. markup in general is more
useful.
Post by Cedric BAIL
Best,
Cedric
Post by Andrew Williams
Post by Kai Huuhko
Post by Andrew Williams
Marking up an input field is not the most common use-case - and is surely
inputted by the app rather than the user normally?
I propose that ...text_get should return stripped markup and a new method
markup_text_get returns the current stuff. That would cater for both use
cases...
This would break existing applications relying on the old behavior. I
think we should not to break things more; if anything a method could
be added for returning utf8 text directly. But I believe the helper
functions do their job just as well.
Post by Andrew Williams
Thanks,
Andrew
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and
text_get
completely
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
Cedric BAIL
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Cedric BAIL
2017-06-18 23:20:59 UTC
Permalink
Post by Carsten Haitzler (The Rasterman)
Post by Cedric BAIL
Post by Andrew Williams
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live with
it forever!
Simple user input such as "user<email>" is not being returned as expected
and I really don't want to be the kind of framework that instructs
developers to use workarounds especially as we roll out a shiny new API.
I do agree with both of you, Kai and Andrew. My proposal to fix this
problem is to fix it in the new API, eo based, and make sure that we
don't repeat this problem. What do you think Daniel ?
i disagree. we should do markup by default in most places where text is to be
displayed. not only do the back-ends already do it (textblock) it's convenient
for just adding some bold or underlined text but also allows us to trivially
extend. add another method to get/set plain utf8. markup in general is more
useful.
It is obviously confusing to people and has created bugs in the past.
People do expect they get text when they ask for text, not markup. If
you call .text() in JS, you don't get markup, you get text. I really
believe this is making our API harder to use without mistake.
.text.get() and .markup.get() should be 2 differents exposed API. Them
being available on every object is fine, but text should not return
markup.
--
Cedric BAIL
Carsten Haitzler (The Rasterman)
2017-06-18 23:45:33 UTC
Permalink
Post by Cedric BAIL
Post by Carsten Haitzler (The Rasterman)
Post by Cedric BAIL
Post by Andrew Williams
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live
with it forever!
Simple user input such as "user<email>" is not being returned as expected
and I really don't want to be the kind of framework that instructs
developers to use workarounds especially as we roll out a shiny new API.
I do agree with both of you, Kai and Andrew. My proposal to fix this
problem is to fix it in the new API, eo based, and make sure that we
don't repeat this problem. What do you think Daniel ?
i disagree. we should do markup by default in most places where text is to
be displayed. not only do the back-ends already do it (textblock) it's
convenient for just adding some bold or underlined text but also allows us
to trivially extend. add another method to get/set plain utf8. markup in
general is more useful.
It is obviously confusing to people and has created bugs in the past.
People do expect they get text when they ask for text, not markup. If
you call .text() in JS, you don't get markup, you get text. I really
believe this is making our API harder to use without mistake.
.text.get() and .markup.get() should be 2 differents exposed API. Them
being available on every object is fine, but text should not return
markup.
yet in js's home turf (web) all text i/o for a document (the tree of widgets so
to speak) is markup.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Cedric BAIL
2017-06-18 23:53:34 UTC
Permalink
Post by Carsten Haitzler (The Rasterman)
Post by Cedric BAIL
Post by Carsten Haitzler (The Rasterman)
Post by Cedric BAIL
Post by Andrew Williams
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live
with it forever!
Simple user input such as "user<email>" is not being returned as expected
and I really don't want to be the kind of framework that instructs
developers to use workarounds especially as we roll out a shiny new API.
I do agree with both of you, Kai and Andrew. My proposal to fix this
problem is to fix it in the new API, eo based, and make sure that we
don't repeat this problem. What do you think Daniel ?
i disagree. we should do markup by default in most places where text is to
be displayed. not only do the back-ends already do it (textblock) it's
convenient for just adding some bold or underlined text but also allows us
to trivially extend. add another method to get/set plain utf8. markup in
general is more useful.
It is obviously confusing to people and has created bugs in the past.
People do expect they get text when they ask for text, not markup. If
you call .text() in JS, you don't get markup, you get text. I really
believe this is making our API harder to use without mistake.
.text.get() and .markup.get() should be 2 differents exposed API. Them
being available on every object is fine, but text should not return
markup.
yet in js's home turf (web) all text i/o for a document (the tree of widgets so
to speak) is markup.
Expectation in JS world seems to point toward what I just said above.
https://www.w3schools.com/jquery/html_text.asp .
--
Cedric BAIL
Carsten Haitzler (The Rasterman)
2017-06-19 01:32:44 UTC
Permalink
Post by Cedric BAIL
Post by Carsten Haitzler (The Rasterman)
Post by Cedric BAIL
Post by Carsten Haitzler (The Rasterman)
Post by Cedric BAIL
Post by Andrew Williams
Can we be a little careful with that response? The behaviour you think
people are relying on is undocumented and confusing. Are people truly
relying on the "HTML encoding" behaviour of user input?
I think that something so unintuitive is better fixed rather than live
with it forever!
Simple user input such as "user<email>" is not being returned as
expected and I really don't want to be the kind of framework that
instructs developers to use workarounds especially as we roll out a
shiny new API.
I do agree with both of you, Kai and Andrew. My proposal to fix this
problem is to fix it in the new API, eo based, and make sure that we
don't repeat this problem. What do you think Daniel ?
i disagree. we should do markup by default in most places where text is
to be displayed. not only do the back-ends already do it (textblock) it's
convenient for just adding some bold or underlined text but also allows
us to trivially extend. add another method to get/set plain utf8. markup
in general is more useful.
It is obviously confusing to people and has created bugs in the past.
People do expect they get text when they ask for text, not markup. If
you call .text() in JS, you don't get markup, you get text. I really
believe this is making our API harder to use without mistake.
.text.get() and .markup.get() should be 2 differents exposed API. Them
being available on every object is fine, but text should not return
markup.
yet in js's home turf (web) all text i/o for a document (the tree of
widgets so to speak) is markup.
Expectation in JS world seems to point toward what I just said above.
https://www.w3schools.com/jquery/html_text.asp .
but document.write() takes html (and defines widgets and content and everyone
does widgets as divs with content these days basically).

but our docs are incredibly clear the text is markup. in this case the docs
were not read and an assumption was made. that assumption was wrong.

i suspect if we stop doing markup by default we'll have even more complaints.
so far i have never heard a complaint about our text being markup for
entries/labels ... i HAVE heard complaints that buttons, checkboxes don't
support markup (text vs textblock) and people expected/wanted markup.

i don't see enough evidence to change the default here. i have seen the reverse
(expecting and wanting markup but not getting it).

we do have inconsistency though and that needs to be fixed (support markup
everywhere).
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Rbt. Y-Lee
2017-06-18 22:08:17 UTC
Permalink
It is python but this caused us (Bodhi linux) some headache with Jeffs
esudo program: https://github.com/JeffHoogland/esudo/issues/2
Post by Daniel Hirt
Hi Andrew,
Markup uses tags like "<color=#fff> hello </color>".
instead
of "<". Otherwise, if you feed "<" back to the entry widget, it will be
misinterpreted as a tag element.
As a side note, you can use "elm_entry_markup_to_utf8" helper to
strip-down the formatting and "un-escape" the characters so all becomes
a valid utf8 text.
Hope that clears things up a bit.
--
Danny (herdsman) Hirt
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
Thanks,
Andy
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Carsten Haitzler (The Rasterman)
2017-06-18 22:55:01 UTC
Permalink
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed for
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
1. can't change because this would break many apps that rely on it.
2. it's documented - labels and entries use textblock parts in edje. these use
markup by default to be able to do styling.
3. the very first entry test shows use of markup - consider the elm tests
documentation. they are intended as such. select some text in it hit "sel" that
displays the text of the selection... boom. markup.
4. the fact that there is a markup to utf8 function does imply markup can be
involved.
5. if you changed you'd break 11 of the current entry tests and have to change
code (a very sure sign you broke a feature).
6. labels work like entries and do markup too - all the multi-line capable
things in elm do this... it's a pattern.

so ... not going to change.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Carsten Haitzler (The Rasterman)
2017-06-18 23:05:31 UTC
Permalink
On Mon, 19 Jun 2017 07:55:01 +0900 Carsten Haitzler (The Rasterman)
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed for
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
1. can't change because this would break many apps that rely on it.
2. it's documented - labels and entries use textblock parts in edje. these use
markup by default to be able to do styling.
3. the very first entry test shows use of markup - consider the elm tests
documentation. they are intended as such. select some text in it hit "sel"
that displays the text of the selection... boom. markup.
4. the fact that there is a markup to utf8 function does imply markup can be
involved.
5. if you changed you'd break 11 of the current entry tests and have to change
code (a very sure sign you broke a feature).
6. labels work like entries and do markup too - all the multi-line capable
things in elm do this... it's a pattern.
7. VERY clearly documented:

https://docs.enlightenment.org/efl/current/group__Elm__Entry.html

scroll down... "formatted text".
Post by Carsten Haitzler (The Rasterman)
so ... not going to change.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-06-19 09:01:50 UTC
Permalink
Hi,

Looking at the tests you point me at - selection (and the past) is a plain
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will not get
you there - there is no built in interpretation of formatting - just
rendered understands it.

Overall the implementation feels wrong - supporting markup is great but
returning it inline in text_get feels like we are imposing internal choices
on other devs.

I note that the code considers format but only when interacting with files
- so I can have plain text files but not plain text input.

Lastly the documentation clearly discussed markup capability but it *never*
discusses encoding and there is no explicit mention that your text will be
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.

I don't quite understand why we would build formatting in as mandatory,
functionality is great but it should be possible to turn it off.

I agree that people complain when markup is not supported in a widget but
that is the expectation we have set - consistency is very important indeed
and I think we don't have it in this regard.

Additionally I think the markup_to_utf8 methods are peculiarly named - they
do no character encoding so the usage of utf8 is probably incorrect...

Andrew
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
1. can't change because this would break many apps that rely on it.
2. it's documented - labels and entries use textblock parts in edje. these use
markup by default to be able to do styling.
3. the very first entry test shows use of markup - consider the elm tests
documentation. they are intended as such. select some text in it hit "sel" that
displays the text of the selection... boom. markup.
4. the fact that there is a markup to utf8 function does imply markup can be
involved.
5. if you changed you'd break 11 of the current entry tests and have to change
code (a very sure sign you broke a feature).
6. labels work like entries and do markup too - all the multi-line capable
things in elm do this... it's a pattern.
so ... not going to change.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
Mike Blumenkrantz
2017-06-19 10:40:46 UTC
Permalink
I recall that this was one of the more confusing parts of EFL when I
started out, but at this point the API has been shipped in enough releases
that we definitely cannot change it.

Overall, I think it would be nice to have text conversion facilities at a
lower level such as eina (not just iconv-based) so that the text API can
have a stronger foundation. Additionally it would probably be good if, in
the course of the interfaces/2.0 review process, we can look towards
standardizing text APIs to deal with encoding and markup in a clearer and
more intuitive way like Cedric suggested?

For now, it seems like the only thing we can do with the legacy API is to
improve the documentation to make it more clear what the user's
expectations should be regarding formatting.
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a plain
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will not get
you there - there is no built in interpretation of formatting - just
rendered understands it.
Overall the implementation feels wrong - supporting markup is great but
returning it inline in text_get feels like we are imposing internal choices
on other devs.
I note that the code considers format but only when interacting with files
- so I can have plain text files but not plain text input.
Lastly the documentation clearly discussed markup capability but it *never*
discusses encoding and there is no explicit mention that your text will be
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
I don't quite understand why we would build formatting in as mandatory,
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a widget but
that is the expectation we have set - consistency is very important indeed
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named - they
do no character encoding so the usage of utf8 is probably incorrect...
Andrew
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
1. can't change because this would break many apps that rely on it.
2. it's documented - labels and entries use textblock parts in edje.
these
Post by Carsten Haitzler (The Rasterman)
use
markup by default to be able to do styling.
3. the very first entry test shows use of markup - consider the elm tests
documentation. they are intended as such. select some text in it hit
"sel"
Post by Carsten Haitzler (The Rasterman)
that
displays the text of the selection... boom. markup.
4. the fact that there is a markup to utf8 function does imply markup can be
involved.
5. if you changed you'd break 11 of the current entry tests and have to change
code (a very sure sign you broke a feature).
6. labels work like entries and do markup too - all the multi-line
capable
Post by Carsten Haitzler (The Rasterman)
things in elm do this... it's a pattern.
so ... not going to change.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Carsten Haitzler (The Rasterman)
2017-06-19 10:41:11 UTC
Permalink
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a plain
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will not get
you there - there is no built in interpretation of formatting - just
rendered understands it.
select text that has formatting like the bold:

SELECTION:
markup <b>like this</> for stylin
SELECTION PLAIN UTF8:
markup like this for stylin

after you hit "sel" button below. first entry test (Entry). selection contains
markup. the plain utf8 conversion does not. the converter (to/from markup)
knows some basic tags like <br> for example to mean newline... and some others.
the rest are stripped entirely as they cannot be mapped to/from plain utf8 text.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great but
returning it inline in text_get feels like we are imposing internal choices
on other devs.
I note that the code considers format but only when interacting with files
- so I can have plain text files but not plain text input.
you can - wit the conversion helpers.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it *never*
discusses encoding and there is no explicit mention that your text will be
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
it's not transformed. it is literally kept as markup tags (not as a whole
string through but broken up). test_Set always sets markupe. get gets markup.
it's symmetrical.

it very clearly states the tags supported and that it uses tags and markup for
the text...
Post by Andrew Williams
I don't quite understand why we would build formatting in as mandatory,
functionality is great but it should be possible to turn it off.
you have the helpers to do just that - convert plain text to/from markup. i
didn't see the point of adding more functions to set/get text when the
converters will do just fine.
Post by Andrew Williams
I agree that people complain when markup is not supported in a widget but
that is the expectation we have set - consistency is very important indeed
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named - they
do no character encoding so the usage of utf8 is probably incorrect...
they ASSUME its utf8 (or compatible - eg ascii) text in and out (plain or
markup). all our strings are assumed to be utf8 at the api level as an
encoding. always. eina has conversion api's for anything else to be able to
convert to/from utf8 :)
Post by Andrew Williams
Andrew
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi team,
Netstar pointed out something to me today that I had completely missed
for
Post by Andrew Williams
ages - elm_entry assumes you are typing markup. Type "a>b" and text_get
crazy default behaviour.
Is there any reason we can't turn this off by default but provide the
markup filter in a way where it can be switched on as needed?
1. can't change because this would break many apps that rely on it.
2. it's documented - labels and entries use textblock parts in edje. these use
markup by default to be able to do styling.
3. the very first entry test shows use of markup - consider the elm tests
documentation. they are intended as such. select some text in it hit "sel" that
displays the text of the selection... boom. markup.
4. the fact that there is a markup to utf8 function does imply markup can be
involved.
5. if you changed you'd break 11 of the current entry tests and have to change
code (a very sure sign you broke a feature).
6. labels work like entries and do markup too - all the multi-line capable
things in elm do this... it's a pattern.
so ... not going to change.
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Daniel Hirt
2017-06-19 11:36:08 UTC
Permalink
Hi,
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a plain
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will not get
you there - there is no built in interpretation of formatting - just
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The test prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry clients,
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great but
returning it inline in text_get feels like we are imposing internal choices
on other devs.
I note that the code considers format but only when interacting with files
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the format
you
want to load (plaintext or markup). But, after the file is loaded, it's
discarded.

It's important to point out that because there's an actual representation
(markup), it's costly to store both plaintext and markup content in the
object.
Asking you to convert using "markup_to_utf8" is understandable, as it what
we would actually do internally if we were to add API to get the text in
plaintext. It's only one function call away, and it's easier than just add
more
API to the widget. No need for a new function if there's a way to do this
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it *never*
discusses encoding and there is no explicit mention that your text will be
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to enter a
markup-compatible text. Otherwise you will have the mentioned special
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as mandatory,
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a widget but
that is the expectation we have set - consistency is very important indeed
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named - they
do no character encoding so the usage of utf8 is probably incorrect...
They're correct. UTF-8 is the standard plaintext encoding. We support UTF-8,
and provide converters for your convenience. You probably won't need those
most
of the time.
Your plaintext is always "encoded", but you probably won't notice that
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a part
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be plaintext.
There's no
"markup" logic in it. Instead, you format your text by setting ranges and
calling
functions to apply formatting. Again, markup does not exist in this object,
and
can be re-added as a module in later stages.
You can check its current state in "efl ui text" test in elementary_test.
Feedback
will be very much appreciated.

Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
Davide Andreoli
2017-06-23 19:55:14 UTC
Permalink
Post by Daniel Hirt
Hi,
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a plain
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will not get
you there - there is no built in interpretation of formatting - just
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The test prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry clients,
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great but
returning it inline in text_get feels like we are imposing internal choices
on other devs.
I note that the code considers format but only when interacting with files
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the format
you
want to load (plaintext or markup). But, after the file is loaded, it's
discarded.
It's important to point out that because there's an actual representation
(markup), it's costly to store both plaintext and markup content in the
object.
Asking you to convert using "markup_to_utf8" is understandable, as it what
we would actually do internally if we were to add API to get the text in
plaintext. It's only one function call away, and it's easier than just add
more
API to the widget. No need for a new function if there's a way to do this
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it *never*
discusses encoding and there is no explicit mention that your text will be
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to enter a
markup-compatible text. Otherwise you will have the mentioned special
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as mandatory,
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a widget but
that is the expectation we have set - consistency is very important indeed
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named - they
do no character encoding so the usage of utf8 is probably incorrect...
They're correct. UTF-8 is the standard plaintext encoding. We support UTF-8,
and provide converters for your convenience. You probably won't need those
most
of the time.
Your plaintext is always "encoded", but you probably won't notice that
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a part
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be plaintext.
There's no
"markup" logic in it. Instead, you format your text by setting ranges and
calling
functions to apply formatting. Again, markup does not exist in this object,
What? no more markup support? This is really, really sad to hear :(

I'm using markup everywhere in my media center and I'm really happy with
it's usage.

Please think carefully at my use case:

Loading Image...

Look at the the textblock in the lower-right corner,
the code to set the text is something like this:

text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)

..thats it, and I have those beautiful (theme-able!) formatted text.

Now try to think at the code needed to do the same with the "new" API !!

Another insurmountable problem of the API approach: the text in my example
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and pass
them back to the core. This means that the plugins do not have access to the
textblock API.

Some more examples:
https://github.com/DaveMDS/epymc/wiki/Screenshots

I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be plain
text set/get,
BUT: we really need to implement something like: text_markup_set(...)

To be more clear: loosing the markup ability (in textblock, buttons, and
any other widget) is a shame, we are loosing IMO the most powerful and
useful
feature of textblock in efl.
Post by Daniel Hirt
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able to
port my
applications to the new API, until a "later stage" will eventually occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in elementary_test.
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Carsten Haitzler (The Rasterman)
2017-06-24 04:22:39 UTC
Permalink
Post by Daniel Hirt
Post by Daniel Hirt
Hi,
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a
plain
Post by Daniel Hirt
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will not
get
Post by Daniel Hirt
Post by Andrew Williams
you there - there is no built in interpretation of formatting - just
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The test
prints
Post by Daniel Hirt
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry clients,
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great but
returning it inline in text_get feels like we are imposing internal
choices
Post by Daniel Hirt
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting with
files
Post by Daniel Hirt
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the format
you
want to load (plaintext or markup). But, after the file is loaded, it's
discarded.
It's important to point out that because there's an actual representation
(markup), it's costly to store both plaintext and markup content in the
object.
Asking you to convert using "markup_to_utf8" is understandable, as it what
we would actually do internally if we were to add API to get the text in
plaintext. It's only one function call away, and it's easier than just add
more
API to the widget. No need for a new function if there's a way to do this
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it
*never*
Post by Daniel Hirt
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text will
be
Post by Daniel Hirt
Post by Andrew Williams
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to enter a
markup-compatible text. Otherwise you will have the mentioned special
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as mandatory,
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a widget but
that is the expectation we have set - consistency is very important
indeed
Post by Daniel Hirt
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named -
they
Post by Daniel Hirt
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably incorrect...
They're correct. UTF-8 is the standard plaintext encoding. We support
UTF-8,
Post by Daniel Hirt
and provide converters for your convenience. You probably won't need those
most
of the time.
Your plaintext is always "encoded", but you probably won't notice that
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a part
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be plaintext.
There's no
"markup" logic in it. Instead, you format your text by setting ranges and
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup (or
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.

maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy with
it's usage.
too bad. plain text for you unless you call lots of api calls to insert it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new" API !!
Another insurmountable problem of the API approach: the text in my example
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and pass
them back to the core. This means that the plugins do not have access to the
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be plain
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons, and
any other widget) is a shame, we are loosing IMO the most powerful and
useful
feature of textblock in efl.
Post by Daniel Hirt
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able to
port my
applications to the new API, until a "later stage" will eventually occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in elementary_test.
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-06-29 11:13:51 UTC
Permalink
Hi,

Just to wrap this thread up following EDD:

* no-one is proposing that we remove the ability to mark up text through
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or have
adapted to it

* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set or
similar API leaving text_set/get to be plain text only

It was beileved that this would satisfy all requirements whilst removing
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs

Thanks everyone for the discussion :)
Andy
Post by Daniel Hirt
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting - just
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The test
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing internal
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting with
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded, it's
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content in the
object.
Asking you to convert using "markup_to_utf8" is understandable, as it
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the text
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than just
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to do
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned special
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a widget
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very important
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named -
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably incorrect...
They're correct. UTF-8 is the standard plaintext encoding. We support
UTF-8,
and provide converters for your convenience. You probably won't need
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice that
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be plaintext.
There's no
"markup" logic in it. Instead, you format your text by setting ranges
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup (or
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy with
it's usage.
too bad. plain text for you unless you call lots of api calls to insert it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new" API !!
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and pass
them back to the core. This means that the plugins do not have access to
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be
plain
Post by Daniel Hirt
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons, and
any other widget) is a shame, we are loosing IMO the most powerful and
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able to
port my
applications to the new API, until a "later stage" will eventually occur.
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Carsten Haitzler (The Rasterman)
2017-06-29 23:37:34 UTC
Permalink
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text through
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or have
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set or
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst removing
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
Post by Daniel Hirt
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting - just
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The test
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing internal
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting with
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded, it's
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content in the
object.
Asking you to convert using "markup_to_utf8" is understandable, as it
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the text
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than just
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to do
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be symmetrically
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned special
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a widget
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very important
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named -
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably incorrect...
They're correct. UTF-8 is the standard plaintext encoding. We support
UTF-8,
and provide converters for your convenience. You probably won't need
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice that
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be plaintext.
There's no
"markup" logic in it. Instead, you format your text by setting ranges
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup (or
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy with
it's usage.
too bad. plain text for you unless you call lots of api calls to insert it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new" API !!
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and pass
them back to the core. This means that the plugins do not have access to
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be
plain
Post by Daniel Hirt
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons, and
any other widget) is a shame, we are loosing IMO the most powerful and
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able to
port my
applications to the new API, until a "later stage" will eventually occur.
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Davide Andreoli
2017-06-30 14:22:03 UTC
Permalink
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text through
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or have
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst removing
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the widget to
enable/disable markup insert of text.
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past)
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting -
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded,
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is understandable, as
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert it
Post by Andrew Williams
tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new"
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be
plain
Post by Daniel Hirt
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons,
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most powerful
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will eventually
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Carsten Haitzler (The Rasterman)
2017-07-01 02:28:02 UTC
Permalink
Post by Davide Andreoli
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text through
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or have
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst removing
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the widget to
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or manipulate text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of

text_set(obj, "Blah");

you have

prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);

we could make it a push and pop... just to cut this down so it goes from 4 ro 3
lines... but still./.. not great (and the implementation actually needs to keep
a real stack then not a counter).

not knowing how your text is interpreted at all is very bad. you need to know.
if there is only one way then there is no problem. if we were going to have
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like crazy... the
alternative is we must pass format every time WITH the text

text_set(obj, PLAIN, "Blah");

everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...

#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"

etc. and we literally require you decode the header... (many values of the
first 32 ascii values other than \000 could be used for this as they can never
be visibly displayed or mapped to a glyph and make zero sense to use so we can
use them as control chars like \n, \t and \r (\012, \011 \015) are format
control chars and not directly mappable to a visible glyph on their own). so
now you do:

text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");

etc. but people will probably dislike this too... no matter how you slice or
dice this, people will hate something. so make take is, you either do plain
text and give up on markup entirely other than having to use a whole bunch of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means markup
versions of every query, set, insert, append etc.) and the implementation is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte value
offset? enjoy the figuring out of this as its likely going to be a visible
glyph/char pos) ...

or you just bite the bullet and say "it's all markup. DEAL WITH IT" (and
provide some converters). only people i have heard complain are efl people and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and expects
markup...

anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past)
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting -
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded,
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is understandable, as
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert it
Post by Andrew Williams
tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new"
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be
plain
Post by Daniel Hirt
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons,
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most powerful
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will eventually
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-07-01 06:37:03 UTC
Permalink
Hi,

This is not the first time this has come up (just search phab for "HTML" or
"encoding") and given that we agreed we don't have many app developers it
seems dismissive to state it's not a problem as we've had no complains from
app developers...

Markup vs text does not introduce cursor problems that otherwise are simple
- just supporting UTF8 means you can't make assumptions about cursor vs
text offset. Additionally that should only be a concern for entry which is
a very small subset of the text engine responsibilities.

In terms of complexity or api confusion I return to the path of least
surprise. Text apis should not unexpectedly encode content such that input
!= output. Splitting the data from the metadata or making the setting of
marked up text explicit avoids this confusion. For inspiration I point you
to the iOS APIs where they have "attributedString" (get/set etc) which is
different to the plain text methods. Additionally they avoid the
insert/replace issues by pushing those features into the string handling
rather than the widget which makes a lot of sense now I think about it.

Thanks,
Andy
Post by Carsten Haitzler (The Rasterman)
Post by Davide Andreoli
On Thu, 29 Jun 2017 11:13:51 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Davide Andreoli
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Davide Andreoli
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Davide Andreoli
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Davide Andreoli
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Davide Andreoli
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the new
Eo
Post by Davide Andreoli
Post by Andrew Williams
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the widget to
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or manipulate text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of
text_set(obj, "Blah");
you have
prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);
we could make it a push and pop... just to cut this down so it goes from 4 ro 3
lines... but still./.. not great (and the implementation actually needs to keep
a real stack then not a counter).
not knowing how your text is interpreted at all is very bad. you need to know.
if there is only one way then there is no problem. if we were going to have
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like crazy... the
alternative is we must pass format every time WITH the text
text_set(obj, PLAIN, "Blah");
everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...
#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"
etc. and we literally require you decode the header... (many values of the
first 32 ascii values other than \000 could be used for this as they can never
be visibly displayed or mapped to a glyph and make zero sense to use so we can
use them as control chars like \n, \t and \r (\012, \011 \015) are format
control chars and not directly mappable to a visible glyph on their own). so
text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");
etc. but people will probably dislike this too... no matter how you slice or
dice this, people will hate something. so make take is, you either do plain
text and give up on markup entirely other than having to use a whole bunch of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means markup
versions of every query, set, insert, append etc.) and the implementation is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte value
offset? enjoy the figuring out of this as its likely going to be a visible
glyph/char pos) ...
or you just bite the bullet and say "it's all markup. DEAL WITH IT" (and
provide some converters). only people i have heard complain are efl people and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and expects
markup...
anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Davide Andreoli
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Davide Andreoli
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting
-
Post by Davide Andreoli
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Davide Andreoli
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Davide Andreoli
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify
the
Post by Davide Andreoli
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Davide Andreoli
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Davide Andreoli
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Davide Andreoli
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Davide Andreoli
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Davide Andreoli
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way
to
Post by Davide Andreoli
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Davide Andreoli
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Davide Andreoli
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Davide Andreoli
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in a
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Davide Andreoli
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget is
Post by Davide Andreoli
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to hear
:(
Post by Davide Andreoli
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Davide Andreoli
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions on
Post by Davide Andreoli
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert it
Post by Andrew Williams
tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the "new"
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Davide Andreoli
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the net
and
Post by Davide Andreoli
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should be
Post by Davide Andreoli
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Davide Andreoli
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Davide Andreoli
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Davide Andreoli
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Davide Andreoli
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Davide Andreoli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Carsten Haitzler (The Rasterman)
2017-07-02 14:53:07 UTC
Permalink
Post by Andrew Williams
Hi,
This is not the first time this has come up (just search phab for "HTML" or
"encoding") and given that we agreed we don't have many app developers it
seems dismissive to state it's not a problem as we've had no complains from
app developers...
first time it has come up on mailing lists or irc (as a
question/disatisfaction).

there are are probably several times more developers using it in tizen... and i
have never heard a complaint out of them about it.\

i have seen many spreadsheets with complaints on efl from tizen base devs.
never was markup one of them.

it's not dismissive. it's me saying that you lack a perspective i do. you think
this move would be an improvement yet you have never seen what i have ... and
i have a deep worry that what goes from no complaints suddenly becomes "what i
used to be able to use markup.. now i can't? how do i make my text bold now?"
"oh you have to sue the markup versions of all the text interfaces" "what? i
didn't see that. why did you not make it default like before?". ... i think YOU
are begin dismissive of this scenario. we go from no complaints there to lots
of them.
Post by Andrew Williams
Markup vs text does not introduce cursor problems that otherwise are simple
- just supporting UTF8 means you can't make assumptions about cursor vs
text offset. Additionally that should only be a concern for entry which is
a very small subset of the text engine responsibilities.
you can't make it WITH utf-8/unicode. read up the unicode standards and check
with composite characters (ô == o + ^ unicode chars beside eachother for
example... there's far more complex ones for various languages - i'm not
talking input here... text strings). it's impossible to make an assumption that
1 utf8 char or even 1 unicdoe codepoint == 1 visible on screen character. it's
impossible. if you go forward with this assumption you'll be bitterly
disappointed. it's an issue that has to be handled anyway.
Post by Andrew Williams
In terms of complexity or api confusion I return to the path of least
surprise. Text apis should not unexpectedly encode content such that input
!= output. Splitting the data from the metadata or making the setting of
see above.
Post by Andrew Williams
marked up text explicit avoids this confusion. For inspiration I point you
it does not.
Post by Andrew Williams
to the iOS APIs where they have "attributedString" (get/set etc) which is
different to the plain text methods. Additionally they avoid the
insert/replace issues by pushing those features into the string handling
rather than the widget which makes a lot of sense now I think about it.
Thanks,
Andy
Post by Carsten Haitzler (The Rasterman)
Post by Davide Andreoli
On Thu, 29 Jun 2017 11:13:51 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Davide Andreoli
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Davide Andreoli
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Davide Andreoli
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Davide Andreoli
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Davide Andreoli
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the new
Eo
Post by Davide Andreoli
Post by Andrew Williams
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the widget to
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or manipulate text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of
text_set(obj, "Blah");
you have
prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);
we could make it a push and pop... just to cut this down so it goes from 4 ro 3
lines... but still./.. not great (and the implementation actually needs to keep
a real stack then not a counter).
not knowing how your text is interpreted at all is very bad. you need to know.
if there is only one way then there is no problem. if we were going to have
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like crazy... the
alternative is we must pass format every time WITH the text
text_set(obj, PLAIN, "Blah");
everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...
#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"
etc. and we literally require you decode the header... (many values of the
first 32 ascii values other than \000 could be used for this as they can never
be visibly displayed or mapped to a glyph and make zero sense to use so we can
use them as control chars like \n, \t and \r (\012, \011 \015) are format
control chars and not directly mappable to a visible glyph on their own). so
text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");
etc. but people will probably dislike this too... no matter how you slice or
dice this, people will hate something. so make take is, you either do plain
text and give up on markup entirely other than having to use a whole bunch of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means markup
versions of every query, set, insert, append etc.) and the implementation is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte value
offset? enjoy the figuring out of this as its likely going to be a visible
glyph/char pos) ...
or you just bite the bullet and say "it's all markup. DEAL WITH IT" (and
provide some converters). only people i have heard complain are efl people and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and expects
markup...
anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Davide Andreoli
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Davide Andreoli
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting
-
Post by Davide Andreoli
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Davide Andreoli
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Davide Andreoli
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify
the
Post by Davide Andreoli
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Davide Andreoli
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Davide Andreoli
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Davide Andreoli
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Davide Andreoli
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Davide Andreoli
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way
to
Post by Davide Andreoli
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Davide Andreoli
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Davide Andreoli
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Davide Andreoli
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in a
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Davide Andreoli
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget is
Post by Davide Andreoli
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to hear
:(
Post by Davide Andreoli
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Davide Andreoli
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions on
Post by Davide Andreoli
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert it
Post by Andrew Williams
tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the "new"
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Davide Andreoli
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the net
and
Post by Davide Andreoli
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should be
Post by Davide Andreoli
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Davide Andreoli
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Davide Andreoli
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Davide Andreoli
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Davide Andreoli
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Davide Andreoli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-07-02 21:42:01 UTC
Permalink
As I'm on the move I have no decent email app so I can't interleave with
your replies so it's all up-top:

First time: Maybe not on ML but this has been discussed before on IRC, but
that does not exactly make angood source of documentation for issues or api
confusion.

UTF8: we are in agreement here, I think you misread my comment - I was
saying this complication is introduced by unicode so the markup does not
add that complexity.

Tizen: maybe this is the crux of the issue. I do not see Tizen developers
coming to the efl community to feed back on any of this so we don't have
good visibility. Are you therefore the champion for everything going on
over there that we need to take on? It's kind of tricky to be spending
lots of time building apps on our apis and yet find that invisible users of
the api carry substantially more influence.

The thing I get most from your email is that, as we decided to do markup by
default in current apis, it is unwise to ever change it. If we will always
be constrained by historical apis then why not just make an edict that the
eo api must be a direct mirror of the legacy for compatibility reasons?...

Andy
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
This is not the first time this has come up (just search phab for "HTML"
or
Post by Andrew Williams
"encoding") and given that we agreed we don't have many app developers it
seems dismissive to state it's not a problem as we've had no complains
from
Post by Andrew Williams
app developers...
first time it has come up on mailing lists or irc (as a
question/disatisfaction).
there are are probably several times more developers using it in tizen... and i
have never heard a complaint out of them about it.\
i have seen many spreadsheets with complaints on efl from tizen base devs.
never was markup one of them.
it's not dismissive. it's me saying that you lack a perspective i do. you think
this move would be an improvement yet you have never seen what i have ... and
i have a deep worry that what goes from no complaints suddenly becomes "what i
used to be able to use markup.. now i can't? how do i make my text bold now?"
"oh you have to sue the markup versions of all the text interfaces" "what? i
didn't see that. why did you not make it default like before?". ... i think YOU
are begin dismissive of this scenario. we go from no complaints there to lots
of them.
Post by Andrew Williams
Markup vs text does not introduce cursor problems that otherwise are
simple
Post by Andrew Williams
- just supporting UTF8 means you can't make assumptions about cursor vs
text offset. Additionally that should only be a concern for entry which
is
Post by Andrew Williams
a very small subset of the text engine responsibilities.
you can't make it WITH utf-8/unicode. read up the unicode standards and check
with composite characters (ô == o + ^ unicode chars beside eachother for
example... there's far more complex ones for various languages - i'm not
talking input here... text strings). it's impossible to make an assumption that
1 utf8 char or even 1 unicdoe codepoint == 1 visible on screen character. it's
impossible. if you go forward with this assumption you'll be bitterly
disappointed. it's an issue that has to be handled anyway.
Post by Andrew Williams
In terms of complexity or api confusion I return to the path of least
surprise. Text apis should not unexpectedly encode content such that
input
Post by Andrew Williams
!= output. Splitting the data from the metadata or making the setting of
see above.
Post by Andrew Williams
marked up text explicit avoids this confusion. For inspiration I point
you
it does not.
Post by Andrew Williams
to the iOS APIs where they have "attributedString" (get/set etc) which is
different to the plain text methods. Additionally they avoid the
insert/replace issues by pushing those features into the string handling
rather than the widget which makes a lot of sense now I think about it.
Thanks,
Andy
On Fri, 30 Jun 2017 16:22:03 +0200 Davide Andreoli <
Post by Davide Andreoli
On Thu, 29 Jun 2017 11:13:51 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Davide Andreoli
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it
or
Post by Andrew Williams
have
Post by Davide Andreoli
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Davide Andreoli
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Davide Andreoli
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Davide Andreoli
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new
Post by Andrew Williams
Eo
Post by Davide Andreoli
Post by Andrew Williams
based text APIs
you have to have a markup version of everything. set, append,
prepend,
Post by Andrew Williams
Post by Davide Andreoli
insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the
widget to
Post by Andrew Williams
Post by Davide Andreoli
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or
manipulate
Post by Andrew Williams
text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of
text_set(obj, "Blah");
you have
prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);
we could make it a push and pop... just to cut this down so it goes
from 4
Post by Andrew Williams
ro 3
lines... but still./.. not great (and the implementation actually
needs to
Post by Andrew Williams
keep
a real stack then not a counter).
not knowing how your text is interpreted at all is very bad. you need
to
Post by Andrew Williams
know.
if there is only one way then there is no problem. if we were going to
have
Post by Andrew Williams
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like
crazy...
Post by Andrew Williams
the
alternative is we must pass format every time WITH the text
text_set(obj, PLAIN, "Blah");
everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...
#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"
etc. and we literally require you decode the header... (many values of
the
Post by Andrew Williams
first 32 ascii values other than \000 could be used for this as they
can
Post by Andrew Williams
never
be visibly displayed or mapped to a glyph and make zero sense to use
so we
Post by Andrew Williams
can
use them as control chars like \n, \t and \r (\012, \011 \015) are
format
Post by Andrew Williams
control chars and not directly mappable to a visible glyph on their
own).
Post by Andrew Williams
so
text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");
etc. but people will probably dislike this too... no matter how you
slice
Post by Andrew Williams
or
dice this, people will hate something. so make take is, you either do
plain
Post by Andrew Williams
text and give up on markup entirely other than having to use a whole
bunch
Post by Andrew Williams
of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means
markup
Post by Andrew Williams
versions of every query, set, insert, append etc.) and the
implementation
Post by Andrew Williams
is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte
value
Post by Andrew Williams
offset? enjoy the figuring out of this as its likely going to be a
visible
Post by Andrew Williams
glyph/char pos) ...
or you just bite the bullet and say "it's all markup. DEAL WITH IT"
(and
Post by Andrew Williams
provide some converters). only people i have heard complain are efl
people
Post by Andrew Williams
and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and
expects
Post by Andrew Williams
markup...
anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Davide Andreoli
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Davide Andreoli
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Davide Andreoli
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting
Post by Andrew Williams
-
Post by Davide Andreoli
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup
format.
Post by Andrew Williams
The
Post by Davide Andreoli
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Davide Andreoli
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting
markup is
Post by Andrew Williams
Post by Davide Andreoli
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify
Post by Andrew Williams
the
Post by Davide Andreoli
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Davide Andreoli
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Davide Andreoli
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Davide Andreoli
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to
get
Post by Andrew Williams
the
Post by Davide Andreoli
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's
easier
Post by Andrew Williams
than
Post by Davide Andreoli
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way
Post by Andrew Williams
to
Post by Davide Andreoli
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup
capability
Post by Andrew Williams
but
Post by Davide Andreoli
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that
your
Post by Andrew Williams
text
Post by Davide Andreoli
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Davide Andreoli
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the
mentioned
Post by Andrew Williams
Post by Davide Andreoli
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in
as
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn
it
Post by Andrew Williams
off.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported
in a
Post by Andrew Williams
Post by Davide Andreoli
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Davide Andreoli
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding.
We
Post by Andrew Williams
Post by Davide Andreoli
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Davide Andreoli
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Davide Andreoli
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per
character).
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget is
Post by Davide Andreoli
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by
setting
Post by Andrew Williams
Post by Davide Andreoli
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not
exist in
Post by Andrew Williams
this
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear
Post by Andrew Williams
:(
Post by Davide Andreoli
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Davide Andreoli
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions on
Post by Davide Andreoli
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls
to
Post by Andrew Williams
Post by Davide Andreoli
insert it
Post by Andrew Williams
tag
by tag. have fun.
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!)
formatted
Post by Andrew Williams
text.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Davide Andreoli
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text
in
Post by Andrew Williams
my
Post by Davide Andreoli
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net
Post by Andrew Williams
and
Post by Davide Andreoli
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not
have
Post by Andrew Williams
Post by Davide Andreoli
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in
this
Post by Andrew Williams
thread
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should be
Post by Davide Andreoli
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not
be
Post by Andrew Williams
able
Post by Davide Andreoli
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Davide Andreoli
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org!
http://sdm.link/slashdot
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Davide Andreoli
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Davide Andreoli
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Davide Andreoli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
Carsten Haitzler (The Rasterman)
2017-07-03 01:38:31 UTC
Permalink
Post by Andrew Williams
As I'm on the move I have no decent email app so I can't interleave with
First time: Maybe not on ML but this has been discussed before on IRC, but
that does not exactly make angood source of documentation for issues or api
confusion.
i've never seen it before... :)
Post by Andrew Williams
UTF8: we are in agreement here, I think you misread my comment - I was
saying this complication is introduced by unicode so the markup does not
add that complexity.
oh sorry. my bad, i misread your mail. we agree. markup or not - you don't have
a simple mapping from char string bytes or even unicode codepoints to visible
chars. throwing markup in or not doesn't change anything here in principal.
Post by Andrew Williams
Tizen: maybe this is the crux of the issue. I do not see Tizen developers
coming to the efl community to feed back on any of this so we don't have
good visibility. Are you therefore the champion for everything going on
over there that we need to take on? It's kind of tricky to be spending
lots of time building apps on our apis and yet find that invisible users of
the api carry substantially more influence.
correct. it's a pain. but this is the reality of things. the vast majority are
disinterested in open source and are just doing their jobs. there is little to
zero encouragement to push them to upstream too. tizen has also significantly
altered efl... so it is very hard to help in many ways. but markup is not one
of them.
Post by Andrew Williams
The thing I get most from your email is that, as we decided to do markup by
default in current apis, it is unwise to ever change it. If we will always
it's unwise to change without REALLY GOOD data. right now we have poor data.
have data on what people think. is it just a "oh... that's ... interesting"
moment when first discovered? is it a "crap crap. i hate this" or "wow. well i
expected a kind of markup anyway".

some people respond one way, others another way. those that may be perfectly
happy and silent now may become a complaining group later. i want people to
consider this. if there is no clear winner, then i would say "stay with what
you have as it causes less upsets and problems moving to it from existing efl
code". if there is clear data of happy vs "neutral - that's fine" vs
"unhappy" ... then i think a decision can be made to change if the data
supports it.
Post by Andrew Williams
be constrained by historical apis then why not just make an edict that the
eo api must be a direct mirror of the legacy for compatibility reasons?...
Andy
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
This is not the first time this has come up (just search phab for "HTML"
or
Post by Andrew Williams
"encoding") and given that we agreed we don't have many app developers it
seems dismissive to state it's not a problem as we've had no complains
from
Post by Andrew Williams
app developers...
first time it has come up on mailing lists or irc (as a
question/disatisfaction).
there are are probably several times more developers using it in tizen... and i
have never heard a complaint out of them about it.\
i have seen many spreadsheets with complaints on efl from tizen base devs.
never was markup one of them.
it's not dismissive. it's me saying that you lack a perspective i do. you think
this move would be an improvement yet you have never seen what i have ... and
i have a deep worry that what goes from no complaints suddenly becomes "what i
used to be able to use markup.. now i can't? how do i make my text bold now?"
"oh you have to sue the markup versions of all the text interfaces" "what? i
didn't see that. why did you not make it default like before?". ... i think YOU
are begin dismissive of this scenario. we go from no complaints there to lots
of them.
Post by Andrew Williams
Markup vs text does not introduce cursor problems that otherwise are
simple
Post by Andrew Williams
- just supporting UTF8 means you can't make assumptions about cursor vs
text offset. Additionally that should only be a concern for entry which
is
Post by Andrew Williams
a very small subset of the text engine responsibilities.
you can't make it WITH utf-8/unicode. read up the unicode standards and check
with composite characters (ô == o + ^ unicode chars beside eachother for
example... there's far more complex ones for various languages - i'm not
talking input here... text strings). it's impossible to make an assumption that
1 utf8 char or even 1 unicdoe codepoint == 1 visible on screen character. it's
impossible. if you go forward with this assumption you'll be bitterly
disappointed. it's an issue that has to be handled anyway.
Post by Andrew Williams
In terms of complexity or api confusion I return to the path of least
surprise. Text apis should not unexpectedly encode content such that
input
Post by Andrew Williams
!= output. Splitting the data from the metadata or making the setting of
see above.
Post by Andrew Williams
marked up text explicit avoids this confusion. For inspiration I point
you
it does not.
Post by Andrew Williams
to the iOS APIs where they have "attributedString" (get/set etc) which is
different to the plain text methods. Additionally they avoid the
insert/replace issues by pushing those features into the string handling
rather than the widget which makes a lot of sense now I think about it.
Thanks,
Andy
On Fri, 30 Jun 2017 16:22:03 +0200 Davide Andreoli <
Post by Davide Andreoli
On Thu, 29 Jun 2017 11:13:51 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Davide Andreoli
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it
or
Post by Andrew Williams
have
Post by Davide Andreoli
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Davide Andreoli
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Davide Andreoli
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Davide Andreoli
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new
Post by Andrew Williams
Eo
Post by Davide Andreoli
Post by Andrew Williams
based text APIs
you have to have a markup version of everything. set, append,
prepend,
Post by Andrew Williams
Post by Davide Andreoli
insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the
widget to
Post by Andrew Williams
Post by Davide Andreoli
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or
manipulate
Post by Andrew Williams
text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of
text_set(obj, "Blah");
you have
prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);
we could make it a push and pop... just to cut this down so it goes
from 4
Post by Andrew Williams
ro 3
lines... but still./.. not great (and the implementation actually
needs to
Post by Andrew Williams
keep
a real stack then not a counter).
not knowing how your text is interpreted at all is very bad. you need
to
Post by Andrew Williams
know.
if there is only one way then there is no problem. if we were going to
have
Post by Andrew Williams
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like
crazy...
Post by Andrew Williams
the
alternative is we must pass format every time WITH the text
text_set(obj, PLAIN, "Blah");
everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...
#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"
etc. and we literally require you decode the header... (many values of
the
Post by Andrew Williams
first 32 ascii values other than \000 could be used for this as they
can
Post by Andrew Williams
never
be visibly displayed or mapped to a glyph and make zero sense to use
so we
Post by Andrew Williams
can
use them as control chars like \n, \t and \r (\012, \011 \015) are
format
Post by Andrew Williams
control chars and not directly mappable to a visible glyph on their
own).
Post by Andrew Williams
so
text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");
etc. but people will probably dislike this too... no matter how you
slice
Post by Andrew Williams
or
dice this, people will hate something. so make take is, you either do
plain
Post by Andrew Williams
text and give up on markup entirely other than having to use a whole
bunch
Post by Andrew Williams
of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means
markup
Post by Andrew Williams
versions of every query, set, insert, append etc.) and the
implementation
Post by Andrew Williams
is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte
value
Post by Andrew Williams
offset? enjoy the figuring out of this as its likely going to be a
visible
Post by Andrew Williams
glyph/char pos) ...
or you just bite the bullet and say "it's all markup. DEAL WITH IT"
(and
Post by Andrew Williams
provide some converters). only people i have heard complain are efl
people
Post by Andrew Williams
and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and
expects
Post by Andrew Williams
markup...
anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Davide Andreoli
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Davide Andreoli
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Davide Andreoli
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting
Post by Andrew Williams
-
Post by Davide Andreoli
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup
format.
Post by Andrew Williams
The
Post by Davide Andreoli
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Davide Andreoli
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting
markup is
Post by Andrew Williams
Post by Davide Andreoli
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify
Post by Andrew Williams
the
Post by Davide Andreoli
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Davide Andreoli
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Davide Andreoli
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Davide Andreoli
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to
get
Post by Andrew Williams
the
Post by Davide Andreoli
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's
easier
Post by Andrew Williams
than
Post by Davide Andreoli
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way
Post by Andrew Williams
to
Post by Davide Andreoli
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup
capability
Post by Andrew Williams
but
Post by Davide Andreoli
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that
your
Post by Andrew Williams
text
Post by Davide Andreoli
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Davide Andreoli
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the
mentioned
Post by Andrew Williams
Post by Davide Andreoli
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in
as
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn
it
Post by Andrew Williams
off.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported
in a
Post by Andrew Williams
Post by Davide Andreoli
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Davide Andreoli
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding.
We
Post by Andrew Williams
Post by Davide Andreoli
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Davide Andreoli
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Davide Andreoli
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per
character).
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget is
Post by Davide Andreoli
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by
setting
Post by Andrew Williams
Post by Davide Andreoli
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not
exist in
Post by Andrew Williams
this
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear
Post by Andrew Williams
:(
Post by Davide Andreoli
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Davide Andreoli
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions on
Post by Davide Andreoli
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls
to
Post by Andrew Williams
Post by Davide Andreoli
insert it
Post by Andrew Williams
tag
by tag. have fun.
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!)
formatted
Post by Andrew Williams
text.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Davide Andreoli
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text
in
Post by Andrew Williams
my
Post by Davide Andreoli
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net
Post by Andrew Williams
and
Post by Davide Andreoli
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not
have
Post by Andrew Williams
Post by Davide Andreoli
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in
this
Post by Andrew Williams
thread
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should be
Post by Davide Andreoli
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not
be
Post by Andrew Williams
able
Post by Davide Andreoli
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Davide Andreoli
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org!
http://sdm.link/slashdot
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Davide Andreoli
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Davide Andreoli
Post by Andrew Williams
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Davide Andreoli
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Davide Andreoli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Davide Andreoli
2017-07-01 07:07:27 UTC
Permalink
Post by Carsten Haitzler (The Rasterman)
Post by Davide Andreoli
On Thu, 29 Jun 2017 11:13:51 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Davide Andreoli
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Davide Andreoli
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Davide Andreoli
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Davide Andreoli
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Davide Andreoli
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the new
Eo
Post by Davide Andreoli
Post by Andrew Williams
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the widget to
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or manipulate text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of
text_set(obj, "Blah");
you have
prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);
we could make it a push and pop... just to cut this down so it goes from 4 ro 3
lines... but still./.. not great (and the implementation actually needs to keep
a real stack then not a counter).
I was supposing the developer to set the mode right after object creation
and then
stay with that, ex:

lb = elm_label_add(...)
elm_text_mode_set(lb, MARKUP)

and then always use markup in your code for that widget,
Isn't this the 99% of the usage case?
Post by Carsten Haitzler (The Rasterman)
not knowing how your text is interpreted at all is very bad. you need to know.
if there is only one way then there is no problem. if we were going to have
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like crazy... the
alternative is we must pass format every time WITH the text
text_set(obj, PLAIN, "Blah");
everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...
#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"
etc. and we literally require you decode the header... (many values of the
first 32 ascii values other than \000 could be used for this as they can never
be visibly displayed or mapped to a glyph and make zero sense to use so we can
use them as control chars like \n, \t and \r (\012, \011 \015) are format
control chars and not directly mappable to a visible glyph on their own). so
text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");
etc. but people will probably dislike this too... no matter how you slice or
dice this, people will hate something. so make take is, you either do plain
text and give up on markup entirely other than having to use a whole bunch of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means markup
versions of every query, set, insert, append etc.) and the implementation is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte value
offset? enjoy the figuring out of this as its likely going to be a visible
glyph/char pos) ...
or you just bite the bullet and say "it's all markup. DEAL WITH IT" (and
provide some converters). only people i have heard complain are efl people and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and expects
markup...
anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Davide Andreoli
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Davide Andreoli
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting
-
Post by Davide Andreoli
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Davide Andreoli
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Davide Andreoli
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify
the
Post by Davide Andreoli
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Davide Andreoli
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Davide Andreoli
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Davide Andreoli
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Davide Andreoli
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Davide Andreoli
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way
to
Post by Davide Andreoli
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Davide Andreoli
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Davide Andreoli
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Davide Andreoli
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in a
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Davide Andreoli
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget is
Post by Davide Andreoli
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to hear
:(
Post by Davide Andreoli
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Davide Andreoli
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions on
Post by Davide Andreoli
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert it
Post by Andrew Williams
tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the "new"
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Davide Andreoli
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the net
and
Post by Davide Andreoli
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should be
Post by Davide Andreoli
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Davide Andreoli
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Davide Andreoli
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-
devel
Post by Davide Andreoli
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Davide Andreoli
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Davide Andreoli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler (The Rasterman)
2017-07-02 14:47:36 UTC
Permalink
Post by Davide Andreoli
Post by Carsten Haitzler (The Rasterman)
Post by Davide Andreoli
On Thu, 29 Jun 2017 11:13:51 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Davide Andreoli
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Davide Andreoli
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Davide Andreoli
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Davide Andreoli
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Davide Andreoli
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the new
Eo
Post by Davide Andreoli
Post by Andrew Williams
based text APIs
you have to have a markup version of everything. set, append, prepend, insert,
replace etc.
or something like "markup_mode_enabled" that you can set on the widget to
enable/disable markup insert of text.
actually this would be worse. any code calling an api to get or manipulate text
needs to also always query mode first (maybe change it, then change it back)...
so now instead of
text_set(obj, "Blah");
you have
prev_mode = text_mode_get(obj);
text_mode_set(obj, PLAIN);
text_set(obj, "Blah");
text_mode_set(obj, prev_mode);
we could make it a push and pop... just to cut this down so it goes from 4 ro 3
lines... but still./.. not great (and the implementation actually needs to keep
a real stack then not a counter).
I was supposing the developer to set the mode right after object creation
and then
you could do that but the above would still be needed because let's say you use
a helper api... or some other part of efl has to... do copy & paste and insert
text. what mode is it in? every api needs to handle all possible modes OR
always force the mode it wants then go back to where it was. the developer who
created the widget in their code is not always the only piece of code messing
with the text content.
Post by Davide Andreoli
lb = elm_label_add(...)
elm_text_mode_set(lb, MARKUP)
and then always use markup in your code for that widget,
Isn't this the 99% of the usage case?
Post by Carsten Haitzler (The Rasterman)
not knowing how your text is interpreted at all is very bad. you need to know.
if there is only one way then there is no problem. if we were going to have
lots of text modes (plain, markup, full html, rtf, ...) then maybe we'd have to
live with the above mode thing as the api's would multiply like crazy... the
alternative is we must pass format every time WITH the text
text_set(obj, PLAIN, "Blah");
everyone is probably going to hate this too. we could make use of "non-visible"
ascii chars as format markers like magic numbers for file formats...
#define PLAIN ""
#define MARKUP "\001\001"
#define HTML "\001\002"
#define RTF "\001\003"
etc. and we literally require you decode the header... (many values of the
first 32 ascii values other than \000 could be used for this as they can never
be visibly displayed or mapped to a glyph and make zero sense to use so we can
use them as control chars like \n, \t and \r (\012, \011 \015) are format
control chars and not directly mappable to a visible glyph on their own). so
text_set(obj, "Blah");
text_set(obj, MARKUP"<b>Blah</b>");
etc. but people will probably dislike this too... no matter how you slice or
dice this, people will hate something. so make take is, you either do plain
text and give up on markup entirely other than having to use a whole bunch of
metadata api's to apply it (that's going to be **FUN** on inserts ... - not),
make wrappers that parse markup for you then do these (which means markup
versions of every query, set, insert, append etc.) and the implementation is
going to be "fun" (what is a cursor pos? a char pos #, a utf8 byte value
offset? enjoy the figuring out of this as its likely going to be a visible
glyph/char pos) ...
or you just bite the bullet and say "it's all markup. DEAL WITH IT" (and
provide some converters). only people i have heard complain are efl people and
only now after many many many years who oddly didn't even read our own docs and
find out it's markup... everyone else seems to be fine with it and expects
markup...
anecdotal statistics tells me that removing the "markup by default" is going to
be a big mistake...
Post by Davide Andreoli
Post by Andrew Williams
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Davide Andreoli
is a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Davide Andreoli
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting
-
Post by Davide Andreoli
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Davide Andreoli
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Davide Andreoli
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify
the
Post by Davide Andreoli
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Davide Andreoli
it's
Post by Andrew Williams
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Davide Andreoli
in the
Post by Andrew Williams
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Davide Andreoli
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Davide Andreoli
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Davide Andreoli
just
Post by Andrew Williams
add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way
to
Post by Davide Andreoli
do
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Davide Andreoli
it
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Davide Andreoli
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Davide Andreoli
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in a
widget
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named -
Post by Andrew Williams
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Andrew Williams
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Davide Andreoli
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget is
Post by Davide Andreoli
a
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to hear
:(
Post by Davide Andreoli
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Davide Andreoli
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions on
Post by Davide Andreoli
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Davide Andreoli
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert it
Post by Andrew Williams
tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the "new"
API !!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Davide Andreoli
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the net
and
Post by Davide Andreoli
pass
Post by Andrew Williams
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access to
Post by Andrew Williams
the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should be
Post by Davide Andreoli
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Davide Andreoli
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Davide Andreoli
and
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Davide Andreoli
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Davide Andreoli
occur.
Post by Andrew Williams
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-
devel
Post by Davide Andreoli
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Davide Andreoli
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Davide Andreoli
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-07-04 12:22:21 UTC
Permalink
Hi,

I jumped back to this email I sent a week ago and realised that we have
just spent a bunch of time revisiting a discussion that had clearly wrapped
up at the EDD in Malta. One reason I wanted to post our conclusion to the
list was for visibility and a chance to comment for anyone who was not able
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has led to
confusion and time wasting.

There is a question in here about general API design that I will start in a
new thread but i want to wrap up this discussion. Is there anyone on this
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?

I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the past. If
that is not true then we will really struggle to make quality bindings to
higher level languages (in this context the difference between plain text
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).

Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text through
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or have
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set or
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst removing
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is a
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect for
text_get - but the current content transformed with the helper will
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting - just
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The test
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing internal
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting with
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded,
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content in
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is understandable, as it
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the text
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to do
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned special
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very important
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly named
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We support
UTF-8,
and provide converters for your convenience. You probably won't need
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice that
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be plaintext.
There's no
"markup" logic in it. Instead, you format your text by setting ranges
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup (or
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy with
it's usage.
too bad. plain text for you unless you call lots of api calls to insert it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new" API !!
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have access
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be
plain
Post by Daniel Hirt
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons, and
any other widget) is a shame, we are loosing IMO the most powerful and
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able to
port my
applications to the new API, until a "later stage" will eventually
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
Davide Andreoli
2017-07-04 17:22:34 UTC
Permalink
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we have
just spent a bunch of time revisiting a discussion that had clearly wrapped
up at the EDD in Malta. One reason I wanted to post our conclusion to the
list was for visibility and a chance to comment for anyone who was not able
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has led to
confusion and time wasting.
There is a question in here about general API design that I will start in a
new thread but i want to wrap up this discussion. Is there anyone on this
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
you still did not reply to the first raster's question:
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).

To be honest I never had any issue with the current always-markup model,
so for now I vote for keeping the legacy behavior also on the new EO api.
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the past. If
that is not true then we will really struggle to make quality bindings to
higher level languages (in this context the difference between plain text
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text through
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or have
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst removing
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past) is
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper will
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting -
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is great
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing internal
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded,
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content in
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is understandable, as
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to do
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but it
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your text
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very important
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't need
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget is a
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in this
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the opinions on this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to insert it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new" API
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have access
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this thread
(text_get
is difficult to use). And I agree that the default behavior should be
plain
Post by Daniel Hirt
text set/get,
BUT: we really need to implement something like: text_markup_set(...)
To be more clear: loosing the markup ability (in textblock, buttons,
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most powerful and
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will eventually
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Andrew Williams
2017-07-04 18:50:34 UTC
Permalink
Hi,

Apologies I did not realise it was a question that needed answering. As I
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of concerns.
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.

I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are reported
or the confusion created... (I reference back to user enters 2>3 but
text_get returns 2&gt;3)
Encoding of text is not something that a widget should have to deal with
and decoding is not something that a cost char* text_get api implies.

Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we have
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion to the
list was for visibility and a chance to comment for anyone who was not
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has led to
confusion and time wasting.
There is a question in here about general API design that I will start
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on this
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup model,
so for now I vote for keeping the legacy behavior also on the new EO api.
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the past.
If
Post by Andrew Williams
that is not true then we will really struggle to make quality bindings to
higher level languages (in this context the difference between plain text
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past)
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting -
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded,
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is understandable, as
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the opinions
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new"
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior should
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock, buttons,
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most powerful
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will eventually
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Carsten Haitzler (The Rasterman)
2017-07-05 00:27:07 UTC
Permalink
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed answering. As I
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of concerns.
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then you're
going to REALLY annoy a lot of people used to inlining their metadata. dave is
the counter example i am pointing at (and i bet you there are many more like
him).

i remember at e dev day we specifically skipped popularity with "we have no
info on what people prefer and are not doing some popularity poll here" or
words to that effect. so the jury is still out on what people actually prefer.
i know what you prefer. i have heard what some others prefer. if its 55v45 in
favour of plain text + api's to define format regions/nodes i still say "stick
to markup as it will make a transition easier". if it's 80v20 in favour of
plain then move, but you need some way to provide inlined format handling to
express a string of text WITH formatting embedded (ie markup). what you are
presenting is a fait accompli that has clearly said "ignoring the data
- making this decision anyway".

and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text versions
given your design. the way we do it now is when going from markup (all data
there) to plain - we just drop all the markup on the floor and convert a very
tags (<br> for example) and vice-versa.

when your metadata is out-of-band like proposed you have to now have markup
versions of every plain text api version on anything because dealing with
formatting requires more calls to go query the formatting info separately to
the text and it can't just be done in a "simple wrapper that converts a
string" because you are not just stripping out data from a full data set, but
having to do multiple api's to query and rebuild it and vice-versa. the
proposal for strings is to make them very very very dumb (plain text) by
default and that is highly problematic from a technical point of view.
popularity is totally unknown at this point, so just assuming its 50v50,
choosing the path with far more technical issues at the api level is a bad
choice, and plain text is just that.

you can't separate out the choice of markup or not from designing the api.
doing markup by default is "we choose to lose NO information by default and
have all of it there and provide you with helpers to drop info not needed or
used". choosing plain text by default is "we already lost all the info - you
have to add it back with more api's by querying or providing it". if you
provide markup versions of every text api then this would be dealt with BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't just provide
a simple "degrade it to plain text" helper (or promote to markup) like we do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are reported
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am pointing out
because it downgrades the information passed in and out BY DEFAULT (plain text
is downgraded vs markup). you will have issues EITHER way. plain text is not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where \n means
go down 1 line and move cursor to left (or right) edge, char values > 127 e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8 ... it's
ALWAYS encoded). markup is just an extended form of encoding on top of this.
and functions/helpers were provided to do this conversion. it's not being
dismissed. far from it - it was already envisaged and addressed. maybe the
helpers could now use eina_slstr to avoid needing to free strings afterwards...

but my point is that if the DEFAULT api were to be lossy (plain text) then you
create a huge amount of problems. if it were markup then you'd have far fewer
problems and just need the kind of convert funcs as we already have. that or
having to provide markup duplicates api's for every string get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally a bad path
to go down.

and ALL of this discussion at the technical api level hasn't even got the info
on what people prefer to be the default. to get a good feel for this... you
NEED to give them some options on what to choose and thus design api's to
handle all cases and propose something and see that it actually can handle
them... then find out what people think then about it - the kinds of users who
use the api regularly... THEN make a decision on what should be done. well if
you are planning on changing something AND the change is controversial (which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal with
and decoding is not something that a cost char* text_get api implies.
the documentation clearly says otherwise. if it makes you feel better we could:

typedef Elm_Markup char;

Elm_Markup *elm_object_text_get(Evas_object *obj);

though it'd be a lie because some widgets dont do markup... but entry and label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).

we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we have
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion to the
list was for visibility and a chance to comment for anyone who was not
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has led to
confusion and time wasting.
There is a question in here about general API design that I will start
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on this
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup model,
so for now I vote for keeping the legacy behavior also on the new EO api.
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the past.
If
Post by Andrew Williams
that is not true then we will really struggle to make quality bindings to
higher level languages (in this context the difference between plain text
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is being
extended with a solid markup API
* The existing markup format will be supported through _markup_text_set
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain text.
This allows us to take a path-of-least-surprise approach for the new Eo
based text APIs
Thanks everyone for the discussion :)
Andy
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the past)
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would expect
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the helper
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of formatting -
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format. The
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext) using
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two entry
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when interacting
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You specify the
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is loaded,
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup content
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is understandable, as
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get the
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier than
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a way to
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability but
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are expected to
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try with
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it off.
I agree that people complain when markup is not supported in a
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are peculiarly
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably won't
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't notice
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new widget
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to hear :(
i've ben trying to tell people that markup is LESS bad than no markup
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the opinions
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really happy
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted text.
Now try to think at the code needed to do the same with the "new"
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in my
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are separate
processes
from the core mediacenter, plugins just fetch datas from the net and
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior should
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock, buttons,
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most powerful
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be able
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will eventually
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-07-05 03:26:09 UTC
Permalink
Hi,

Unfortunately I don't have time to reply to all of these thoughts right now
but I wanted to reply to the first one before any more replies arrive. I am
not (and nether is anyone else) suggesting that we remove markup support.
Please stop implying that.

Also my email was about api and not about internal storage. If you want to
handle everything internally in some encoded form fine - just don't push
that choice on users of what looks like a text api. Supporting both plain
text and markuped text models does not mean lowest common denominator
internally.

I'll get to the rest later, apologies for the partial reply)
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed answering. As I
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of
concerns.
Post by Andrew Williams
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then you're
going to REALLY annoy a lot of people used to inlining their metadata. dave is
the counter example i am pointing at (and i bet you there are many more like
him).
i remember at e dev day we specifically skipped popularity with "we have no
info on what people prefer and are not doing some popularity poll here" or
words to that effect. so the jury is still out on what people actually prefer.
i know what you prefer. i have heard what some others prefer. if its 55v45 in
favour of plain text + api's to define format regions/nodes i still say "stick
to markup as it will make a transition easier". if it's 80v20 in favour of
plain then move, but you need some way to provide inlined format handling to
express a string of text WITH formatting embedded (ie markup). what you are
presenting is a fait accompli that has clearly said "ignoring the data
- making this decision anyway".
and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text versions
given your design. the way we do it now is when going from markup (all data
there) to plain - we just drop all the markup on the floor and convert a very
tags (<br> for example) and vice-versa.
when your metadata is out-of-band like proposed you have to now have markup
versions of every plain text api version on anything because dealing with
formatting requires more calls to go query the formatting info separately to
the text and it can't just be done in a "simple wrapper that converts a
string" because you are not just stripping out data from a full data set, but
having to do multiple api's to query and rebuild it and vice-versa. the
proposal for strings is to make them very very very dumb (plain text) by
default and that is highly problematic from a technical point of view.
popularity is totally unknown at this point, so just assuming its 50v50,
choosing the path with far more technical issues at the api level is a bad
choice, and plain text is just that.
you can't separate out the choice of markup or not from designing the api.
doing markup by default is "we choose to lose NO information by default and
have all of it there and provide you with helpers to drop info not needed or
used". choosing plain text by default is "we already lost all the info - you
have to add it back with more api's by querying or providing it". if you
provide markup versions of every text api then this would be dealt with BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't just provide
a simple "degrade it to plain text" helper (or promote to markup) like we do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are reported
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am pointing out
because it downgrades the information passed in and out BY DEFAULT (plain text
is downgraded vs markup). you will have issues EITHER way. plain text is not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where \n means
go down 1 line and move cursor to left (or right) edge, char values > 127 e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8 ... it's
ALWAYS encoded). markup is just an extended form of encoding on top of this.
and functions/helpers were provided to do this conversion. it's not being
dismissed. far from it - it was already envisaged and addressed. maybe the
helpers could now use eina_slstr to avoid needing to free strings afterwards...
but my point is that if the DEFAULT api were to be lossy (plain text) then you
create a huge amount of problems. if it were markup then you'd have far fewer
problems and just need the kind of convert funcs as we already have. that or
having to provide markup duplicates api's for every string
get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally a bad path
to go down.
and ALL of this discussion at the technical api level hasn't even got the info
on what people prefer to be the default. to get a good feel for this... you
NEED to give them some options on what to choose and thus design api's to
handle all cases and propose something and see that it actually can handle
them... then find out what people think then about it - the kinds of users who
use the api regularly... THEN make a decision on what should be done. well if
you are planning on changing something AND the change is controversial (which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal with
and decoding is not something that a cost char* text_get api implies.
typedef Elm_Markup char;
Elm_Markup *elm_object_text_get(Evas_object *obj);
though it'd be a lie because some widgets dont do markup... but entry and label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).
we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we
have
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion
to the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list was for visibility and a chance to comment for anyone who was
not
Post by Andrew Williams
Post by Andrew Williams
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has
led to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
confusion and time wasting.
There is a question in here about general API design that I will
start
Post by Andrew Williams
Post by Andrew Williams
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on
this
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup
model,
Post by Andrew Williams
Post by Andrew Williams
so for now I vote for keeping the legacy behavior also on the new EO
api.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the
past.
Post by Andrew Williams
Post by Andrew Williams
If
Post by Andrew Williams
that is not true then we will really struggle to make quality
bindings to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
higher level languages (in this context the difference between plain
text
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new Eo
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
based text APIs
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Andrew Williams
Post by Andrew Williams
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Andrew Williams
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting -
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Andrew Williams
Post by Andrew Williams
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way to
Post by Andrew Williams
Post by Andrew Williams
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in
a
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Andrew Williams
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget
Post by Andrew Williams
Post by Andrew Williams
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear :(
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions
Post by Andrew Williams
Post by Andrew Williams
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Andrew Williams
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net and
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should
Post by Andrew Williams
Post by Andrew Williams
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
Carsten Haitzler (The Rasterman)
2017-07-05 05:48:50 UTC
Permalink
Post by Andrew Williams
Hi,
Unfortunately I don't have time to reply to all of these thoughts right now
but I wanted to reply to the first one before any more replies arrive. I am
not (and nether is anyone else) suggesting that we remove markup support.
Please stop implying that.
i have clearly listed options on how to do it as an api. ONE of those options
is no markup in text_set etc. and HELPERS indstead that would convert from
makrup to plain text PLUS call the metadata api's to set metadata correctly.
you double up on your api's and the markup ones are built on top of the plain
text + metadata ones. i have been VERY clear on that. i have been EXPLICITLY
discussing the problems with this path.

you could implement both WITHOUT the markup being wrappers (and now have to
support both as native internal paths). from an api view it loosk the same,
internally it look different.

an options was dave's "set a mode (markup or plain)"" method which cuts down
our api's again to something nice BUT means we always have to switch to a
specific mode then back to where it was each time.

other methods were provide text format as a parameter with the string, provide
it as special chars at the start of the string as a format header, and you
propose having special string objects vaguely (i havent gotten something clear
on it yet), and i think this is probably worse as you have to create string
object from markup string, then set/provide string object to label/entry
object, and the reverse (to get text, get string obj, then get string from
string obj etc.). this double-object thing IMHO would make the api even worse
to use than any of the other options.

imho the simplest option is pick one encoding only and provide converters like:

obj.text_set(to_markup("Hello\nWorld"));
text = to_plain(obj.text_get());

ALL you need to know is it's markup by default. this means all the string query
and manipulation funcs only need a single markup version at the api since you
lose no information.
Post by Andrew Williams
Also my email was about api and not about internal storage. If you want to
handle everything internally in some encoded form fine - just don't push
that choice on users of what looks like a text api. Supporting both plain
text and markuped text models does not mean lowest common denominator
internally.
i am not talking about internal encoding at all. ONLY talking about api. i was
saying that IF the "native model" for api is not markup (all data inline in the
blob of text) and has to be dealt with by various api's defining content then
defining format ranges (char 13 to 67 is "bold", at char 16 insert image item
"bob.jpg", etc. for example). then the markup api's will be build AROUND this
and that makes them complex internally. you also double up on your api's -
having markup versions for every plain text version. this is not a great thing.

this morning i just personally spoke to 2 developers in the office and the BOTH
were: "markup is great. we like it. everyone i know of liked it and had no
issues with elm_entry being markup by default - they liked it". these
people have interacted with dozens of developers using these api's... their
experience is the polar opposite of yours. they had zero issues in dealing with
markup by default. i'm warning - change defaults and a silent happy large group
become noisy and unhappy.

before jumping into "the decision is made, but we have no numbers on what is
popular" ... get some data on that first. i suspect you may be surprised at how
many people find markup simple, obvious and easy to deal with. it keeps our api
implementation simpler and api size smaller.
Post by Andrew Williams
I'll get to the rest later, apologies for the partial reply)
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed answering. As I
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of
concerns.
Post by Andrew Williams
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then you're
going to REALLY annoy a lot of people used to inlining their metadata. dave is
the counter example i am pointing at (and i bet you there are many more like
him).
i remember at e dev day we specifically skipped popularity with "we have no
info on what people prefer and are not doing some popularity poll here" or
words to that effect. so the jury is still out on what people actually prefer.
i know what you prefer. i have heard what some others prefer. if its 55v45 in
favour of plain text + api's to define format regions/nodes i still say "stick
to markup as it will make a transition easier". if it's 80v20 in favour of
plain then move, but you need some way to provide inlined format handling to
express a string of text WITH formatting embedded (ie markup). what you are
presenting is a fait accompli that has clearly said "ignoring the data
- making this decision anyway".
and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text versions
given your design. the way we do it now is when going from markup (all data
there) to plain - we just drop all the markup on the floor and convert a very
tags (<br> for example) and vice-versa.
when your metadata is out-of-band like proposed you have to now have markup
versions of every plain text api version on anything because dealing with
formatting requires more calls to go query the formatting info separately to
the text and it can't just be done in a "simple wrapper that converts a
string" because you are not just stripping out data from a full data set, but
having to do multiple api's to query and rebuild it and vice-versa. the
proposal for strings is to make them very very very dumb (plain text) by
default and that is highly problematic from a technical point of view.
popularity is totally unknown at this point, so just assuming its 50v50,
choosing the path with far more technical issues at the api level is a bad
choice, and plain text is just that.
you can't separate out the choice of markup or not from designing the api.
doing markup by default is "we choose to lose NO information by default and
have all of it there and provide you with helpers to drop info not needed or
used". choosing plain text by default is "we already lost all the info - you
have to add it back with more api's by querying or providing it". if you
provide markup versions of every text api then this would be dealt with BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't just provide
a simple "degrade it to plain text" helper (or promote to markup) like we do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are reported
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am pointing out
because it downgrades the information passed in and out BY DEFAULT (plain text
is downgraded vs markup). you will have issues EITHER way. plain text is not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where \n means
go down 1 line and move cursor to left (or right) edge, char values > 127 e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8 ... it's
ALWAYS encoded). markup is just an extended form of encoding on top of this.
and functions/helpers were provided to do this conversion. it's not being
dismissed. far from it - it was already envisaged and addressed. maybe the
helpers could now use eina_slstr to avoid needing to free strings afterwards...
but my point is that if the DEFAULT api were to be lossy (plain text) then you
create a huge amount of problems. if it were markup then you'd have far fewer
problems and just need the kind of convert funcs as we already have. that or
having to provide markup duplicates api's for every string
get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally a bad path
to go down.
and ALL of this discussion at the technical api level hasn't even got the info
on what people prefer to be the default. to get a good feel for this... you
NEED to give them some options on what to choose and thus design api's to
handle all cases and propose something and see that it actually can handle
them... then find out what people think then about it - the kinds of users who
use the api regularly... THEN make a decision on what should be done. well if
you are planning on changing something AND the change is controversial (which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal with
and decoding is not something that a cost char* text_get api implies.
typedef Elm_Markup char;
Elm_Markup *elm_object_text_get(Evas_object *obj);
though it'd be a lie because some widgets dont do markup... but entry and label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).
we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we
have
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion
to the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list was for visibility and a chance to comment for anyone who was
not
Post by Andrew Williams
Post by Andrew Williams
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has
led to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
confusion and time wasting.
There is a question in here about general API design that I will
start
Post by Andrew Williams
Post by Andrew Williams
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on
this
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup
model,
Post by Andrew Williams
Post by Andrew Williams
so for now I vote for keeping the legacy behavior also on the new EO
api.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the
past.
Post by Andrew Williams
Post by Andrew Williams
If
Post by Andrew Williams
that is not true then we will really struggle to make quality
bindings to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
higher level languages (in this context the difference between plain
text
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new Eo
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
based text APIs
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Andrew Williams
Post by Andrew Williams
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Andrew Williams
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting -
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Andrew Williams
Post by Andrew Williams
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way to
Post by Andrew Williams
Post by Andrew Williams
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in
a
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Andrew Williams
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget
Post by Andrew Williams
Post by Andrew Williams
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear :(
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions
Post by Andrew Williams
Post by Andrew Williams
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Andrew Williams
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net and
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should
Post by Andrew Williams
Post by Andrew Williams
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Daniel Hirt
2017-07-05 06:14:02 UTC
Permalink
Hello all,
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
Unfortunately I don't have time to reply to all of these thoughts right now
but I wanted to reply to the first one before any more replies arrive. I am
not (and nether is anyone else) suggesting that we remove markup support.
Please stop implying that.
i have clearly listed options on how to do it as an api. ONE of those options
is no markup in text_set etc. and HELPERS indstead that would convert from
makrup to plain text PLUS call the metadata api's to set metadata correctly.
you double up on your api's and the markup ones are built on top of the plain
text + metadata ones. i have been VERY clear on that. i have been EXPLICITLY
discussing the problems with this path.
you could implement both WITHOUT the markup being wrappers (and now have to
support both as native internal paths). from an api view it loosk the same,
internally it look different.
There are benefits when going for the "wrappers" approach:

1. You offload the parsing logic to another source (as it should, it has
little to do with the current implementation of formats/annotations).

2. You don't repeat your logic - less to maintain. By making things use
"annotation" API, whether you want to use a markup or just the
annotation API, you maintain only the annotation code (in most cases, as
markup logic is only a wrapper).
Post by Carsten Haitzler (The Rasterman)
an options was dave's "set a mode (markup or plain)"" method which cuts down
our api's again to something nice BUT means we always have to switch to a
specific mode then back to where it was each time.
I would rather not do that. Setting "modes" is kind of unpleasant.
Post by Carsten Haitzler (The Rasterman)
other methods were provide text format as a parameter with the string, provide
it as special chars at the start of the string as a format header, and you
propose having special string objects vaguely (i havent gotten something clear
on it yet), and i think this is probably worse as you have to create string
object from markup string, then set/provide string object to label/entry
object, and the reverse (to get text, get string obj, then get string from
string obj etc.). this double-object thing IMHO would make the api even worse
to use than any of the other options.
obj.text_set(to_markup("Hello\nWorld"));
text = to_plain(obj.text_get());
ALL you need to know is it's markup by default. this means all the string query
and manipulation funcs only need a single markup version at the api since you
lose no information.
Not all usages of text require markup. SOME (even a lot) want it, but
not all.
The question is: can we allow having two different interpretations for
"Efl.Text.text" property?
My answer is "no". We should stick to it being a plain text.
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Also my email was about api and not about internal storage. If you want to
handle everything internally in some encoded form fine - just don't push
that choice on users of what looks like a text api. Supporting both plain
text and markuped text models does not mean lowest common denominator
internally.
i am not talking about internal encoding at all. ONLY talking about api. i was
saying that IF the "native model" for api is not markup (all data inline in the
blob of text) and has to be dealt with by various api's defining content then
defining format ranges (char 13 to 67 is "bold", at char 16 insert image item
"bob.jpg", etc. for example). then the markup api's will be build AROUND this
and that makes them complex internally. you also double up on your api's -
having markup versions for every plain text version. this is not a great thing.
this morning i just personally spoke to 2 developers in the office and the BOTH
were: "markup is great. we like it. everyone i know of liked it and had no
issues with elm_entry being markup by default - they liked it". these
people have interacted with dozens of developers using these api's... their
experience is the polar opposite of yours. they had zero issues in dealing with
markup by default. i'm warning - change defaults and a silent happy large group
become noisy and unhappy.
Markup is staying. The developer will just need to use
"efl_text_markup_set/insert", instead.
Using a different name shouldn't upset anyone, unless I am missing
something?

Also, I am writing the "Efl.Markup" mixin, that will use the annotation
API, right now.
Just letting you know.

-- herdsman.
Post by Carsten Haitzler (The Rasterman)
before jumping into "the decision is made, but we have no numbers on what is
popular" ... get some data on that first. i suspect you may be surprised at how
many people find markup simple, obvious and easy to deal with. it keeps our api
implementation simpler and api size smaller.
Post by Andrew Williams
I'll get to the rest later, apologies for the partial reply)
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed answering. As I
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of
concerns.
Post by Andrew Williams
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then you're
going to REALLY annoy a lot of people used to inlining their metadata. dave is
the counter example i am pointing at (and i bet you there are many more like
him).
i remember at e dev day we specifically skipped popularity with "we have no
info on what people prefer and are not doing some popularity poll here" or
words to that effect. so the jury is still out on what people actually prefer.
i know what you prefer. i have heard what some others prefer. if its 55v45 in
favour of plain text + api's to define format regions/nodes i still say "stick
to markup as it will make a transition easier". if it's 80v20 in favour of
plain then move, but you need some way to provide inlined format handling to
express a string of text WITH formatting embedded (ie markup). what you are
presenting is a fait accompli that has clearly said "ignoring the data
- making this decision anyway".
and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text versions
given your design. the way we do it now is when going from markup (all data
there) to plain - we just drop all the markup on the floor and convert a very
tags (<br> for example) and vice-versa.
when your metadata is out-of-band like proposed you have to now have markup
versions of every plain text api version on anything because dealing with
formatting requires more calls to go query the formatting info separately to
the text and it can't just be done in a "simple wrapper that converts a
string" because you are not just stripping out data from a full data set, but
having to do multiple api's to query and rebuild it and vice-versa. the
proposal for strings is to make them very very very dumb (plain text) by
default and that is highly problematic from a technical point of view.
popularity is totally unknown at this point, so just assuming its 50v50,
choosing the path with far more technical issues at the api level is a bad
choice, and plain text is just that.
you can't separate out the choice of markup or not from designing the api.
doing markup by default is "we choose to lose NO information by default and
have all of it there and provide you with helpers to drop info not needed or
used". choosing plain text by default is "we already lost all the info - you
have to add it back with more api's by querying or providing it". if you
provide markup versions of every text api then this would be dealt with BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't just provide
a simple "degrade it to plain text" helper (or promote to markup) like we do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are reported
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am pointing out
because it downgrades the information passed in and out BY DEFAULT (plain text
is downgraded vs markup). you will have issues EITHER way. plain text is not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where \n means
go down 1 line and move cursor to left (or right) edge, char values > 127 e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8 ... it's
ALWAYS encoded). markup is just an extended form of encoding on top of this.
and functions/helpers were provided to do this conversion. it's not being
dismissed. far from it - it was already envisaged and addressed. maybe the
helpers could now use eina_slstr to avoid needing to free strings afterwards...
but my point is that if the DEFAULT api were to be lossy (plain text) then you
create a huge amount of problems. if it were markup then you'd have far fewer
problems and just need the kind of convert funcs as we already have. that or
having to provide markup duplicates api's for every string
get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally a bad path
to go down.
and ALL of this discussion at the technical api level hasn't even got the info
on what people prefer to be the default. to get a good feel for this... you
NEED to give them some options on what to choose and thus design api's to
handle all cases and propose something and see that it actually can handle
them... then find out what people think then about it - the kinds of users who
use the api regularly... THEN make a decision on what should be done. well if
you are planning on changing something AND the change is controversial (which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal with
and decoding is not something that a cost char* text_get api implies.
typedef Elm_Markup char;
Elm_Markup *elm_object_text_get(Evas_object *obj);
though it'd be a lie because some widgets dont do markup... but entry and label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).
we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we
have
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion
to the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list was for visibility and a chance to comment for anyone who was
not
Post by Andrew Williams
Post by Andrew Williams
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has
led to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
confusion and time wasting.
There is a question in here about general API design that I will
start
Post by Andrew Williams
Post by Andrew Williams
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on
this
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup
model,
Post by Andrew Williams
Post by Andrew Williams
so for now I vote for keeping the legacy behavior also on the new EO
api.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the
past.
Post by Andrew Williams
Post by Andrew Williams
If
Post by Andrew Williams
that is not true then we will really struggle to make quality
bindings to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
higher level languages (in this context the difference between plain
text
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new Eo
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
based text APIs
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Andrew Williams
Post by Andrew Williams
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Andrew Williams
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting -
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Andrew Williams
Post by Andrew Williams
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way to
Post by Andrew Williams
Post by Andrew Williams
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in
a
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Andrew Williams
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget
Post by Andrew Williams
Post by Andrew Williams
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear :(
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions
Post by Andrew Williams
Post by Andrew Williams
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Andrew Williams
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net and
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should
Post by Andrew Williams
Post by Andrew Williams
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
Andrew Williams
2017-07-14 12:28:08 UTC
Permalink
Hi,

That sounds excellent. I like the idea of markup handling being separate
but just as convenient as before. The more we can split out the logo from
widgets the more testable our apis will be as well.

Thanks,
Andy
Post by Daniel Hirt
Hello all,
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
Unfortunately I don't have time to reply to all of these thoughts right
now
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
but I wanted to reply to the first one before any more replies arrive.
I am
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
not (and nether is anyone else) suggesting that we remove markup
support.
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Please stop implying that.
i have clearly listed options on how to do it as an api. ONE of those
options
Post by Carsten Haitzler (The Rasterman)
is no markup in text_set etc. and HELPERS indstead that would convert
from
Post by Carsten Haitzler (The Rasterman)
makrup to plain text PLUS call the metadata api's to set metadata
correctly.
Post by Carsten Haitzler (The Rasterman)
you double up on your api's and the markup ones are built on top of the
plain
Post by Carsten Haitzler (The Rasterman)
text + metadata ones. i have been VERY clear on that. i have been
EXPLICITLY
Post by Carsten Haitzler (The Rasterman)
discussing the problems with this path.
you could implement both WITHOUT the markup being wrappers (and now have
to
Post by Carsten Haitzler (The Rasterman)
support both as native internal paths). from an api view it loosk the
same,
Post by Carsten Haitzler (The Rasterman)
internally it look different.
1. You offload the parsing logic to another source (as it should, it has
little to do with the current implementation of formats/annotations).
2. You don't repeat your logic - less to maintain. By making things use
"annotation" API, whether you want to use a markup or just the
annotation API, you maintain only the annotation code (in most cases, as
markup logic is only a wrapper).
Post by Carsten Haitzler (The Rasterman)
an options was dave's "set a mode (markup or plain)"" method which cuts
down
Post by Carsten Haitzler (The Rasterman)
our api's again to something nice BUT means we always have to switch to a
specific mode then back to where it was each time.
I would rather not do that. Setting "modes" is kind of unpleasant.
Post by Carsten Haitzler (The Rasterman)
other methods were provide text format as a parameter with the string,
provide
Post by Carsten Haitzler (The Rasterman)
it as special chars at the start of the string as a format header, and
you
Post by Carsten Haitzler (The Rasterman)
propose having special string objects vaguely (i havent gotten something
clear
Post by Carsten Haitzler (The Rasterman)
on it yet), and i think this is probably worse as you have to create
string
Post by Carsten Haitzler (The Rasterman)
object from markup string, then set/provide string object to label/entry
object, and the reverse (to get text, get string obj, then get string
from
Post by Carsten Haitzler (The Rasterman)
string obj etc.). this double-object thing IMHO would make the api even
worse
Post by Carsten Haitzler (The Rasterman)
to use than any of the other options.
imho the simplest option is pick one encoding only and provide
obj.text_set(to_markup("Hello\nWorld"));
text = to_plain(obj.text_get());
ALL you need to know is it's markup by default. this means all the
string query
Post by Carsten Haitzler (The Rasterman)
and manipulation funcs only need a single markup version at the api
since you
Post by Carsten Haitzler (The Rasterman)
lose no information.
Not all usages of text require markup. SOME (even a lot) want it, but
not all.
The question is: can we allow having two different interpretations for
"Efl.Text.text" property?
My answer is "no". We should stick to it being a plain text.
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Also my email was about api and not about internal storage. If you want
to
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
handle everything internally in some encoded form fine - just don't push
that choice on users of what looks like a text api. Supporting both
plain
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
text and markuped text models does not mean lowest common denominator
internally.
i am not talking about internal encoding at all. ONLY talking about api.
i was
Post by Carsten Haitzler (The Rasterman)
saying that IF the "native model" for api is not markup (all data inline
in the
Post by Carsten Haitzler (The Rasterman)
blob of text) and has to be dealt with by various api's defining content
then
Post by Carsten Haitzler (The Rasterman)
defining format ranges (char 13 to 67 is "bold", at char 16 insert image
item
Post by Carsten Haitzler (The Rasterman)
"bob.jpg", etc. for example). then the markup api's will be build AROUND
this
Post by Carsten Haitzler (The Rasterman)
and that makes them complex internally. you also double up on your api's
-
Post by Carsten Haitzler (The Rasterman)
having markup versions for every plain text version. this is not a great
thing.
Post by Carsten Haitzler (The Rasterman)
this morning i just personally spoke to 2 developers in the office and
the BOTH
Post by Carsten Haitzler (The Rasterman)
were: "markup is great. we like it. everyone i know of liked it and had
no
Post by Carsten Haitzler (The Rasterman)
issues with elm_entry being markup by default - they liked it". these
people have interacted with dozens of developers using these api's...
their
Post by Carsten Haitzler (The Rasterman)
experience is the polar opposite of yours. they had zero issues in
dealing with
Post by Carsten Haitzler (The Rasterman)
markup by default. i'm warning - change defaults and a silent happy
large group
Post by Carsten Haitzler (The Rasterman)
become noisy and unhappy.
Markup is staying. The developer will just need to use
"efl_text_markup_set/insert", instead.
Using a different name shouldn't upset anyone, unless I am missing
something?
Also, I am writing the "Efl.Markup" mixin, that will use the annotation
API, right now.
Just letting you know.
-- herdsman.
Post by Carsten Haitzler (The Rasterman)
before jumping into "the decision is made, but we have no numbers on
what is
Post by Carsten Haitzler (The Rasterman)
popular" ... get some data on that first. i suspect you may be surprised
at how
Post by Carsten Haitzler (The Rasterman)
many people find markup simple, obvious and easy to deal with. it keeps
our api
Post by Carsten Haitzler (The Rasterman)
implementation simpler and api size smaller.
Post by Andrew Williams
I'll get to the rest later, apologies for the partial reply)
Andy
On Tue, 04 Jul 2017 18:50:34 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed answering.
As I
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of
concerns.
Post by Andrew Williams
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then
you're
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
going to REALLY annoy a lot of people used to inlining their metadata. dave is
the counter example i am pointing at (and i bet you there are many more like
him).
i remember at e dev day we specifically skipped popularity with "we
have no
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
info on what people prefer and are not doing some popularity poll
here" or
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
words to that effect. so the jury is still out on what people actually prefer.
i know what you prefer. i have heard what some others prefer. if its
55v45
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
in
favour of plain text + api's to define format regions/nodes i still say "stick
to markup as it will make a transition easier". if it's 80v20 in
favour of
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
plain then move, but you need some way to provide inlined format
handling
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
to
express a string of text WITH formatting embedded (ie markup). what
you are
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
presenting is a fait accompli that has clearly said "ignoring the data
- making this decision anyway".
and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text
versions
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
given your design. the way we do it now is when going from markup (all
data
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
there) to plain - we just drop all the markup on the floor and convert
a
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
very
tags (<br> for example) and vice-versa.
when your metadata is out-of-band like proposed you have to now have
markup
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
versions of every plain text api version on anything because dealing
with
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
formatting requires more calls to go query the formatting info
separately
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
to
the text and it can't just be done in a "simple wrapper that converts a
string" because you are not just stripping out data from a full data
set,
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
but
having to do multiple api's to query and rebuild it and vice-versa. the
proposal for strings is to make them very very very dumb (plain text)
by
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
default and that is highly problematic from a technical point of view.
popularity is totally unknown at this point, so just assuming its
50v50,
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
choosing the path with far more technical issues at the api level is a
bad
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
choice, and plain text is just that.
you can't separate out the choice of markup or not from designing the
api.
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
doing markup by default is "we choose to lose NO information by
default and
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
have all of it there and provide you with helpers to drop info not
needed
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
or
used". choosing plain text by default is "we already lost all the info
-
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
you
have to add it back with more api's by querying or providing it". if
you
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
provide markup versions of every text api then this would be dealt with BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't just provide
a simple "degrade it to plain text" helper (or promote to markup) like
we
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are
reported
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am
pointing
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
out
because it downgrades the information passed in and out BY DEFAULT
(plain
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
text
is downgraded vs markup). you will have issues EITHER way. plain text
is
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where \n means
go down 1 line and move cursor to left (or right) edge, char values >
127
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8 ... it's
ALWAYS encoded). markup is just an extended form of encoding on top of this.
and functions/helpers were provided to do this conversion. it's not
being
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
dismissed. far from it - it was already envisaged and addressed. maybe
the
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
helpers could now use eina_slstr to avoid needing to free strings afterwards...
but my point is that if the DEFAULT api were to be lossy (plain text)
then
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
you
create a huge amount of problems. if it were markup then you'd have far fewer
problems and just need the kind of convert funcs as we already have.
that
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
or
having to provide markup duplicates api's for every string
get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally a
bad
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
path
to go down.
and ALL of this discussion at the technical api level hasn't even got
the
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
info
on what people prefer to be the default. to get a good feel for
this... you
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
NEED to give them some options on what to choose and thus design api's
to
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
handle all cases and propose something and see that it actually can
handle
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
them... then find out what people think then about it - the kinds of
users
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
who
use the api regularly... THEN make a decision on what should be done.
well
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
if
you are planning on changing something AND the change is controversial (which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal
with
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
and decoding is not something that a cost char* text_get api implies.
the documentation clearly says otherwise. if it makes you feel better
we
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
typedef Elm_Markup char;
Elm_Markup *elm_object_text_get(Evas_object *obj);
though it'd be a lie because some widgets dont do markup... but entry
and
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).
we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we
have
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion
to the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list was for visibility and a chance to comment for anyone who was
not
Post by Andrew Williams
Post by Andrew Williams
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same
points
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
brought forward that were already discussed at the event which has
led to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
confusion and time wasting.
There is a question in here about general API design that I will
start
Post by Andrew Williams
Post by Andrew Williams
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on
this
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup
model,
Post by Andrew Williams
Post by Andrew Williams
so for now I vote for keeping the legacy behavior also on the new EO
api.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to
be
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
better going forward and not to be shackled by our choices of the
past.
Post by Andrew Williams
Post by Andrew Williams
If
Post by Andrew Williams
that is not true then we will really struggle to make quality
bindings to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
higher level languages (in this context the difference between plain
text
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new Eo
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
based text APIs
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Andrew Williams
Post by Andrew Williams
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Andrew Williams
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting -
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Andrew Williams
Post by Andrew Williams
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way to
Post by Andrew Williams
Post by Andrew Williams
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in
a
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Andrew Williams
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget
Post by Andrew Williams
Post by Andrew Williams
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear :(
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions
Post by Andrew Williams
Post by Andrew Williams
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Andrew Williams
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net and
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should
Post by Andrew Williams
Post by Andrew Williams
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Carsten Haitzler (The Rasterman)
2017-07-17 06:52:31 UTC
Permalink
Post by Daniel Hirt
Hello all,
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Hi,
Unfortunately I don't have time to reply to all of these thoughts right now
but I wanted to reply to the first one before any more replies arrive. I am
not (and nether is anyone else) suggesting that we remove markup support.
Please stop implying that.
i have clearly listed options on how to do it as an api. ONE of those
options is no markup in text_set etc. and HELPERS indstead that would
convert from makrup to plain text PLUS call the metadata api's to set
metadata correctly. you double up on your api's and the markup ones are
built on top of the plain text + metadata ones. i have been VERY clear on
that. i have been EXPLICITLY discussing the problems with this path.
you could implement both WITHOUT the markup being wrappers (and now have to
support both as native internal paths). from an api view it loosk the same,
internally it look different.
1. You offload the parsing logic to another source (as it should, it has
little to do with the current implementation of formats/annotations).
2. You don't repeat your logic - less to maintain. By making things use
"annotation" API, whether you want to use a markup or just the
annotation API, you maintain only the annotation code (in most cases, as
markup logic is only a wrapper).
Post by Carsten Haitzler (The Rasterman)
an options was dave's "set a mode (markup or plain)"" method which cuts down
our api's again to something nice BUT means we always have to switch to a
specific mode then back to where it was each time.
I would rather not do that. Setting "modes" is kind of unpleasant.
Post by Carsten Haitzler (The Rasterman)
other methods were provide text format as a parameter with the string,
provide it as special chars at the start of the string as a format header,
and you propose having special string objects vaguely (i havent gotten
something clear on it yet), and i think this is probably worse as you have
to create string object from markup string, then set/provide string object
to label/entry object, and the reverse (to get text, get string obj, then
get string from string obj etc.). this double-object thing IMHO would make
the api even worse to use than any of the other options.
obj.text_set(to_markup("Hello\nWorld"));
text = to_plain(obj.text_get());
ALL you need to know is it's markup by default. this means all the string
query and manipulation funcs only need a single markup version at the api
since you lose no information.
Not all usages of text require markup. SOME (even a lot) want it, but
not all.
The question is: can we allow having two different interpretations for
"Efl.Text.text" property?
My answer is "no". We should stick to it being a plain text.
Post by Carsten Haitzler (The Rasterman)
Post by Andrew Williams
Also my email was about api and not about internal storage. If you want to
handle everything internally in some encoded form fine - just don't push
that choice on users of what looks like a text api. Supporting both plain
text and markuped text models does not mean lowest common denominator
internally.
i am not talking about internal encoding at all. ONLY talking about api. i
was saying that IF the "native model" for api is not markup (all data
inline in the blob of text) and has to be dealt with by various api's
defining content then defining format ranges (char 13 to 67 is "bold", at
char 16 insert image item "bob.jpg", etc. for example). then the markup
api's will be build AROUND this and that makes them complex internally. you
also double up on your api's - having markup versions for every plain text
version. this is not a great thing.
this morning i just personally spoke to 2 developers in the office and the
BOTH were: "markup is great. we like it. everyone i know of liked it and
had no issues with elm_entry being markup by default - they liked it". these
people have interacted with dozens of developers using these api's... their
experience is the polar opposite of yours. they had zero issues in dealing
with markup by default. i'm warning - change defaults and a silent happy
large group become noisy and unhappy.
Markup is staying. The developer will just need to use
"efl_text_markup_set/insert", instead.
Using a different name shouldn't upset anyone, unless I am missing
something?
that was my point way way way up in the thread. if you want to do this way you
need plain text AND markup versions of every api that deals with text on a
window.

text_get()
text_cursor_range_get()
text_set()
text_cursor_range_replace()
text_cursor_prepend()
text_cursor_append()
text_prepend()
text_append()

for example. now you need a markup version of every one of these:

markup_get()
markup_cursor_range_get()
markup_set()
markup_cursor_range_replace()
markup_cursor_prepend()
markup_cursor_append()
markup_prepend()
markup_append()

having 2x the api's to do this isn't nice either. the default not doing markup
also is likely to cause issues as i have mentioned... there will be
expectations of it doing markup when it now doesn't. the happy existing users
of the api for example.
Post by Daniel Hirt
Also, I am writing the "Efl.Markup" mixin, that will use the annotation
API, right now.
Just letting you know.
-- herdsman.
Post by Carsten Haitzler (The Rasterman)
before jumping into "the decision is made, but we have no numbers on what is
popular" ... get some data on that first. i suspect you may be surprised at
how many people find markup simple, obvious and easy to deal with. it keeps
our api implementation simpler and api size smaller.
Post by Andrew Williams
I'll get to the rest later, apologies for the partial reply)
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed answering. As I
moved in to discuss if we are worrying about text manipulation in our
widgets then we probably have bigger issues around separation of
concerns.
Post by Andrew Williams
Our text handling apis should worry about that - and the widget have a
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then you're
going to REALLY annoy a lot of people used to inlining their metadata. dave is
the counter example i am pointing at (and i bet you there are many more like
him).
i remember at e dev day we specifically skipped popularity with "we have
no info on what people prefer and are not doing some popularity poll
here" or words to that effect. so the jury is still out on what people
actually prefer.
i know what you prefer. i have heard what some others prefer. if its 55v45 in
favour of plain text + api's to define format regions/nodes i still say "stick
to markup as it will make a transition easier". if it's 80v20 in favour of
plain then move, but you need some way to provide inlined format handling to
express a string of text WITH formatting embedded (ie markup). what you
are presenting is a fait accompli that has clearly said "ignoring the data
- making this decision anyway".
and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text versions
given your design. the way we do it now is when going from markup (all
data there) to plain - we just drop all the markup on the floor and
convert a very
tags (<br> for example) and vice-versa.
when your metadata is out-of-band like proposed you have to now have
markup versions of every plain text api version on anything because
dealing with formatting requires more calls to go query the formatting
info separately to
the text and it can't just be done in a "simple wrapper that converts a
string" because you are not just stripping out data from a full data set, but
having to do multiple api's to query and rebuild it and vice-versa. the
proposal for strings is to make them very very very dumb (plain text) by
default and that is highly problematic from a technical point of view.
popularity is totally unknown at this point, so just assuming its 50v50,
choosing the path with far more technical issues at the api level is a bad
choice, and plain text is just that.
you can't separate out the choice of markup or not from designing the api.
doing markup by default is "we choose to lose NO information by default
and have all of it there and provide you with helpers to drop info not
needed or
used". choosing plain text by default is "we already lost all the info - you
have to add it back with more api's by querying or providing it". if you
provide markup versions of every text api then this would be dealt with BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't just provide
a simple "degrade it to plain text" helper (or promote to markup) like we do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is, but I
don't think that is reason enough to dismiss the issues that are reported
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am pointing out
because it downgrades the information passed in and out BY DEFAULT (plain text
is downgraded vs markup). you will have issues EITHER way. plain text is not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where \n means
go down 1 line and move cursor to left (or right) edge, char values > 127 e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8 ... it's
ALWAYS encoded). markup is just an extended form of encoding on top of this.
and functions/helpers were provided to do this conversion. it's not being
dismissed. far from it - it was already envisaged and addressed. maybe the
helpers could now use eina_slstr to avoid needing to free strings afterwards...
but my point is that if the DEFAULT api were to be lossy (plain text) then you
create a huge amount of problems. if it were markup then you'd have far fewer
problems and just need the kind of convert funcs as we already have. that or
having to provide markup duplicates api's for every string
get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally a bad path
to go down.
and ALL of this discussion at the technical api level hasn't even got the info
on what people prefer to be the default. to get a good feel for this...
you NEED to give them some options on what to choose and thus design
api's to handle all cases and propose something and see that it actually
can handle them... then find out what people think then about it - the
kinds of users who
use the api regularly... THEN make a decision on what should be done. well if
you are planning on changing something AND the change is controversial (which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal with
and decoding is not something that a cost char* text_get api implies.
typedef Elm_Markup char;
Elm_Markup *elm_object_text_get(Evas_object *obj);
though it'd be a lie because some widgets dont do markup... but entry and label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).
we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we
have
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just spent a bunch of time revisiting a discussion that had clearly
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion
to the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list was for visibility and a chance to comment for anyone who was
not
Post by Andrew Williams
Post by Andrew Williams
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same points
brought forward that were already discussed at the event which has
led to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
confusion and time wasting.
There is a question in here about general API design that I will
start
Post by Andrew Williams
Post by Andrew Williams
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone on
this
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list (except raster as Tizen developer proxy) who disagrees with the
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation? (text_set,
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup
model,
Post by Andrew Williams
Post by Andrew Williams
so for now I vote for keeping the legacy behavior also on the new EO
api.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
I understand that this could be conceived as a massive change but my
understanding was that the Eo API was a chance to fix things up to be
better going forward and not to be shackled by our choices of the
past.
Post by Andrew Williams
Post by Andrew Williams
If
Post by Andrew Williams
that is not true then we will really struggle to make quality
bindings to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
higher level languages (in this context the difference between plain
text
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and markedup/parameterised text and also the tight coupling of text
handling and the rendering).
Thanks
Andy
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it or
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new Eo
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
based text APIs
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Andrew Williams
Post by Andrew Williams
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Andrew Williams
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting -
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Andrew Williams
Post by Andrew Williams
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way to
Post by Andrew Williams
Post by Andrew Williams
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in
a
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Andrew Williams
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget
Post by Andrew Williams
Post by Andrew Williams
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear :(
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions
Post by Andrew Williams
Post by Andrew Williams
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Andrew Williams
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net and
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should
Post by Andrew Williams
Post by Andrew Williams
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ***@rasterman.com
Andrew Williams
2017-07-17 12:23:57 UTC
Permalink
Hi,

Whilst more API may seem counterintuitive I am a proponent of each method
does 1 thing well.
Therefore if we want to handle markup and handle plain text then a 2* API
count actually makes sense.

Andy
Post by Carsten Haitzler (The Rasterman)
Post by Daniel Hirt
Hello all,
On Wed, 05 Jul 2017 03:26:09 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
Unfortunately I don't have time to reply to all of these thoughts
right now
Post by Daniel Hirt
Post by Andrew Williams
but I wanted to reply to the first one before any more replies
arrive. I am
Post by Daniel Hirt
Post by Andrew Williams
not (and nether is anyone else) suggesting that we remove markup
support.
Post by Daniel Hirt
Post by Andrew Williams
Please stop implying that.
i have clearly listed options on how to do it as an api. ONE of those
options is no markup in text_set etc. and HELPERS indstead that would
convert from makrup to plain text PLUS call the metadata api's to set
metadata correctly. you double up on your api's and the markup ones are
built on top of the plain text + metadata ones. i have been VERY clear
on
Post by Daniel Hirt
that. i have been EXPLICITLY discussing the problems with this path.
you could implement both WITHOUT the markup being wrappers (and now
have to
Post by Daniel Hirt
support both as native internal paths). from an api view it loosk the
same,
Post by Daniel Hirt
internally it look different.
1. You offload the parsing logic to another source (as it should, it has
little to do with the current implementation of formats/annotations).
2. You don't repeat your logic - less to maintain. By making things use
"annotation" API, whether you want to use a markup or just the
annotation API, you maintain only the annotation code (in most cases, as
markup logic is only a wrapper).
an options was dave's "set a mode (markup or plain)"" method which
cuts down
Post by Daniel Hirt
our api's again to something nice BUT means we always have to switch
to a
Post by Daniel Hirt
specific mode then back to where it was each time.
I would rather not do that. Setting "modes" is kind of unpleasant.
other methods were provide text format as a parameter with the string,
provide it as special chars at the start of the string as a format
header,
Post by Daniel Hirt
and you propose having special string objects vaguely (i havent gotten
something clear on it yet), and i think this is probably worse as you
have
Post by Daniel Hirt
to create string object from markup string, then set/provide string
object
Post by Daniel Hirt
to label/entry object, and the reverse (to get text, get string obj,
then
Post by Daniel Hirt
get string from string obj etc.). this double-object thing IMHO would
make
Post by Daniel Hirt
the api even worse to use than any of the other options.
imho the simplest option is pick one encoding only and provide
converters
Post by Daniel Hirt
obj.text_set(to_markup("Hello\nWorld"));
text = to_plain(obj.text_get());
ALL you need to know is it's markup by default. this means all the
string
Post by Daniel Hirt
query and manipulation funcs only need a single markup version at the
api
Post by Daniel Hirt
since you lose no information.
Not all usages of text require markup. SOME (even a lot) want it, but
not all.
The question is: can we allow having two different interpretations for
"Efl.Text.text" property?
My answer is "no". We should stick to it being a plain text.
Post by Andrew Williams
Also my email was about api and not about internal storage. If you
want to
Post by Daniel Hirt
Post by Andrew Williams
handle everything internally in some encoded form fine - just don't
push
Post by Daniel Hirt
Post by Andrew Williams
that choice on users of what looks like a text api. Supporting both
plain
Post by Daniel Hirt
Post by Andrew Williams
text and markuped text models does not mean lowest common denominator
internally.
i am not talking about internal encoding at all. ONLY talking about
api. i
Post by Daniel Hirt
was saying that IF the "native model" for api is not markup (all data
inline in the blob of text) and has to be dealt with by various api's
defining content then defining format ranges (char 13 to 67 is "bold",
at
Post by Daniel Hirt
char 16 insert image item "bob.jpg", etc. for example). then the markup
api's will be build AROUND this and that makes them complex
internally. you
Post by Daniel Hirt
also double up on your api's - having markup versions for every plain
text
Post by Daniel Hirt
version. this is not a great thing.
this morning i just personally spoke to 2 developers in the office and
the
Post by Daniel Hirt
BOTH were: "markup is great. we like it. everyone i know of liked it
and
Post by Daniel Hirt
had no issues with elm_entry being markup by default - they liked it".
these
Post by Daniel Hirt
people have interacted with dozens of developers using these api's...
their
Post by Daniel Hirt
experience is the polar opposite of yours. they had zero issues in
dealing
Post by Daniel Hirt
with markup by default. i'm warning - change defaults and a silent
happy
Post by Daniel Hirt
large group become noisy and unhappy.
Markup is staying. The developer will just need to use
"efl_text_markup_set/insert", instead.
Using a different name shouldn't upset anyone, unless I am missing
something?
that was my point way way way up in the thread. if you want to do this way you
need plain text AND markup versions of every api that deals with text on a
window.
text_get()
text_cursor_range_get()
text_set()
text_cursor_range_replace()
text_cursor_prepend()
text_cursor_append()
text_prepend()
text_append()
markup_get()
markup_cursor_range_get()
markup_set()
markup_cursor_range_replace()
markup_cursor_prepend()
markup_cursor_append()
markup_prepend()
markup_append()
having 2x the api's to do this isn't nice either. the default not doing markup
also is likely to cause issues as i have mentioned... there will be
expectations of it doing markup when it now doesn't. the happy existing users
of the api for example.
Post by Daniel Hirt
Also, I am writing the "Efl.Markup" mixin, that will use the annotation
API, right now.
Just letting you know.
-- herdsman.
before jumping into "the decision is made, but we have no numbers on
what is
Post by Daniel Hirt
popular" ... get some data on that first. i suspect you may be
surprised at
Post by Daniel Hirt
how many people find markup simple, obvious and easy to deal with. it
keeps
Post by Daniel Hirt
our api implementation simpler and api size smaller.
Post by Andrew Williams
I'll get to the rest later, apologies for the partial reply)
Andy
On Tue, 04 Jul 2017 18:50:34 +0000 Andrew Williams <
Post by Andrew Williams
Hi,
Apologies I did not realise it was a question that needed
answering. As I
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
moved in to discuss if we are worrying about text manipulation in
our
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
widgets then we probably have bigger issues around separation of
concerns.
Post by Andrew Williams
Our text handling apis should worry about that - and the widget
have a
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
simple way to bind to a text model or have the resulting text set.
it's part of the concerns. if you want to drop markup entirely then
you're
Post by Daniel Hirt
Post by Andrew Williams
going to REALLY annoy a lot of people used to inlining their
metadata.
Post by Daniel Hirt
Post by Andrew Williams
dave is
the counter example i am pointing at (and i bet you there are many
more
Post by Daniel Hirt
Post by Andrew Williams
like
him).
i remember at e dev day we specifically skipped popularity with "we
have
Post by Daniel Hirt
Post by Andrew Williams
no info on what people prefer and are not doing some popularity poll
here" or words to that effect. so the jury is still out on what
people
Post by Daniel Hirt
Post by Andrew Williams
actually prefer.
i know what you prefer. i have heard what some others prefer. if its
55v45
Post by Daniel Hirt
Post by Andrew Williams
in
favour of plain text + api's to define format regions/nodes i still
say
Post by Daniel Hirt
Post by Andrew Williams
"stick
to markup as it will make a transition easier". if it's 80v20 in
favour of
Post by Daniel Hirt
Post by Andrew Williams
plain then move, but you need some way to provide inlined format
handling
Post by Daniel Hirt
Post by Andrew Williams
to
express a string of text WITH formatting embedded (ie markup). what
you
Post by Daniel Hirt
Post by Andrew Williams
are presenting is a fait accompli that has clearly said "ignoring
the data
Post by Daniel Hirt
Post by Andrew Williams
- making this decision anyway".
and to do that then you would need to provide api's that set/get (and otherwise
manipulate and query) that do both markup versions AND plain text
versions
Post by Daniel Hirt
Post by Andrew Williams
given your design. the way we do it now is when going from markup
(all
Post by Daniel Hirt
Post by Andrew Williams
data there) to plain - we just drop all the markup on the floor and
convert a very
tags (<br> for example) and vice-versa.
when your metadata is out-of-band like proposed you have to now have
markup versions of every plain text api version on anything because
dealing with formatting requires more calls to go query the
formatting
Post by Daniel Hirt
Post by Andrew Williams
info separately to
the text and it can't just be done in a "simple wrapper that
converts a
Post by Daniel Hirt
Post by Andrew Williams
string" because you are not just stripping out data from a full data
set,
Post by Daniel Hirt
Post by Andrew Williams
but
having to do multiple api's to query and rebuild it and vice-versa.
the
Post by Daniel Hirt
Post by Andrew Williams
proposal for strings is to make them very very very dumb (plain
text) by
Post by Daniel Hirt
Post by Andrew Williams
default and that is highly problematic from a technical point of
view.
Post by Daniel Hirt
Post by Andrew Williams
popularity is totally unknown at this point, so just assuming its
50v50,
Post by Daniel Hirt
Post by Andrew Williams
choosing the path with far more technical issues at the api level is
a bad
Post by Daniel Hirt
Post by Andrew Williams
choice, and plain text is just that.
you can't separate out the choice of markup or not from designing
the api.
Post by Daniel Hirt
Post by Andrew Williams
doing markup by default is "we choose to lose NO information by
default
Post by Daniel Hirt
Post by Andrew Williams
and have all of it there and provide you with helpers to drop info
not
Post by Daniel Hirt
Post by Andrew Williams
needed or
used". choosing plain text by default is "we already lost all the
info -
Post by Daniel Hirt
Post by Andrew Williams
you
have to add it back with more api's by querying or providing it". if
you
Post by Daniel Hirt
Post by Andrew Williams
provide markup versions of every text api then this would be dealt
with
Post by Daniel Hirt
Post by Andrew Williams
BUT it
leads to doubling up of every text api that manipulates or queries a string and
that is not exactly wonderful. unlike markup by default, you can't
just
Post by Daniel Hirt
Post by Andrew Williams
provide
a simple "degrade it to plain text" helper (or promote to markup)
like we
Post by Daniel Hirt
Post by Andrew Williams
do
now. you have to have the full set doubled up.
Post by Andrew Williams
I appreciate that people have not had issues with the way it is,
but I
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
don't think that is reason enough to dismiss the issues that are
reported
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
or the confusion created... (I reference back to user enters 2>3 but
and removing markup by default creates other problems which i am
pointing
Post by Daniel Hirt
Post by Andrew Williams
out
because it downgrades the information passed in and out BY DEFAULT
(plain
Post by Daniel Hirt
Post by Andrew Williams
text
is downgraded vs markup). you will have issues EITHER way. plain
text is
Post by Daniel Hirt
Post by Andrew Williams
not
magically so much better than markup. it switches a different base assumption
on the text encoding (text is always encoded. UTF-8 plain text where
\n
Post by Daniel Hirt
Post by Andrew Williams
means
go down 1 line and move cursor to left (or right) edge, char values
127
Post by Andrew Williams
e.g.
even for latin-1 are encoded with multiple byte sequences ala UTF-8
...
Post by Daniel Hirt
Post by Andrew Williams
it's
ALWAYS encoded). markup is just an extended form of encoding on top
of
Post by Daniel Hirt
Post by Andrew Williams
this.
and functions/helpers were provided to do this conversion. it's not
being
Post by Daniel Hirt
Post by Andrew Williams
dismissed. far from it - it was already envisaged and addressed.
maybe the
Post by Daniel Hirt
Post by Andrew Williams
helpers could now use eina_slstr to avoid needing to free strings afterwards...
but my point is that if the DEFAULT api were to be lossy (plain
text) then
Post by Daniel Hirt
Post by Andrew Williams
you
create a huge amount of problems. if it were markup then you'd have
far
Post by Daniel Hirt
Post by Andrew Williams
fewer
problems and just need the kind of convert funcs as we already have.
that
Post by Daniel Hirt
Post by Andrew Williams
or
having to provide markup duplicates api's for every string get/set/insert/fetch
substring etc. and from api size/complexity duplicating is generally
a bad
Post by Daniel Hirt
Post by Andrew Williams
path
to go down.
and ALL of this discussion at the technical api level hasn't even
got the
Post by Daniel Hirt
Post by Andrew Williams
info
on what people prefer to be the default. to get a good feel for
this...
Post by Daniel Hirt
Post by Andrew Williams
you NEED to give them some options on what to choose and thus design
api's to handle all cases and propose something and see that it
actually
Post by Daniel Hirt
Post by Andrew Williams
can handle them... then find out what people think then about it -
the
Post by Daniel Hirt
Post by Andrew Williams
kinds of users who
use the api regularly... THEN make a decision on what should be
done. well
Post by Daniel Hirt
Post by Andrew Williams
if
you are planning on changing something AND the change is
controversial
Post by Daniel Hirt
Post by Andrew Williams
(which
it seemingly is).
Post by Andrew Williams
Encoding of text is not something that a widget should have to deal
with
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
and decoding is not something that a cost char* text_get api
implies.
Post by Daniel Hirt
Post by Andrew Williams
the documentation clearly says otherwise. if it makes you feel
better we
Post by Daniel Hirt
Post by Andrew Williams
typedef Elm_Markup char;
Elm_Markup *elm_object_text_get(Evas_object *obj);
though it'd be a lie because some widgets dont do markup... but
entry and
Post by Daniel Hirt
Post by Andrew Williams
label
do ... (and some parts in a layout do do markup if TEXTBLOCK and some don't if
TEXT).
we ALL agree that inconsistency is bad and this should be fixed.
Post by Andrew Williams
Andy
On Tue, 4 Jul 2017 at 13:23, Davide Andreoli <
Post by Andrew Williams
Post by Andrew Williams
Hi,
I jumped back to this email I sent a week ago and realised that we
have
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just spent a bunch of time revisiting a discussion that had
clearly
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
wrapped
Post by Andrew Williams
up at the EDD in Malta. One reason I wanted to post our conclusion
to the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list was for visibility and a chance to comment for anyone who was
not
Post by Andrew Williams
Post by Andrew Williams
able
Post by Andrew Williams
to attend. Unfortunately instead we have had a lot of the same
points
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
brought forward that were already discussed at the event which has
led to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
confusion and time wasting.
There is a question in here about general API design that I will
start
Post by Andrew Williams
Post by Andrew Williams
in a
Post by Andrew Williams
new thread but i want to wrap up this discussion. Is there anyone
on
Post by Daniel Hirt
Post by Andrew Williams
this
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
list (except raster as Tizen developer proxy) who disagrees with
the
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
approach as was laid out in my email of the 29th?
do we will have a markup variant for every text operation?
(text_set,
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text_append, text_insert...etc).
To be honest I never had any issue with the current always-markup
model,
Post by Andrew Williams
Post by Andrew Williams
so for now I vote for keeping the legacy behavior also on the new
EO
Post by Daniel Hirt
Post by Andrew Williams
api.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
I understand that this could be conceived as a massive change but
my
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
understanding was that the Eo API was a chance to fix things up
to be
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
better going forward and not to be shackled by our choices of the
past.
Post by Andrew Williams
Post by Andrew Williams
If
Post by Andrew Williams
that is not true then we will really struggle to make quality
bindings to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
higher level languages (in this context the difference between
plain
Post by Daniel Hirt
Post by Andrew Williams
text
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and markedup/parameterised text and also the tight coupling of
text
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
handling and the rendering).
Thanks
Andy
On Thu, 29 Jun 2017 at 07:13, Andrew Williams <
Post by Andrew Williams
Hi,
* no-one is proposing that we remove the ability to mark up text
through
Post by Andrew Williams
Post by Andrew Williams
the markup format mechanism, it is a great feature
* we cannot make changes to this legacy API as apps depend on it
or
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
have
Post by Andrew Williams
Post by Andrew Williams
adapted to it
* the new textblock API, which is currently plain text only is
being
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
extended with a solid markup API
* The existing markup format will be supported through
_markup_text_set
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
or
Post by Andrew Williams
similar API leaving text_set/get to be plain text only
It was beileved that this would satisfy all requirements whilst
removing
Post by Andrew Williams
Post by Andrew Williams
any confusion about the nature of text encoding when using plain
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
This allows us to take a path-of-least-surprise approach for the
new Eo
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
based text APIs
Thanks everyone for the discussion :)
Andy
On Sat, 24 Jun 2017 at 05:39 Carsten Haitzler <
On Fri, 23 Jun 2017 21:55:14 +0200 Davide Andreoli <
Post by Daniel Hirt
Hi,
On Mon, Jun 19, 2017 at 12:01 PM, Andrew Williams <
Post by Andrew Williams
Hi,
Looking at the tests you point me at - selection (and the
past)
Post by Andrew Williams
Post by Andrew Williams
is
Post by Andrew Williams
a
Post by Andrew Williams
Post by Daniel Hirt
plain
Post by Andrew Williams
text copy with the markup stripped - exactly what I would
expect
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
for
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
text_get - but the current content transformed with the
helper
Post by Andrew Williams
Post by Andrew Williams
will
Post by Andrew Williams
Post by Andrew Williams
not
Post by Daniel Hirt
get
Post by Andrew Williams
you there - there is no built in interpretation of
formatting -
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
rendered understands it.
"elm_entry_selection_get" returns the text in markup format.
The
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
test
Post by Andrew Williams
Post by Daniel Hirt
prints
both types one after another (markup followed by plaintext)
using
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_entry_markup_to_utf8".
It is essential for copy & paste of markup text between two
entry
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
clients,
Post by Daniel Hirt
so the pasted formatting is kept.
Post by Andrew Williams
Overall the implementation feels wrong - supporting markup is
great
Post by Andrew Williams
Post by Andrew Williams
but
Post by Daniel Hirt
Post by Andrew Williams
returning it inline in text_get feels like we are imposing
internal
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
choices
Post by Andrew Williams
on other devs.
I note that the code considers format but only when
interacting
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
files
Post by Andrew Williams
- so I can have plain text files but not plain text input.
Right, it's a feature so you can load plain files. You
specify the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
format
Post by Daniel Hirt
you
want to load (plaintext or markup). But, after the file is
loaded,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it's
Post by Daniel Hirt
discarded.
It's important to point out that because there's an actual
representation
Post by Daniel Hirt
(markup), it's costly to store both plaintext and markup
content
Post by Andrew Williams
Post by Andrew Williams
in
Post by Andrew Williams
Post by Andrew Williams
the
Post by Daniel Hirt
object.
Asking you to convert using "markup_to_utf8" is
understandable, as
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
what
Post by Daniel Hirt
we would actually do internally if we were to add API to get
the
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
text
Post by Andrew Williams
in
Post by Daniel Hirt
plaintext. It's only one function call away, and it's easier
than
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
just add
Post by Daniel Hirt
more
API to the widget. No need for a new function if there's a
way to
Post by Andrew Williams
Post by Andrew Williams
do
Post by Andrew Williams
Post by Andrew Williams
this
Post by Daniel Hirt
already.
Post by Andrew Williams
Lastly the documentation clearly discussed markup capability
but
Post by Andrew Williams
Post by Andrew Williams
it
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
*never*
Post by Andrew Williams
discusses encoding and there is no explicit mention that your
text
Post by Andrew Williams
Post by Andrew Williams
will
Post by Daniel Hirt
be
Post by Andrew Williams
transformed after text_set. If it were then it should be
symmetrically
Post by Daniel Hirt
Post by Andrew Williams
transformed back on text_get - path of least surprise.
Actually, it is not transformed on "text_set". You are
expected to
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
enter a
Post by Daniel Hirt
markup-compatible text. Otherwise you will have the mentioned
special
Post by Andrew Williams
Post by Daniel Hirt
characters (like "<") misinterpreted as markup. You can try
with
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
"elm_object_text_set" on an entry widget.
Post by Andrew Williams
I don't quite understand why we would build formatting in as
mandatory,
Post by Daniel Hirt
Post by Andrew Williams
functionality is great but it should be possible to turn it
off.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Post by Andrew Williams
I agree that people complain when markup is not supported in
a
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
widget but
Post by Daniel Hirt
Post by Andrew Williams
that is the expectation we have set - consistency is very
important
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
indeed
Post by Andrew Williams
and I think we don't have it in this regard.
Additionally I think the markup_to_utf8 methods are
peculiarly
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
named
Post by Andrew Williams
-
Post by Daniel Hirt
they
Post by Andrew Williams
do no character encoding so the usage of utf8 is probably
incorrect...
Post by Daniel Hirt
They're correct. UTF-8 is the standard plaintext encoding. We
support
Post by Andrew Williams
Post by Daniel Hirt
UTF-8,
and provide converters for your convenience. You probably
won't
Post by Andrew Williams
Post by Andrew Williams
need
Post by Andrew Williams
Post by Andrew Williams
those
Post by Daniel Hirt
most
of the time.
Your plaintext is always "encoded", but you probably won't
notice
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
that
Post by Andrew Williams
Post by Daniel Hirt
because
it's backward-compatible with US ASCII (1-byte per character).
Post by Andrew Williams
Andrew
Lastly, I would like to mention "Efl.Ui.Text" - this new
widget
Post by Andrew Williams
Post by Andrew Williams
is a
Post by Andrew Williams
Post by Andrew Williams
part
Post by Daniel Hirt
of a
rework of the Textblock object. It's in BETA stage.
It does what you require: all text input is expected to be
plaintext.
Post by Andrew Williams
Post by Daniel Hirt
There's no
"markup" logic in it. Instead, you format your text by setting
ranges
Post by Andrew Williams
and
Post by Daniel Hirt
calling
functions to apply formatting. Again, markup does not exist in
this
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
object,
What? no more markup support? This is really, really sad to
hear :(
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
i've ben trying to tell people that markup is LESS bad than no
markup
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
(or
Post by Andrew Williams
having to do it via api calls)... but the people giving the
opinions
Post by Andrew Williams
Post by Andrew Williams
on
Post by Andrew Williams
Post by Andrew Williams
this
aren't writing the apps.
maybe you c an convince them.
Post by Daniel Hirt
I'm using markup everywhere in my media center and I'm really
happy
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
with
Post by Andrew Williams
Post by Daniel Hirt
it's usage.
too bad. plain text for you unless you call lots of api calls to
insert
Post by Andrew Williams
Post by Andrew Williams
it tag
by tag. have fun.
Post by Daniel Hirt
http://www.enlightenment.org/ss/e-594d67c3ee4752.10999768.jpg
Look at the the textblock in the lower-right corner,
text = sprintf("<title>%s</> <small>%s</small><br>"
"<small><name>%s</> %s <name>/ %s %s</><br>"
"<views>%s %s</> <name>/</> "
"<likes>%s %s</> <name>/</> "
"<comments>%s %s</></small><br>%s",
video.name, video.duration,
_('user'), video.user,
_('uploaded'), relative_date(video.created_time),
views, ngettext('view', 'views', views),
likes, ngettext('like', 'likes', likes),
comments, ngettext('comment', 'comments', comments),
video.description)
..thats it, and I have those beautiful (theme-able!) formatted
text.
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
Now try to think at the code needed to do the same with the
"new"
Post by Andrew Williams
Post by Andrew Williams
API
Post by Andrew Williams
!!
Post by Andrew Williams
Post by Daniel Hirt
Another insurmountable problem of the API approach: the text in
my
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
example
Post by Daniel Hirt
comes from plugins (the vimeo plugin in this case) that are
separate
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
processes
from the core mediacenter, plugins just fetch datas from the
net and
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
pass
Post by Daniel Hirt
them back to the core. This means that the plugins do not have
access
Post by Andrew Williams
Post by Andrew Williams
to the
Post by Daniel Hirt
textblock API.
https://github.com/DaveMDS/epymc/wiki/Screenshots
I can understand the initial issue Andrew was speaking in this
thread
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
(text_get
is difficult to use). And I agree that the default behavior
should
Post by Andrew Williams
Post by Andrew Williams
be
Post by Andrew Williams
Post by Andrew Williams
plain
Post by Daniel Hirt
text set/get,
text_markup_set(...)
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
To be more clear: loosing the markup ability (in textblock,
buttons,
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Daniel Hirt
any other widget) is a shame, we are loosing IMO the most
powerful
Post by Andrew Williams
Post by Andrew Williams
and
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
useful
feature of textblock in efl.
can be re-added as a module in later stages.
Please, please, please re-added it now, otherwise I will not be
able
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
to
Post by Andrew Williams
Post by Daniel Hirt
port my
applications to the new API, until a "later stage" will
eventually
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
occur.
Post by Daniel Hirt
You can check its current state in "efl ui text" test in
elementary_test.
Post by Daniel Hirt
Feedback
will be very much appreciated.
Hope this answers a few of your questions.
Best,
--
Danny (herdsman) Hirt
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's
most
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Daniel Hirt
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Andrew Williams
Post by Andrew Williams
------------------------------------------------------------
------------------
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
--
http://andywilliams.me
http://ajwillia.ms
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Daniel Hirt
Post by Andrew Williams
Post by Andrew Williams
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am"
--------------
Post by Daniel Hirt
Post by Andrew Williams
--
http://andywilliams.me
http://ajwillia.ms
------------------------------------------------------------------------------
Post by Daniel Hirt
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
http://andywilliams.me
http://ajwillia.ms
Loading...