Code Monkey home page Code Monkey logo

sui's Introduction

SUI React Components CI

SUI Logo

SUI Components is an Open-Source, high quality library of React components that empowers teams to craft any product with ease.

⚙️ Minimum requirements

node npm

🖥 Environment Support

  • Modern browsers and Internet Explorer 11+ (with polyfills)
  • Server-Side Rendering

🧪 Test Coverage

statements branches functions lines

✨ Features

  • Well-tested, production ready presentational React components.
  • Isolated components. Each component is a package.
  • Customizable components using variables.

sui's People

Contributors

adriadoz avatar agonistickatai avatar alextremp avatar andresin87 avatar andresz1 avatar arnau-rius avatar carlesnunez avatar carlosvillu avatar davecarter avatar davidbarna avatar dependabot[bot] avatar desko27 avatar devictoribero avatar giodelabarrera avatar igncalleja avatar javiauso avatar jcger avatar joanclaret avatar jordevo avatar juanmaguitar avatar kikoruiz avatar midudev avatar miduga avatar nucliweb avatar rmoralp avatar stivaliserna avatar sui-bot avatar tomasmax avatar tonyghiani avatar turolopezsanabria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sui's Issues

[sui-domain] Let developers to use a mutable config

We should let developers to pass also a config that's being mutated, for that, we're still offering use a config passed to the factory, or pass a new config in the constructor, so the config is instantiable and could be mutated, so the config is not shared among instances of the domain.

[sui-domain] Avoid anemic models in the domain

class Father {
  constructor (params) {
    this._params = params
    Object.keys(params).forEach(key => (this[`_${key}`] = params[key]))
    console.log('constructor', params)
  }
  
  toJSON() {
    console.log('toJSON', this._params, Object.keys(this))
    return Object.keys(this).reduce((json, privateKey) => {
      const key = privateKey.replace('_', '')
      if (!this._params[key]) { return json }
      
      if (typeof this._params[key] === 'ValueObject') {
        return {...json, ...this._params[key].toJSON()}
      }
      
      json[key] = this._params[key]
      return json
    }, {})
  }
}

class Child extends Father {
  red = 1
  blue () {}
}

console.log(
	new Child({a:1, b:2}).toJSON()
)

[sui-mono] Tag releases

Package

sui-mono

Description

mono-package repos use to tag in git each release, sui-mono is not doing this since sui-studio never tagged component releases

We want to make sui-mono tag each release

Additional Information

Mono packages should be tagged as it's the current standard.
For multi packages if we tag it should contain the component context and name (card/basic-version or card-basic-version)

[sui-studio] Infinite loop installing dependencies

Package

[email protected]

Description

It keeps on reinstalling the dependencies over and over again

Steps to Reproduce

  1. run npm run phoenix

Expected behavior: It should install all dependencies and finish its execution.

Actual behavior: It installs the dependencies over and over again.

Reproduces how often: Only if an empty folder is in the sui-studio components folder

Additional Information

Temporary fix You can avoid this issue by removing all empty folders in the repo, to find them run find . -type d -empty

[sui-ssr] Add a way to force patterns to go to proxy

Package

ssr

Description

Add a way to define in the config a pattern that will force to go to the proxy, even without the need to check the match of the routes.

    "proxy": {
      "host": "coches.net",
      "port": 80,
      "protocol": "http",
      "force":  "/^((.*\.)*)(dev|pre2?|integra|www)\.coches\.net(.*)$/"
    },

[sui-bundler] Change preload for prefetch for now

Package

[sui-bundler]

Description

Change the preload scripts for prefetch for now.

Expected behavior: Don't block load of assets.

Actual behavior: Blocking assets because preload has high priority and defer lower.

Additional Information

This is temporary until we find another solution in order to get in SSR a reliable way to prefetch needed assets for each route.

[sui-mono] Sometimes release is not detected for a sub package

Package

[sui-mono]@[1.18]

Description

Bug: sui-mono check does not detect releases

