Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-21 Thread 'Rupert Smith' via Elm Discuss
On Thursday, April 20, 2017 at 12:33:54 PM UTC+1, Jakub Hampl wrote: > > https://codepen.io/anon/pen/gWrbxr > Very nice. And I see your point - you have multiple strings within a single node. Perhaps my suggestion of a help function that takes a single String is not so useful. -- You

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-20 Thread Jakub Hampl
https://codepen.io/anon/pen/gWrbxr On Wednesday, 19 April 2017 14:16:08 UTC+1, Duane Johnson wrote: > > > On Tue, Apr 18, 2017 at 7:20 AM, Jakub Hampl > wrote: > >> Think of the element akin to the element in HTML. Yes, fairly >> often you will simply pass a string to it,

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-19 Thread Duane Johnson
On Tue, Apr 18, 2017 at 7:20 AM, Jakub Hampl wrote: > Think of the element akin to the element in HTML. Yes, fairly > often you will simply pass a string to it, but it needing lower level > styling is pretty common. > > For the API you proposed, what would happen if you

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-18 Thread Duane Johnson
On Tue, Apr 18, 2017 at 6:52 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > > So I tried setting a strokeWidth attribute on a box and on a line, but it > has no effect. Instead I had to set the style like this: > > style [ ( "stroke-width", "4" ) ] > Thanks (and

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-18 Thread Jakub Hampl
Think of the element akin to the element in HTML. Yes, fairly often you will simply pass a string to it, but it needing lower level styling is pretty common. For the API you proposed, what would happen if you passed in both a non-empty list of svgs and a string? RE: strokeWidth - that's a

[elm-discuss] Re: ANN: TypedSvg

2017-04-18 Thread 'Rupert Smith' via Elm Discuss
On Thursday, March 30, 2017 at 4:35:32 PM UTC+1, Duane Johnson wrote: > > Hi all, > > I've been working on a TypedSvg package here: > > http://package.elm-lang.org/packages/canadaduane/typed-svg/2.0.1 > So I tried setting a strokeWidth attribute on a box and on a line, but it has no effect.

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-18 Thread 'Rupert Smith' via Elm Discuss
On Tuesday, April 18, 2017 at 10:59:20 AM UTC+1, Jakub Hampl wrote: > > > https://developer.mozilla.org/en-US/docs/Web/SVG/Element#Text_content_elements > > elements can contain quite a number of children that allow you to > do very precise formatting of the actual text content. There are plenty

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-18 Thread Jakub Hampl
https://developer.mozilla.org/en-US/docs/Web/SVG/Element#Text_content_elements elements can contain quite a number of children that allow you to do very precise formatting of the actual text content. There are plenty of usecases like custom fonts, rendering text on a path, text effects, etc.

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-17 Thread Duane Johnson
On Mon, Apr 17, 2017 at 4:49 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > Not much progress with this recently, sorry. But starting to look at it > again today and I am back to work this week. I'm just trying to render some > simple diagrams with boxes and text and

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-17 Thread 'Rupert Smith' via Elm Discuss
On Thursday, April 6, 2017 at 4:38:36 PM UTC+1, Duane Johnson wrote: > > Sounds quite reasonable :) > > >> - fill in missing documentation on all elements and attributes >>> - add helpful functions as we go to the TypedSvg.Extra module (currently >>> only `centeredImage` resides there) >>> >>

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-06 Thread Duane Johnson
> > >> - separate out the Animation elements and attributes into their own module >> - continue to add length-unit-specific modules like InPx and InEm (InPt, >> InMm, etc.) >> - move `text` element from Core to regular elements (TypedSvg) >> > > These things sound fairly structural, so perhaps

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-06 Thread 'Rupert Smith' via Elm Discuss
On Thursday, April 6, 2017 at 3:44:56 PM UTC+1, Duane Johnson wrote: > > On Thu, Apr 6, 2017 at 8:03 AM, 'Rupert Smith' via Elm Discuss < > elm-d...@googlegroups.com > wrote: > >> What are the immediate todos that need worked on? Is there a list of >> issues on the github project, for example? >>

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-06 Thread Duane Johnson
On Thu, Apr 6, 2017 at 8:03 AM, 'Rupert Smith' via Elm Discuss < elm-discuss@googlegroups.com> wrote: > On Saturday, April 1, 2017 at 5:15:47 AM UTC+1, Duane Johnson wrote: >> >> The short term goal is to make a typed SVG library (as mentioned earlier, >> fully typed and documented). Medium-term,

Re: [elm-discuss] Re: ANN: TypedSvg

2017-04-06 Thread 'Rupert Smith' via Elm Discuss
On Saturday, April 1, 2017 at 5:15:47 AM UTC+1, Duane Johnson wrote: > > The short term goal is to make a typed SVG library (as mentioned earlier, > fully typed and documented). Medium-term, I'd like to adopt some sensible > module partitions that help segregate functionality into logical units

[elm-discuss] Re: ANN: TypedSvg

2017-04-03 Thread 'Rupert Smith' via Elm Discuss
On Friday, March 31, 2017 at 3:40:23 PM UTC+1, Noah Gordon wrote: > > elm-lang/svg does not provide any strong typing for its functions; it's a > direct exposure of SVG's API, and all of its functions take strings as > arguments. An incorrectly-formatted string will not break your application >

Re: [elm-discuss] Re: ANN: TypedSvg

2017-03-31 Thread Duane Johnson
Thanks for the kind words everyone. Yes, please send pull requests to the main repo and I will integrate them. The short term goal is to make a typed SVG library (as mentioned earlier, fully typed and documented). Medium-term, I'd like to adopt some sensible module partitions that help segregate

[elm-discuss] Re: ANN: TypedSvg

2017-03-31 Thread Nicholas Hollon
This is awesome! Something I've wished for since about 5 minutes after I started learning elm-svg. Will definitely be adopting it for future projects... possibly sending some pull requests along the way. :-) On Thursday, March 30, 2017 at 8:35:32 AM UTC-7, Duane Johnson wrote: > > Hi all, >

[elm-discuss] Re: ANN: TypedSvg

2017-03-31 Thread Magnus Rundberget
Nice ! -magnus On Thursday, 30 March 2017 17:35:32 UTC+2, Duane Johnson wrote: > > Hi all, > > I've been working on a TypedSvg package here: > > http://package.elm-lang.org/packages/canadaduane/typed-svg/2.0.1 > > Its intent is to replace `elm-lang/svg` with a fully typed and documented > SVG

[elm-discuss] Re: ANN: TypedSvg

2017-03-31 Thread Rex van der Spuy
> Duane, I've been waiting for something like this for a while. Thanks for > undertaking the tedium of translating the entire SVG spec and giving it a > nice, typed interface. Will take a closer look when I get a chance. > Yeah, it's really great, thanks! -- You received this message

[elm-discuss] Re: ANN: TypedSvg

2017-03-31 Thread Noah Gordon
elm-lang/svg does not provide any strong typing for its functions; it's a direct exposure of SVG's API, and all of its functions take strings as arguments. An incorrectly-formatted string will not break your application but will fail to render as you might expect. It looks like this library is

[elm-discuss] Re: ANN: TypedSvg

2017-03-31 Thread 'Rupert Smith' via Elm Discuss
On Thursday, March 30, 2017 at 4:35:32 PM UTC+1, Duane Johnson wrote: > > Hi all, > > I've been working on a TypedSvg package here: > > http://package.elm-lang.org/packages/canadaduane/typed-svg/2.0.1 > > Its intent is to replace `elm-lang/svg` with a fully typed and documented > SVG package.