Code Monkey home page Code Monkey logo

Comments (8)

Gregg8 avatar Gregg8 commented on August 13, 2024

I do agree with you. We have never had that requirement but it is an important part of the flex box universe (and trivial to implement) so sure, will do.

from re-com.

mike-thompson-day8 avatar mike-thompson-day8 commented on August 13, 2024

I'm cautious about every additional named arg (on any component, not just this one). We don't want perpetually expanding named args lists (and that's what will happen unless we are on our guard).

As frozenlock says :style is the easy escape hatch -- you can do anything there. Named args, on the other hand, are for what we see as THE most common usecases.

For something to get "promoted" from :style or :attr to a named arg it must be used in, what?, 50% of cases? Dunno exactly what the criterial is, but you get the idea -- I'd like the bar to be high.

So, as a general rule, we should default to saying "no" to new named args, unless the case is strong.

None of this is to say that, in this case, the answer is "no". This is just me setting a mental framework.

from re-com.

stumitchell avatar stumitchell commented on August 13, 2024

so what do you think about passing all unused keyword args directly to :style?

But I guess that breaks the iron fist of gregg 👊

from re-com.

Frozenlock avatar Frozenlock commented on August 13, 2024

I often add :on-click to various components... I'd rather not having that sent into the style map. 😉
edit: Oh wait, in re-com you need to place into :attr... nevermind.

Using :style is not so bad, but the thing that bugs me in this particular case is that the boxes are an almost complete abstraction.

I can use them without knowing anything about flexbox.
The wrap issue was the first thing that really threw me off and forced me to check some documentation.

from re-com.

Gregg8 avatar Gregg8 commented on August 13, 2024

👊 (for Stu)

from re-com.

mike-thompson-day8 avatar mike-thompson-day8 commented on August 13, 2024

@Frozenlock I'm pleasantly surprised - I thought the layout side of things was a fairly leaky abstraction over flexbox. Damn useful, hopefully, but leaky. Must be more watertight than I thought, which is good!

So, it sounds like you wanted :allow-wrap? more for reasons of completeness, than grinding, constant hassle.

Next, I can straight-away imagine the need for :on-click in various places. Were there any components in particular?

(BTW, the "iron first of Gregg" mentions are a reference to Gregg's jack-booted ways when it comes to "tweaking" APIs and calmly ignoring the blood curdling screams of those affected. For the greater good, he claims, but some wonder. So, an insiders joke, but now you know. Fear the fist)

from re-com.

Frozenlock avatar Frozenlock commented on August 13, 2024

@mike-thompson-day8

So, it sounds like you wanted :allow-wrap? more for reasons of completeness, than grinding, constant hassle.

Correct. I only needed it once so far, and I've been pretty busy with re-com. 😄

I don't mind using :attr for the random :on-click. I don't think it occurs enough to warrant its own key. (Outside of buttons)

from re-com.

mike-thompson-day8 avatar mike-thompson-day8 commented on August 13, 2024

So, I think this can be closed without further action.

from re-com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.