Steps to Reproduce

  • hoy - release()
  • ayer - commit feature
  • en una rama
    • ayer - commit feature
  • cuando hagas merge quedará:
    • release()
    • commit de mater
    • commit de rama

Expected behavior:
Release is detected

Actual behavior:
No release is detected

Reproduces how often: always

Additional Information

Here
the release is not detected for search/filters

[sui-studio] Update babel-standalone

Package

[sui-studio]@4

Description

Update babel-standalone to version 7
Use preset env

Expected behavior: Being able to use in playground object spread and modern features

Actual behavior: Can't be done

[sui-lint] Add prettier config to format our code automatically

Description

We would like to add prettier to our sui-lint in order to format our code automatically based on our linter config rules, so all developers improve development time.

Additional Information

The implementation should be totally transparent for the user so he shouldn't notice any change but the advantatge of gettign automatically the code formatted before passing the linter, so it gets fixed before even he notice it.

https://github.com/prettier/prettier

[sui-studio] Load sui-polyfills

Description

Load sui-polyfills to make the studio and all the components compatible with all the browsers we expect to support.

[sui-mono] Multipackage repo detected as monopackage repo

Package

[email protected]

Description

Multipackage repo detected as monopackage.

Steps to Reproduce

  1. Open an existing monorepo multipackage repository
  2. Add any commit on a package
  3. Create an empty folder as to create a new package
  4. sui-mono check

Expected behavior:
Detect release as multipackage repo

Actual behavior:
Detects release as monopackage repo

Reproduces how often: always

Additional Information

The problem is located here:
https://github.com/SUI-Components/sui/blob/master/packages/sui-mono/src/config.js#L43

We should check that there is on subfolder with package.json and that's it.

[sui-decorators] Consider using another hash algorithm instead md5.js

Package

[sui-decorators]

Description

Instead of having a big md5.js file (2.5KB gziped) for hashing our params we could consider another more cheap hashing algorithm in terms of performance and size of the bundle.

A simple alternative could be using the Java hash algorithm, that's small (less than 100 bytes gzipped) and it has good performance.

function javaHash (str) {
    var hash = 0;
    if (str.length == 0) return hash;
    for (i = 0; i < str.length; i++) {
        char = str.charCodeAt(i);
        hash = ((hash<<5)-hash)+char;
        hash = hash & hash; // Convert to 32bit integer
    }
    return hash;
}

javaHash('{ params: "hola" }') -> 1329245074
md5() -> 897245d00d4ac9b18989deb9b56c5e50

[sui-mono] Make "build" script NOT mandatory

Package

[email protected]

Description

Packages with no build command cannot be committed

Steps to Reproduce

  1. Create a new package without any script
  2. Commit it with "sui-mono commit"
  3. Publish with it with "sui-mono release"

Expected behavior: package is published

Actual behavior: package is not published and an error is thrown of missing "npm run build" command

Reproduces how often: always

Additional Information

Executing build makes no sense. Developer should simply add a "prepublish" command that would be automatically executed by npm client.

Nevertheless, to be retrocompatible, we'll make npm run build to be executed only if it exits

[sui-cz] Add own config node

Package

sui-cz

Description

Currently, sui-cz if taking packagesFolder from sui-mono config (here)

To make sui-cz resuable in non sui-mono projects, it makes sense to apply the following behavior

When ["config"]["sui-cz"] node exists in packages.json
Then get packagesFolder from there
Otherwise maintain current behavior

Update docs to mention ["config"]["sui-cz"] and how sui-cs integrates with sui-mono taking ["config"]["sui-mono"] otherwise

[sui-ssr] Add Rewrites to configuration

Package

[sui-ssr]

Description

Add a way to add redirections and rewrites to the package.json to be handled by ssr.

"rewrites": {
      "https": true,
       "forceSlash": true,
      "rules": {
        "coches.net": {"target": "www.coches.net", "code": 302},
        "m.coches.net": "www.coches.net"
      }
    }
  }

[sui-studio] help check-release executes the command

Package

[email protected]

Description

