Giter VIP home page Giter VIP logo

Comments (5)

peteryates avatar peteryates commented on July 25, 2024 3

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.

tvararu avatar tvararu commented on July 25, 2024 1

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.

peteryates avatar peteryates commented on July 25, 2024

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.

aliuk2012 avatar aliuk2012 commented on July 25, 2024

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.

peteryates avatar peteryates commented on July 25, 2024

I'm closing this one now. The listed components are present and have been incrementally improved.

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.