Hi Alex,

just fixed it, but I read this now. Maybe a solution is between both. I
think:


   - Jewel should has List configured by default to use a IR class
   factory that allows hover/select, since is the most usual.
   - Todo, should change List bead to a class factory that does not allow
   hover/select.

I think this is right to this point.

Now about the renderer itself: I added a new SimpleListItemRenderer that
does not add "ClassSelectorListRuntimeSelectableItemRendererBead", That's
the one to use in Todo example. In TDJ for normal Lists use habitual
ListItemRenderer. Does that make sense?



El jue., 20 feb. 2020 a las 19:25, Alex Harui (<[email protected]>)
escribió:

> These examples weren't in the list of examples on the Ant build so I
> missed them before I pushed.
>
> What is the purpose of the "hoverable" and "selectable" APIs in Jewel?
> The APIs are in the IRuntimeSelectableItemRenderer interface to support
> runtime disabling of selection visuals, but the Jewel examples appear to
> never change those values, so for PAYG reasons, it would be better to
> follow the "has" pattern in the other component sets.
>
> The default IItemRendererClassFactory for that Lists in other component
> sets is set to SelectableItemRendererClassFactory, which adds a Selection
> visuals bead to each ItemRenderer.
> If the desire is to never have selection visuals for a List/Table, then
> that component should use ItemRendererClassFactory instead of
> SelectableItemRendererClassFactory and it won't add a Selection visuals
> bead to each renderer, and you don't have to carry around code like the
> hoverable/selectable APIs to turn off selection visuals.
>
> The defaults.css for Jewel should be using ItemRendererClassFactory in
> places where Selection was being turned off with the old
> hoverable/selectable
>
> That is a good example of how "has" and composition is more PAYG than
> baking in default behavior and turning it off.
>
> If that's the purpose of hoverable/selectable in Jewel, then Jewel's
> ListItemRenderer we should remove the automatic adding of the
> ClassSelectorListRuntimeSelectable bead and update the CSS accordingly.
>
> I have time to make those changes now that I have my Maven working copy
> building.
>
> Let me know,
> -Alex
>
> On 2/20/20, 10:00 AM, "[email protected]" <[email protected]>
> wrote:
>
>     This is an automated email from the ASF dual-hosted git repository.
>
>     carlosrovira pushed a commit to branch develop
>     in repository
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitbox.apache.org%2Frepos%2Fasf%2Froyale-asjs.git&amp;data=02%7C01%7Caharui%40adobe.com%7C015846e7679a404652a208d7b62ebec4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637178184199117053&amp;sdata=PiKV0LSKu3fT2laVPdNJJDViLIVoWSiY743QPsdUAbA%3D&amp;reserved=0
>
>
>     The following commit(s) were added to refs/heads/develop by this push:
>          new 0a5fe59  todomvc-examples: fix compilation, but now renderers
> show hover/selected states
>     0a5fe59 is described below
>
>     commit 0a5fe59d140c7db5dbb6218b5fcc2ea3ba248449
>     Author: Carlos Rovira <[email protected]>
>     AuthorDate: Thu Feb 20 19:00:04 2020 +0100
>
>         todomvc-examples: fix compilation, but now renderers show
> hover/selected states
>     ---
>      .../src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>  | 4 ++--
>      .../src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>  | 4 ++--
>      2 files changed, 4 insertions(+), 4 deletions(-)
>
>     diff --git
> a/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
> b/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>     index 89e3934..596ae88 100644
>     ---
> a/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>     +++
> b/examples/crux/todomvc-jewel-crux/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>     @@ -20,9 +20,9 @@ limitations under the License.
>      <j:ListItemRenderer xmlns:fx="
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&amp;data=02%7C01%7Caharui%40adobe.com%7C015846e7679a404652a208d7b62ebec4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637178184199117053&amp;sdata=j7eSC%2FU9lWMwkLAtHyZ8hjzJdBNVALq6k6AYUYKzo0A%3D&amp;reserved=0";
>
>          xmlns:j="library://ns.apache.org/royale/jewel"
>          xmlns:js="library://ns.apache.org/royale/basic"
>     -    hoverable="false" selectable="false" width="100%"
>          rollOver="rollOverHandler(event)"
>     -    rollOut="rollOutHandler(event)">
>     +    rollOut="rollOutHandler(event)"
>     +    width="100%">
>
>          <fx:Script>
>              <![CDATA[
>     diff --git
> a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
> b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>     index 89e3934..596ae88 100644
>     ---
> a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>     +++
> b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/renderers/TodoItemRenderer.mxml
>     @@ -20,9 +20,9 @@ limitations under the License.
>      <j:ListItemRenderer xmlns:fx="
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&amp;data=02%7C01%7Caharui%40adobe.com%7C015846e7679a404652a208d7b62ebec4%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637178184199117053&amp;sdata=j7eSC%2FU9lWMwkLAtHyZ8hjzJdBNVALq6k6AYUYKzo0A%3D&amp;reserved=0";
>
>          xmlns:j="library://ns.apache.org/royale/jewel"
>          xmlns:js="library://ns.apache.org/royale/basic"
>     -    hoverable="false" selectable="false" width="100%"
>          rollOver="rollOverHandler(event)"
>     -    rollOut="rollOutHandler(event)">
>     +    rollOut="rollOutHandler(event)"
>     +    width="100%">
>
>          <fx:Script>
>              <![CDATA[
>
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to