Comments (5)
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.
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.
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.
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.
This was fixed (temporarily, at least) by #64
from govuk-components.
Related Issues (20)
- Support inverse button style HOT 2
- Add task list component HOT 2
- Add inverse option to Breadcrumbs and Back link components
- Support other design systems HOT 1
- `hide_in_print` option wonβt work for `nhsuk` brand HOT 3
- Axe updates rejecting the accordion section HOT 3
- SVG attribute `viewBox` not correctly capitalised HOT 1
- Default content for header labels does not match latest version of GOV.UK Frontend
- Version 5 release notes HOT 4
- Bug: undefined method `govuk_visually_hidden' (5.0.0 prerelease)
- Update visually hidden text in action links on summary cards
- Slightly out-of-date gem and node package instructions in the upgrade section of the 5.0.0 release notes HOT 1
- Improvements to `new_tab` behaviour HOT 2
- Default title for govuk_tabs
- Update breadcrumbs to accept an array, deprecate hash argument HOT 2
- Lists HOT 6
- Previews for Components HOT 2
- Add `data-module="govuk-button"` to links styled as buttons HOT 1
- Gem can generate invalid duplicate data attributes on buttons
- Notification banner: with_heading can't generate heading tags HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from govuk-components.