by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 06 05:06
    gdotdesign synchronize #312
  • Aug 05 19:39
    Sija milestoned #312
  • Aug 05 19:39
    Sija assigned #312
  • Aug 05 13:14
    gdotdesign edited #312
  • Aug 05 13:14
    gdotdesign opened #312
  • Jul 31 12:08
    gdotdesign labeled #311
  • Jul 31 12:08
    gdotdesign labeled #311
  • Jul 31 12:08
    gdotdesign labeled #311
  • Jul 31 10:44
    mdelin opened #311
  • Jul 17 10:31
    gdotdesign closed #310
  • Jul 17 10:24
    Vechro opened #310
  • Jul 13 14:06
    gdotdesign labeled #309
  • Jul 13 01:42
    waj opened #309
  • Jul 09 08:53
    Vechro opened #308
  • Jul 06 19:32
    s0kil closed #307
  • Jul 06 18:40
    Vechro opened #307
  • Jul 03 18:58
    s0kil closed #306
  • Jul 03 18:58
    s0kil closed #295
  • Jul 03 18:58
    s0kil synchronize #306
  • Jul 03 17:09
    s0kil edited #306
Vechro
@Vechro
it's been real quiet around the repo ūüĎÄ
Szikszai Guszt√°v
@gdotdesign
which one? :D
Vechro
@Vechro
mint
anyway I had been waiting for a while to gather more changes to put into a single PR but I wasn't finding anything else so this small PR will have to do for now #310
Szikszai Guszt√°v
@gdotdesign
it's like that sometimes, I'm working in other repos mint-ui min-ui-showcase
Vechro
@Vechro
that's alright
some of the examples in documentation still bother me because you can't really get away that easily when a function returns a Maybe, but that's for someone more knowledgeable (and less lazy) to fix
Vechro
@Vechro
also I've been thinking about directives a bit, such as @svg and I wonder, is it possible to pass in a viewBox attribute when fetching an SVG?
because although rare, there's definitely a few edge cases with Feather icons where you'd want to modify the viewBox
Szikszai Guszt√°v
@gdotdesign
didn't though about it yet
but it's not impossible
Vechro
@Vechro
it's all good
Vechro
@Vechro
then again... if you could pass in properties to a directive, you might as well make @svg more generic such as @html or so and bam, we can have separate .html files for templates
although I wouldn't know how reasonable such a thing is in the context of SPAs
Szikszai Guszt√°v
@gdotdesign
@html could work but only with static content
Vechro
@Vechro
but you'd still be able to set the viewBox of an SVG?
Szikszai Guszt√°v
@gdotdesign
have to think about it for some but something like this maybe @svg(../svg, viewBox="0 0 100 100") basically a list of attributes which are overridden
@html would be sepearate for sure
Vechro
@Vechro
ah okay, that'd be a bit different than what I was thinking, no need for @html then for sure
but I'd be okay with that, yeah
Vechro
@Vechro
oh I'm a goon, I forgot to fix something I had on my list lol
notice the different function used in the example https://www.mint-lang.com/api/modules/Dom#getElementBySelector
that's still in master
Vechro
@Vechro
...is this supposed to say Intro?
image.png
Szikszai Guszt√°v
@gdotdesign
yes :joy:
Vechro
@Vechro
kind of unbelievable how many times I saw it and my brain thought it was completely normal
like "Into Mint" or something
Szikszai Guszt√°v
@gdotdesign
:smile:
sclee15
@sclee15
in Function(Html.Event, a), what is type a ?
Szikszai Guszt√°v
@gdotdesign
it's a type variable, can match any type
sclee15
@sclee15
a ha so it is like Any type in TypeScript.
Szikszai Guszt√°v
@gdotdesign
not exactly, because it's a restriction on more complex types
for example in this Function(a, b, a) the two a is the same type
sclee15
@sclee15
oh....
it is like type template? just like List<T>
Event attributes should match a specific type signature Function(Html.Event, a) which means that only functions which take an Html.Event and return something can be passed to these attributes.
Szikszai Guszt√°v
@gdotdesign
I'm not versed in TypeScript so I can't really tell
sclee15
@sclee15
In the above paragraph, I thought a is for attribute.
Szikszai Guszt√°v
@gdotdesign
ah
sclee15
@sclee15
I am planning to adopt Mint to my personal project. I am so glad that there is Mint!
Szikszai Guszt√°v
@gdotdesign
:smile: I'm glad
to explain this a bit more: these type variables come in when you want to specify the behaviour of a function
fun map (func : Function(a, b), array : Array(a)) : Array(b) {
all as are the same type and all bs are a different type
sclee15
@sclee15
Oh I see.
So versatile.
Thank you.
Szikszai Guszt√°v
@gdotdesign
yeah
:+1: