Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 22 2018 04:26
    shanimal commented #174
  • May 01 2018 19:25
    jsf-clabot commented #177
  • May 01 2018 19:25
    jsf-clabot commented #177
  • May 01 2018 19:25
    mufumbo opened #177
  • Feb 23 2018 16:56
    anupnitkkr closed #174
  • Feb 20 2018 00:34

    mlrawlings on master

    Create LICENSE (compare)

  • Nov 16 2017 16:52

    austinkelleher on master

    Update README.md (compare)

  • Oct 23 2017 18:44

    patrick-steele-idem on v6.6.6

    (compare)

  • Oct 23 2017 18:44
    patrick-steele-idem closed #176
  • Oct 23 2017 18:44

    patrick-steele-idem on master

    Fixes #176 - Special unicode ch… 6.6.6 (compare)

  • Oct 23 2017 18:37
    patrick-steele-idem edited #176
  • Oct 23 2017 18:37
    patrick-steele-idem assigned #176
  • Oct 23 2017 18:37
    patrick-steele-idem labeled #176
  • Oct 23 2017 18:37
    patrick-steele-idem opened #176
  • Sep 28 2017 07:35

    mlrawlings on v6.6.5

    (compare)

  • Sep 28 2017 07:35

    mlrawlings on master

    6.6.5 (compare)

  • Sep 28 2017 07:32

    mlrawlings on master

    fix non-root w-bind deprecation… (compare)

  • Sep 28 2017 04:14

    mlrawlings on master

    6.6.4 (compare)

  • Sep 28 2017 04:14

    mlrawlings on v6.6.4

    6.6.4 (compare)

  • Sep 28 2017 04:13

    mlrawlings on master

    add semicolon add deprecation warnings for th… (compare)