The help command does not work as expected

Steps to Reproduce

> sui-studio help check-release

Expected behavior: Information about sui-studio check-release

Actual behavior: It executes sui-studio check-release

Reproduces how often: (only for bugs) 100%

Additional Information

I'm not man enough to execute sui-studio help release

[sui-perf] Support for Axios or promise based libs

sui-perf

sui-perf

Description

Right now sui-perf provides an integration to get superagent requests timings.
We want to add support for Axios

Steps to Reproduce

Expected behavior: Get time marks on axios requests

Actual behavior:
I've made a very quick'n dirt implementation but I've noticed that since they are promises and two promises can be spawned at the same time but resolved in any order, this libs groups them as one call as child of the other one (like with react components)

Example:
/example1 request is performed (perf.mark(/example1)
/example2 request is performed (perf.mark(/example2))
/example2 request done (perf.stop(/example2)
/example1 request done (perf.stop(/example1)

This will be reported as example2 being a child of example1 when the requests are independent to each other.
In my mind this should also happen to superagent implementation on events, but I didn't test it.

[sui-studio] Make it work locally

Package

sui-studio@latest

Description

To be able to migrate common deps to sui-studio, we need to make it work locally.

When sui-studio is executed
Then it should check is there is a local and/or global instance of it
When there is a local instance of the studio,
Then it should warn the user it's using local version and do it
Otherwise it should throw error and ask user to npm install sui-studio --save-dev

[widget-embedder] linting errors

Package

[email protected]

Steps to Reproduce

  1. install the sui-widget-embedder dependencies
  2. execute npm run lint

Expected behavior:
There should be no linting errors

Actual behavior:
It shows linting errors

Reproduces how often: (only for bugs) always

Additional Information

The postinstall creates a folder named react with transpiled code which obviously does not pass the linting rules

[sui-studio] Generated files not indented correctly

Package

[email protected]

Description

When generating a new component, the files created by the studio are not indented correctly

Steps to Reproduce

  1. Generate a component

Expected behavior: The package.json, src/index.js, src/index.scss, .gitignore, .npmignore files should be indented correctly

Actual behavior: They are not

Reproduces how often: Always

Additional Information

Looks like the template used to generate those files is generated by the `` string interpolation operator adds the spaces used as indentation for the own generator file itself. https://github.com/SUI-Components/sui/blob/master/packages/sui-studio/bin/sui-studio-generate.js#L83

Avoid publish private packages

Package

[sui-mono]

Description

Avoid release packages privates. If the package has the key private: true in the package.json we must not try to publish the package.

[sui-mono] Wrong private field on publish on npm

Package

[sui-mono]@[version-of-the-package]

Description

We're using private when it should be restricted. We might need a way to avoid users to put a non-controlled access type on the package.json. Maybe avoiding the publishing with a wrong value.

Steps to Reproduce

  1. Publish a private package.
    image

Expected behavior: Publish as restricted.

[sui-precommit] Add duplicated deps rules

Package

sui-precommit@latest

Description

We need a new task in sui-precommit wich follows the follow

Steps to Reproduce

Given that I'm in a mono-repo
And I'm committing in the scope of a package
And package.json has been changed

Then it should check that none dependency is duplicated in 2 or more packages of the monorepo
And it should check that none dependency is duplicated with sui-common-dependecies

Expected behavior:

If the version is the same in all places, we throw a warning to inform user with message

[package-name] is used in other packages of this mono-repo. We recommend to have a single source of truth for each dependency

If the version is NOT the same in all places, we throw an error to avoid commit with folowwinf message:

[package-name] is used in other packages in different version. This might increase bundle size duplicating this dependency in the bundle.

[babel-preset-sui] Add legacy decorators to plugins

Package

[babel-preset-sui]@1

Description

It's missing legacy decorators thus some packages are not working as expected.

Steps to Reproduce

  1. Try to compile with the preset a project with decorators.

Expected behavior: Compiles! :)

Actual behavior: It's not compiling! It throws an error! :(

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.