Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.
/ sg Public archive

Playing around with integrating atomic design & Rails

Notifications You must be signed in to change notification settings

moonglum/sg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails & Atomic Design

based upon https://www.innoq.com/en/blog/rails-frontend-components but adjusted to atomic design

data

The blogpost had the explicit concept of data that is checked for a contract. In this approach it is optional. You can do it like this:

Caller:

This is <%= atom :strong, data: { text: "good" } %>.

Called:

<%
    text = data.fetch(:text)
%>
<strong><%= text %></strong>

Variant

This drops the concept of variant. I think it was not a good idea in hindsight.

JS & CSS

This ignores JS and CSS, because it doesn't need to worry about it. But the suggestion is to put them into the folders with the name index.js and index.scss to make it easy to import them. But this is left to tools like faucet.

TODO

aiur like documentation generator.

Gemify?

Should this be the aiur gem?

Atomic Design?

Maybe make the words atom, molecule etc. optional. This could work by not including the helpers, only the component helper and only generating the four helpers so it can be modified. Same for the controller helper.

About

Playing around with integrating atomic design & Rails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published