Coder Social home page Coder Social logo

Comments (6)

peterhodges avatar peterhodges commented on August 16, 2024 1

Yeah that would be great.

I still see it as decoupled. Brain is handling the logic and keeping track of state, and just exposing that state to any wrappers so that they can provide their own markup (or custom components) and CSS.

E.g. I already have a checkbox that handles showing/hiding the right icon, animations etc. I want to be able to use that, but pass the "checked" state from brain to my custom component.

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024 1

That is very reasonable.

I meant decoupled in the sense that hlm projects would have direct dependencies to brain projects, which might not be a bad thing after all as they are meant to be used together.

I will push a new version of components soon that will expose those. Is there any others you think should expose extra state/properties

from spartan.

peterhodges avatar peterhodges commented on August 16, 2024 1

Awesome, thank you.

I'm building out a menu at the moment and had to revert to depending on Cdk directly, instead of brain, so I'll give it ago once the state is exposed.

I'll also try wrapping some other components from brain to see what other issues I run into.

Awesome library by the way. Good riddance to opinionated libraries like Material. There's so much unmaintainable spaghetti code around because people can't easily wrap their UI libraries behind their own abstractions. The angular community has needed something like this for years! Hopefully we can get Angular to play ball :D

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024

I use the class in the hlm because I want to keep the two decoupled, funny enough the idea is that you can use either with your own versions of brain/helm.

There's nothing I see that would prevent us from exposing the checked property directly. I just didn't want the hlm component to have to inject the brain component.

I can expose the checked and disabled properties for the checkbox and radio components. Would that be good enough?

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024

Yeah hopefully this concept of un-styled brain only components that take care of all the a11y for you, but are flexible enough to let them style however you need is catches on.

That way there is a single "brain" everyone can work together to make as good as possible and then on top of that give it their own styles.

Would be cool!

from spartan.

goetzrobin avatar goetzrobin commented on August 16, 2024

Closed this for now and we can continue the discussion in the other issue

from spartan.

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.