I like the idea of loading components dynamically.
My only point about SFC is about being a standard.

And what about css? Could it be a TFC Three-File-Components?


Em sex, 13 de set de 2019 às 01:11, Massimo Di Pierro <
massimo.dipie...@gmail.com> escreveu:

> To clarify.
>
> I do not like SFC because I do not think js and html belong to the same
> file. py4web has a utils.js which implements a TFC Two-File-Components (I
> claim copyright). This is undocumented and you will not see it in other vue
> apps.
>
> Basically each component has on js and one html file. In the case of the
> grid one mtable.js and one mtable.html. You can customize the html as you
> see fit without need to touch the JS. The JS is not done and I will be
> adding some functionality. In particular I need to handle events to allow
> to save the grid state in the url.
>
>
>
>
>
> On Thursday, 12 September 2019 06:52:23 UTC-7, Carlos Costa wrote:
>>
>> It's done.
>> But I have a question: where will we put component styling?
>> I add an table.css file and linked in layout.html but I think it belongs
>> to the component.
>> I wish we would use Vue SFC format.
>> Now  is possible to use SFC components without using bundlers.
>>
>>
>> Em qui, 12 de set de 2019 às 09:52, Carlos Costa <yamandu.co...@gmail.com>
>> escreveu:
>>
>>> I liked it.
>>> Much more faster and responsive.
>>>
>>> I didn't get how use search properly.
>>>
>>> I have on suggestion for letting grid more mobile friendly.
>>> Take a look at this snippet https://codepen.io/andornagy/pen/EVXpbR
>>> It is pure CSS.
>>> It transform columns into rows in a card style table.
>>> I have used it, it is very cool, and I think at least the grid should be
>>> mobile friendly.
>>> The only problem is that you must have a data-column attribute.
>>> I have used to manipulate the w2p grid in order to inject this attribute
>>> but this is very slow.
>>> The ideal is it to be generated with this attribute already.
>>> Maybe I can do a PR with this feature.
>>>
>>>
>>> Em qui, 12 de set de 2019 às 03:31, Massimo Di Pierro <
>>> massimo.dipie...@gmail.com> escreveu:
>>>
>>>> ... it is incomplete. It is experimental. The API is subject to change.
>>>> But I could use some community feedback:
>>>>
>>>> from py4web.utils.publisher import Publisher, ALLOW_ALL_POLICY
>>>>
>>>>
>>>> # exposes services necessary to access the db via ajax
>>>> publisher = Publisher(db, policy=ALLOW_ALL_POLICY)
>>>>
>>>>
>>>> # expose as /examples/grid
>>>> @action('grid')
>>>> @action.uses('grid.html')
>>>> def example_grid():
>>>>      return dict(grid=publisher.grid(db.person))
>>>>
>>>> embed in template with [[=grid]] in templates/grid.html as in web2py.
>>>> The difference from web2py is that the grid communicate with the server
>>>> via ajax and the style is in static/components/mtable.html
>>>> Still does not access authentication based access control but will add
>>>> it very soon.
>>>>
>>>> You can try it.
>>>>
>>>> https://github.com/web2py/py4web/blob/master/apps/examples/__init__.py#L41
>>>>
>>>> --
>>>> Resources:
>>>> - http://web2py.com
>>>> - http://web2py.com/book (Documentation)
>>>> - http://github.com/web2py/web2py (Source code)
>>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to web2py+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/web2py/cc53051f-104c-4b20-97a6-c32f8220d052%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/web2py/cc53051f-104c-4b20-97a6-c32f8220d052%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> At.
>>>
>>> Carlos J. Costa
>>> --------------------------------------------------------------
>>> Cientista da Computação - Esp. Gestão em Telecom
>>>
>>
>>
>> --
>> At.
>>
>> Carlos J. Costa
>> --------------------------------------------------------------
>> Cientista da Computação - Esp. Gestão em Telecom
>>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/31e01207-4fbe-4d8e-9cd8-8bcfc53ac06f%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/31e01207-4fbe-4d8e-9cd8-8bcfc53ac06f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
At.

Carlos J. Costa
--------------------------------------------------------------
Cientista da Computação - Esp. Gestão em Telecom

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAGsD4NxrZqNigDLQsmO7uhn-t42kcR_RDspThCm6rpm%3Dc3Ws8g%40mail.gmail.com.

Reply via email to