Comments (5)
Also, there's a discussion on the ViewComponent issues about extending content areas to be more useful. It sounds like the push is to allow #with
to be called multiple times, which could make things like the Accordion achievable in a nice way, perhaps something like this (in slim for brevity):
= render GovukComponent::Accordion.new do |accordion|
= accordion.with(:item, title: "The first tab") do
h1 First tab content
p lorem ipsum sit ....
= accordion.with(:item, title: "The second tab") do
h1 Secondtab content
p lorem ipsum sit ....
Clearly, it's not ready yet but worth considering when (if) the functionality lands
from govuk-components.
I agree, and:
Perhaps if only accordions and tables are the "one-offs", they should still live under this gem, but can be implemented without ViewComponent
(to make them easier/ergonomical to use) and could have different semantics / a separate section in the docs.
I like the idea of minimising the number of "micro-dependencies" that each have their own Gem publishing pipeline etc. It would make it easier to keep everything in sync when govuk-frontend
releases breaking changes.
from govuk-components.
On this point, there are several other patterns I've noticed on just about every project that uses the design system.
For example, lots of projects implement their own #govuk_link_to
helper (along with similar #govuk_mail_to
and #govuk_button_to
siblings).
Is there a place for the too? Perhaps in another gem if there turn out to be more than a handful.
from govuk-components.
I think Button should be part of this gem. If you look at design system implementation you can have a link styled as a button eg. Start now "button" which is really just a link. We might also want to style that "button" in various states. If you look at govuk-frontend nunjucks api (see macro), the developer can just pass in isStartButton: true
and the component will output a start button link rather than a button. Under the hood you could use link_to
etc.
from govuk-components.
I'm closing this one now. The listed components are present and have been incrementally improved.
from govuk-components.
Related Issues (20)
- 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
- Allow `brand` to be configured on a per-component basis
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.