Julio Canares
@juliocanares_twitter
you can use lasso.js
Pier Bover
@PierBover
If in an Express route I use, let's say, 5 out of 10 components the CSS and JS that will be sent to the browser is only from those 5 components?
Julio Canares
@juliocanares_twitter
to bundle your css, javascript, etc
yes, it is only sent the 5 components assets
by example you can define a page that use 5 components using browser.json
something like this
Pier Bover
@PierBover
Gracias @juliocanares_twitter :+1:
Julio Canares
@juliocanares_twitter
de nada @PierBover
Patrick Steele-Idem
@patrick-steele-idem
Hey @/all, starting with Marko v4, Marko Widgets has been merged into Marko (see: https://github.com/marko-js/marko/blob/master/ROADMAP.md). As a result of the merge I think it makes more sense for all conversations related to Marko to happen in the main marko room: https://gitter.im/marko-js/marko
Scott Davis
@scttdavs
any reason why client side rendering of a <script> tag will not download the script, but creating the node manually in js and then appending it works fine?
Patrick Steele-Idem
@patrick-steele-idem
@scttdavs I would expect the external JS to be downloaded unless maybe if the <script> node is reused when doing DOM diffing/patching
Matteo Zambon
@matteozambon89
Hi there!
I'm working on a new project where I would like to implement Marko Lasso and Marko Widget with some sort of async page rendering like the Angular Ajaxify.
I've already setup Marko, Lasso and Marko Widget and I'm able to use Express to create a page using different components but I don't understand what I need to do to render the next page using ajax.
Does anybody know how I can achieve this?
Michael Rawlings
@mlrawlings
Hey @matteozambon89! Before I answer your question, I would recommend upgrading from marko@3.x and marko-widgets to marko@4.0.0-rc-12 (the latest release candidate for the new version of Marko which should have an official release next week). The docs are underway but the ROADMAP is also a good resource, and pretty much everything in the v3 docs should still work in v4, though some things are deprecated.
Matteo Zambon
@matteozambon89
Hey @mlrawlings thanks for the prompt reply!
I’m doing this right now, won’t take long since the project is really at an early stage :smile:
Michael Rawlings
@mlrawlings
For the question though, you would need to have some kind of routing on the client: page.js is a lightweight option, but I would also recommend checking out rill. I haven't used it myself, but I have used a similar approach and it worked well for me. Dylan (the author of rill) has also put out some other quality code that I have used and he's pretty helpful in https://gitter.im/rill-js/rill
Matteo Zambon
@matteozambon89

@mlrawlings those are really good frameworks you’ve listed! I had a quick look just now.
Would you have any exmaple code for page.js (or rill) + Marko (with Marko Widgets) + Lasso ?

Let’s assume that:

  • I have a page dashboard and 4 components sidebar, content, customers and chats.
  • content can either display customers and charts.
  • sidebar has the possibility to switch between the routes /customers and /chats using two a tags and handling the onClick event.

Based on what I understood this is how I should proceed (correct me if I'm wrong):

  • Setup 2 routes using (for example) page.js /customers and /charts
  • Whenever the route /customers is called I remove what's inside content and load the component customers
  • Whenever the route /charts is called I remove what's inside content and load the component charts

Do you think I would be able to use pace.js to show the progress while the new component is loading?

Doea all this make sense to you?

Michael Rawlings
@mlrawlings
Unfortunately we don't have any examples that I know of, but what you described seems like a reasonable approach. I'm guessing pace.js would work just fine with the approach.
Matteo Zambon
@matteozambon89
@mlrawlings sorry for the delay on answering you.
Don’t worry about the example, I’ll do some tests between today and next week and as soon as I have something concrete I’ll post it publicly on github so it can be used as proof of concept :smile:
Matteo Zambon
@matteozambon89
@mlrawlings is it correct that if I install marko@4.0.0-rc.12 I receive a warning of UNMET PEER DEPENDENCIES?
npm install --save marko@4.0.0-rc.12@0.0.0… 
└─┬ UNMET PEER DEPENDENCY marko@4.0.0-rc.12
  ├── app-module-path@2.2.0 
  ├── argly@1.1.1 
  ├── esprima@3.1.3 
  ├─┬ events-light@1.0.5 
  │ └─┬ chai@3.5.0 
  │   ├── assertion-error@1.0.2 
  │   ├─┬ deep-eql@0.1.3 
  │   │ └── type-detect@0.1.1 
  │   └── type-detect@1.0.0 
  ├── he@1.1.1 
  ├── listener-tracker@2.0.0 
  ├── morphdom@2.3.1 
  ├── raptor-util@3.1.0 
  ├── resolve-from@2.0.0 
  └─┬ simple-sha1@2.1.0 
    └── rusha@0.8.5 

npm WARN marko-widgets@6.6.0 requires a peer of marko@^3.0.0 but none was installed.
npm ERR! code 1
Patrick Steele-Idem
@patrick-steele-idem

@matteozambon89 npm uninstall marko-widgets --save

marko-widgets has been merged into marko as part of v4

Matteo Zambon
@matteozambon89
@patrick-steele-idem thanks you very much! I thought I’ve uninstalled it but it turned out I didn’t :smile:
Phuong Nguyen
@neunygph
hi everyone
can someone show me how to include a layout in v4 please ?
i tried the below code but my page is not showing properly
//in the layout.marko
 <if(data.body)>
        <include (data.body) />
  </if>

//in the body
include("../Shared/layout.marko") 
  <@body>
         //html content here
  </@body>
Pankaj Singh Bisht
@impsbisht_twitter
How to call a function which should be called on widget re render
Andrei Margulis
@sampology
@impsbisht_twitter did you try to call it onUpdate: function () { myFunction() } ?
Pankaj Singh Bisht
@impsbisht_twitter
@sampology It worked thanks.
Andrei Margulis
@sampology
:thumbsup:
Scott Davis
@scttdavs

how should we render widgets client side now with latest version of marko 3 and marko-widgets? I tried require("./index").render({}).appendTo(document.body).getWidget();
But this gives the deprecation warning:

WARNING!!
Calling `render` synchronously is deprecated. Use `renderSync` instead.

So I tried renderSync:
require("./index").renderSync({}).appendTo(document.body).getWidget();
and I get the error:

undefined is not a constructor (evaluating 'require("./index").renderSync({})');
Scott Davis
@scttdavs
I should add that this is for a split widget and renderer
We do renderSync for a widget and it works fine
Scott Davis
@scttdavs
:point_up: any thoughts on this? Others seeing same issue?
Patrick Steele-Idem
@patrick-steele-idem
@scttdavs In v3, a split widget is not renderable in the browsr. We have fixed this in v4. Your best option for v3 is probably to un-split the widget
Ashik Jyothi
@ashik-jyothi
how to do client side routing in Markojs. Is there anything inbuild like react router as in react?
Anant Raj
@Anant-Raj
how to pass data w-onclick
Patrick Steele-Idem
@patrick-steele-idem

@Anant-Raj In marko v4 it would be on-click('handleClick', someData) and in marko v3 you have to put the data on a separate attribute of the HTML element. Something like the following:

<div w-onclick="handleClick" data-some-data=someData>

You can then read the data from the attribute your handler:

handleClick(event, el) {
  var data = el.getAttribute('data-some-data'); // String value
}
Pankaj Singh Bisht
@impsbisht_twitter
I am randomly getting Widget not found w1(widget id). And Is there is a way to get the fully rendered html of page using marko-widgets.
Pankaj Singh Bisht
@impsbisht_twitter
@patrick-steele-idem I am getting errors like . When I debugged the issue I found that __widget is not defind thats what is causing the issue.
event-delegation.js:1 Uncaught Error: Widget not found: w1-w8
at event-delegation.js:1
at Object.f [as batchUpdate] (update-manager.js:1)
at HTMLBodyElement.<anonymous> (event-delegation.js:1)
shubham-til
@shubham-til
I am using marko-widgets for my listing page
and everytime I want to load more listing cards on user scroll, I am setting the state of widget which is making my page to scroll to the first card, since whole widget is repainting due to repainting
Any help on this
Phuong Nguyen
@neunygph
hello
any marko team here ?
for the "Shared-1234567.js" that is generated from marko, is there a way to define this with a custom name instead ?
Phuong Nguyen
@neunygph
hello
oh man look like this thread is dead since May
Austin Kelleher
@austinkelleher
@neunygph Sorry for the late response. Marko and marko-widgets have been merged in Marko v4, so most of the conversation is now happening over in the Marko channel https://gitter.im/marko-js/marko
Michael Rawlings
@mlrawlings

This is not the chat you are looking for

Join us over in marko-js/marko instead :)