Giter VIP home page Giter VIP logo

Comments (5)

peteryates avatar peteryates commented on July 25, 2024 1

As I commented in #64, I've been swayed and I think that wrap_slot probably isn't worth it. I'm inclined to remove it, it's a bit nicer in some circumstances but it could be the tip of the iceberg of name clashes and confusion.

I still think that the auto-generated helpers are nice though, I'd be reluctant to remove them, but all that extra complexity to change from accordion.slot(:item, **stuff) to accordion.item(**stuff) no longer feels worth it! Thoughts welcome.

from govuk-components.

misaka avatar misaka commented on July 25, 2024

Ah, I didn't see the comments about the pitfalls of relying on arity in this case.

This is a tough one. add_ is good, although it's purpose isn't as clear when it comes to a non-collection slot ... first call makes sense, but what about subsequent calls? There's an interesting comment in that issue about how collections should behave more like an array. Would it make sense to have different semantics based on whether it's a collection or not?

Maybe it would make sense to let this be dealt-with upstream. πŸ˜›

from govuk-components.

peteryates avatar peteryates commented on July 25, 2024

I think waiting for the upstream API to settle is definitely a good call. As this is causing you some problems at the moment I'm going to switch over to #add_thing format for the moment but leave this issue open so it can be properly addressed.

I hadn't really taken collections into account so when testing with normal slots no singular method existed. πŸ€¦β€β™‚οΈ

from govuk-components.

misaka avatar misaka commented on July 25, 2024

Ya, I agree. I was going to say the same thing last night but decided to sleep on it ... but I've not been swayed. Let's wait and see what happens upstream, I completely agree it would be nicer to tidy it up.

from govuk-components.

peteryates avatar peteryates commented on July 25, 2024

This was fixed (temporarily, at least) by #64

from govuk-components.

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.