Code Monkey home page Code Monkey logo

vanilla-framework-react's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vanilla-framework-react's Issues

Make tests pass

Currently, tests fail. If I run npm run test and then press a, I get:

 FAIL  src/components/App/App.test.js
  ● Test suite failed to run

    Cannot find module './App.css' from 'App.js'
      
      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (src/components/App/App.js:5:76)

 FAIL  src/components/Button/Button.test.js
  ● Test suite failed to run

    Cannot find module './Button.css' from 'Button.js'
      
      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (src/components/Button/Button.js:3:1)

 FAIL  src/components/Card/Card.test.js
  ● Test suite failed to run

    Cannot find module './Card.css' from 'Card.js'
      
      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (src/components/Card/Card.js:3:1)

Test Suites: 3 failed, 3 total
Tests:       0 total
Snapshots:   0 total
Time:        1.384s
Ran all test suites.

Watch Usage: Press w to show more.

Set up enzyme testing environment

At the moment, all the testing is done via Jest's snapshot comparison tool. This is okay for pure UI components, but it is not adequate for components with internal logic/state (e.g. accordion, table).

Eslint throwing fatal error over variable declaration

Can't qyuite figure this out

  1. Pull code
  2. Run npm run lint
  3. The following "fatal" error is thrown:

screen shot 2017-10-11 at 16 16 53

4 ..which points to this line → https://github.com/vanilla-framework/vanilla-components/blob/master/src/App.js#L10

Why is this not valid? 🤔

Add padding to Storybook's content

In Storybook, components show against the sidebar with no padding.
Matrix stands out as one which has this problem.

One option to tackle this is to import a stylesheet into .storybook/config.js and add padding. This can be done simply by adding `import './storybook.scss'.
I believe the layout of the page can also be tweaked in config.

Screenshot

selection_015

Compile component SCSS separately?

To help with packaging components as individual pieces have you considered compiling separately?

There's been talk of making the patterns mix-and-match so why not do the same with the React components.

A component file structure could be like:

components/ 
    Button/
        Button.js
        Button.scss
        Button.css
  • Button.js would import './Button.css'.
  • Button.css would contain the compiled code for Button.scss.
  • Btutton.scss would be @import 'vanilla-framework/scss/_patterns_buttons.scss'.

It seems convoluted, and maybe a better way would be to automate the compilation to each folder (removing the need for Button.scss). Or maybe an even better way would be not to do this at all.

Just an idea, and open to discussion/ being shot down.

Add List component

  • Simple list
  • List with icon
  • List with dividers
  • List with icons and dividers
  • Inline list
  • Middot-seperated inline list
  • Split list

Combine button into a single component

Buttons are looking good. Have you thought of creating a single button component with a prop of type [brand, positive, negative]?

This would make the component more DRY.

Accordion and AccordionItem logic

I wouldn't expect AccordionItem to manage it's own state as implementing a true single-item-open accordion requires the state of all items to be known.

I'd expect Accordion to pass it's own methods for manipulating it's children to the AccordionItem's for onclick handlers etc. This would make the Accordion component a more generic wrapper.

When I'm back at work next week I'll better explain what I mean in comment.

Add Link component

Subtypes:

  • External link
  • Strong link
  • Soft link
  • Inverted link
  • Back to top link

Add Strip component

Subtypes:

  • Strip accent
  • Strip image
  • Strip is-bordered
  • Strip is-deep
  • Strip is-shallow

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.