Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 02 04:07
    dependabot[bot] labeled #48
  • Nov 02 04:07
    dependabot[bot] opened #48
  • Nov 02 04:07

    dependabot[bot] on npm_and_yarn

    Bump minimatch and precommit-ho… (compare)

  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 27 18:34
    dependabot[bot] closed #46
  • Apr 27 18:34
    dependabot[bot] commented #46
  • Apr 27 18:34
    dependabot[bot] labeled #47
  • Apr 27 18:34
    dependabot[bot] opened #47
  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    Bump async from 0.2.9 to 2.6.4 … (compare)

  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    (compare)

  • Apr 27 18:34
    dependabot[bot] closed #186
  • Apr 27 18:34
    dependabot[bot] commented #186
  • Apr 27 18:34
    dependabot[bot] labeled #187
  • Apr 27 18:34
    dependabot[bot] opened #187
  • Apr 27 18:34

    dependabot[bot] on npm_and_yarn

    Bump async from 2.6.0 to 2.6.4 … (compare)

  • Apr 13 00:00
    dependabot[bot] labeled #46
  • Apr 13 00:00
    dependabot[bot] opened #46
  • Apr 13 00:00
    dependabot[bot] labeled #186
  • Apr 13 00:00

    dependabot[bot] on npm_and_yarn

    Bump async from 0.2.9 to 3.2.2 … (compare)

  • Apr 13 00:00
    dependabot[bot] opened #186
Richard Butler
@RickButler
There were plans for server side rendering initially, but I don't think anyone got around to it.
Neeraj
@smurfpandey
Hello,
I am looking for a a plugin similar to backbone deep-model for ampersand-state/model
Neeraj
@smurfpandey
I am trying to create the plugin myself, but I am stuck at set method. I am trying to replicate the implementation of backbone deepmodel
Richard Butler
@RickButler
@smurfpandey nested children is kind of the equivalent to deep models.
@smurfpandey
@smurfpandey your best bet is to either extended the object type and make it track changes on its props. A comparison algorithm, and then triggering the appropriate changes.
Richard Butler
@RickButler
@smurfpandey any other option would include some rather large changes to how ampersand state works, and would probably be a p to keep in sync.
Be a pain to keep in sync*
bilguuneni
@bilguuneni
Whats going in here?
Neeraj
@smurfpandey
@RickButler nested child won't work in my case, as I am exposing my models for users to define their own properties, and properties might be objects.
Richard Butler
@RickButler
@smurfpandey do you want to do something like
props: {
deepmodel: ['deepObject', true, function () { return { name: 'john', lastname: 'smith',  friends: ['tim', 'will']]}}
}
and have it track changes
if that's what you want, you need a custom data type with an onchange property that does deep diffing on your object.
Neeraj
@smurfpandey
Yes, something like that. I will try doing this approach.
Thanks for your help :)
ScrumInsight
@ScrumInsight
I'm wondering if there is anyone who can share a pattern or solution for creating an ampersand form where each field in the form is displayed one at a time with a progress bar and back/forward buttons? I can probably figure it out myself, but I'm guessing someone else has already done it :-)
Richard Butler
@RickButler
@ScrumInsight form with all inputs hidden, in the view that contains the form you have a prop you use in a switch binding, next prev buttons change the prop and the switch shows the next input hides the others. There is more to it than that though, you are going to have to setup validation for the input before you move to next, and the last input will need to hide your next button and show the submit (or just run submit).
@ScrumInsight if it's not a lot of inputs/data I would do it so each input had it's own view/route, and you would store the data on the route. eg step one /signup
step 2 /signup/john-firstname
where john was the value from step 1
step 3 signup/john-firstname/smith-lastname
that way you can refresh the page and not lose your state.
ScrumInsight
@ScrumInsight
Thanks @RickButler - there are about 100 fields which is why I want to have them show sequentially (it's a survey of sorts). But I also like the idea of the route - maybe I could generate that stuff programmatically so that each view is instantiated dynamically in an initialization loop of some sort. I assume that the views would need properties bound to the prev and next buttons in that case. It might be tough with the model though since the fields are all required. Hmmm....
johowie
@johowie
Q: Is it possible to pass an existing collection to the collections property of a model, or must it be a raw array of json like objects ?
Hamish Blake
@hsimah_twitter
good evening
johowie
@johowie
good evening indeed
Brad Compton (he/him)
@Bradcomp
@johowie Yes, that is indeed possible.
Paul Green
@thatgreenguy
Hi I have this in a view :
a.btn.btn-default(href="#")
span.glyphicon.glyphicon-plus
| New
But I'm not seeing the correct display for the glyph - just some weird circle character - anyone point me in the right direction - first time ampersand user ;->
I can see bootstrap.css in stylesheets but i'm not sure if that comes with the glyphs or I need to import them as a separate file?
Paul Green
@thatgreenguy
ok so I have bootstrap v3.2 which comes with default set of glyphicons - ampersand is building/bundling the icons into a fonts directory and delivering that to the client so they should be served from localhost:3000/fonts/ etc
but in chrome when accessing the page I am seeing 2 errors
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.ttf (and .woff)
as well as OTS parsing error: invalid version tag
Anyone else seen this in past - any ideas how to resolve this?
Paul Green
@thatgreenguy
Looking at the .ttf and .woff glyphicons files in fonts in my browser I notice that the mime typr for both of them is reported as text/html ???
Richard Butler
@RickButler
@thatgreenguy sounds like browsersync isn't serving the right mime type for it, but offhand I'm not sure if that's even browsersyncs fault. Normally your web server will return the correct mime type but browser sync is just putting an IP infront of some static files.
@thatgreenguy are you using one of the sample projects?
Paul Green
@thatgreenguy
I used the ampersand cli tool to generate the project
Have created couple of models views templates etc
Im new to ampresand so still learning
Richard Butler
@RickButler
@thatgreenguy in the CLI moonboots is used to serve the client side. https://github.com/lukekarrys/moonboots-express
Paul Green
@thatgreenguy
Ah okay will take a look at that - using node/express on backend but was not sure where to go for config of mimetypes - thanks
Richard Butler
@RickButler
Moonboots is just a plugin around express from what I see. In the index.js you see where it configures paths and content types
    path: this.jsPath(),
    contentType: 'javascript',
    cachePeriod: this.options.cachePeriod,
    source: moonboots.jsSource,
    middleware: this.middleware.js
  })
you can probably set up a path for your font resources and add the appropriate content type.
Paul Green
@thatgreenguy
Many thanks for pointing me in right direction - cheers
Richard Butler
@RickButler
@thatgreenguy no problem, good luck.