Skip to content

Commit

Permalink
Feature/v3.2.0 (#9)
Browse files Browse the repository at this point in the history
* Update modules and build system

* Prepare for circle ci

* Update Readme and version

* Update build system

The script files on the design system were being processed by the dependant's browserify (because of the definition on package.json).
When the plugins and presets between dependant/dependency were different the build would throw a module not found error.
This improved build system changes the browserify transform key so that the definitions are not picked up and also includes the transpiled files to prevent errors when the dependant's transpiler is different.

* Update icons and modules

* Include transpiled files

* Update meta images

* Update base typography and colors

* Update development instructions

* Update OpenAQ logo

* Tweak base palette and tertiary color

* Update page and inpage headers appearance

* Improve inpage header typography

* Improve sandbox page title

* Update icon library and include exported layout images

* Update base and heading font color

* Update icon library

* Upgrade collecticons

* Update headings style

* Fix definition list styles

* Tidy graphic assets

* Improve heading styles

* Update buttons appearance

Also, include ghost button variation.

* Improve form input appearance

* Refactor cards and include toolbar styles

* Update variables and mixins

* Tweak form input appearance

* Include link wrapper styles

* Tweak card media styles

* Tweak card subtitle typography

* Update icon library

* Update button typography

* Upgrade to React 17

* Add datasets icon

* compiling new icon?

* runs the right script

Co-authored-by: Daniel da Silva <daniel@developmentseed.org>
Co-authored-by: Ricardo Mestre <ricardo@duplos.org>
Co-authored-by: Alice Rühl <alice.ruehl@gmail.com>
Co-authored-by: Necoline <necoline@developmentseed.org>
Co-authored-by: Necoline Hubner <hnhubner@gmail.com>
  • Loading branch information
6 people authored Feb 23, 2022
1 parent c238d28 commit 020380b
Show file tree
Hide file tree
Showing 168 changed files with 11,824 additions and 4,024 deletions.
11 changes: 0 additions & 11 deletions .build_scripts/deploy.sh

This file was deleted.

64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# https://github.com/developmentseed/how/issues/149
# ssh-keygen -m pem -t rsa -b 4096 -C openaq/openaq-design-system -f deploy_key
version: 2
jobs:
build:
docker:
- image: node:10

working_directory: ~/repo

environment:
- PRODUCTION_BRANCH: master
- GH_REF: git@github.com:openaq/openaq-design-system.git
- GH_NAME: "Development Seed"
- GH_EMAIL: "dev@developmentseed.org"

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run: yarn test

- add_ssh_keys:
fingerprints:
- ""

- run:
name: Building site
command: |
if [ "${CIRCLE_BRANCH}" == "${PRODUCTION_BRANCH}" ]; then
yarn build
else
echo "Skip building site"
fi
- run:
name: Deploy to GH Pages
command: |
if [ "${CIRCLE_BRANCH}" == "${PRODUCTION_BRANCH}" ]; then
cd build
git init
git config user.name "$GH_NAME"
git config user.email "$GH_EMAIL"
git add .
git commit -m "CI deploy [skip ci]"
git remote add origin $GH_REF
git push origin --force --quiet HEAD:gh-pages
rm -rf .git
else
echo "Skip deploying to Github"
fi
24 changes: 5 additions & 19 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,18 @@
"es6": true,
"browser": true
},
"plugins": [
"react"
],
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": [2, "always"],
"jsx-quotes": [2, "prefer-single"],
"no-console": 2,
"no-extra-semi": 2,
"semi-spacing": [2, { "before": false, "after": true }],
"react/display-name": 1 ,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/no-danger": 0,
"react/no-deprecated": 2,
"react/no-did-mount-set-state": [2, "allow-in-func"],
"react/no-did-update-set-state": [2, "allow-in-func"],
"react/no-direct-mutation-state": 2,
"react/no-is-mounted": 2,
"react/no-unknown-property": 2,
"react/prop-types": 2,
"react/react-in-jsx-scope": 2
"prefer-promise-reject-errors": 0
}
}
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ nbproject
temp
tmp
.tmp
dist
build
_site
5 changes: 3 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
sandbox
.gitignore
.travis.yml
.build_scripts
.circleci
.eslintrc
.gitattributes
gulpfile.js
.tmp
.tmp
build
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

13 changes: 6 additions & 7 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ The main purpose of this system is to modularize the assets, therefore is import
## Development environment
The development environment is the same for both parts and has the following dependencies:

- Node (v4.2.x) & Npm ([nvm](https://github.com/creationix/nvm) usage is advised)
- Node (v10) & yarn ([nvm](https://github.com/creationix/nvm) usage is advised)

> The versions mentioned are the ones used during development. It could work with newer ones.
After these basic requirements are met, run the following commands in the website's folder:
```
$ npm install
$ yarn
```

### Design system development
Expand Down Expand Up @@ -45,14 +45,14 @@ These files can then be liked in the doc's files and used.
Svg icons to be compiled into a webfont. The resulting compiled file must be committed with the rest of the styles.
To manually compile the `openaq-design-system` icons run:
```
$ npm run openaq-icons
$ yarn openaq-icons
```

### Sandbox
The sandbox site resides in `sandbox/`.

```
$ npm run serve
$ yarn serve
```
Compiles the sass files, javascript, and launches the server making the site available at `http://localhost:3000/`
The system will watch files and execute tasks whenever one of them changes.
Expand All @@ -79,9 +79,8 @@ import componentName from '../../../assets/scripts/componentName';
**Important:** If you need to install new node modules, install them as **dependencies** if they are for the `openaq-design-system` and as **devDependencies** if they're for the sandbox.

## Deployment
The .travis.yml file enables the usage of [Travis](http://travis.org) as a test and deployment system.
In this particular case, Travis will only publish new versions to the npm registry.
The .circleci/config.yml file enables the usage of [Circle CI](http://circleci.com/) as a test and deployment system.

## Linting
Code follows the `semistandard` code style and should be linted.
- `npm run lint` - will run linter and warn of any errors.
- `yarn lint` - will run linter and warn of any errors.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Style guide and UI components library that aims to standardize the look and feel

Install it as an `node module`: (Not available on `npm`, use direct link)
```
npm install https://github.com/openaq/openaq-design-system#v1.0.0
npm install https://github.com/openaq/openaq-design-system#v3.0.0
```
For the most recent version omit the tag.

Expand Down Expand Up @@ -41,7 +41,7 @@ Add the module path to the `includePaths` of gulp-sass. Should look something li
.pipe($.sass({
outputStyle: 'expanded',
precision: 10,
includePaths: require('node-bourbon').with('node_modules/jeet/scss', require('openaq-design-system/gulp-addons').scssPath)
includePaths: require('node-bourbon').includePaths.concat('node_modules/jeet/scss', require('openaq-design-system/gulp-addons').scssPath)
}))
```

Expand All @@ -58,7 +58,7 @@ Now you can include it in the main scss file:
// Bourbon is a dependency
@import "bourbon";

@import "jeet/index";
@import "jeet";

@import "openaq-design-system";
```
Expand Down Expand Up @@ -106,9 +106,12 @@ browserSync({
You also need to ensure that the images are copied over on build.
This ensures that the graphics are copied over when building the project.
```js
gulp.task('images', function () {
return gulp.src(['app/assets/graphics/**/*', require('openaq-design-system/gulp-addons').graphicsPath + '/**/*'])
.pipe($.cache($.imagemin({
function imagesImagemin () {
return gulp.src([
'app/assets/graphics/**/*',
require('openaq-design-system/gulp-addons').graphicsPath + '/**/*'
])
.pipe($.imagemin([
```
**USAGE**
Expand Down
47 changes: 0 additions & 47 deletions assets/graphics/layout/logo.svg

This file was deleted.

10 changes: 10 additions & 0 deletions assets/graphics/layout/oaq-logo-col-pos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/graphics/meta/android-chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/graphics/meta/apple-icon-114x114.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-120x120.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-144x144.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-152x152.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-180x180.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-57x57.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-60x60.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-72x72.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-76x76.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon-precomposed.png
Binary file not shown.
Binary file removed assets/graphics/meta/apple-icon.png
Binary file not shown.
Binary file added assets/graphics/meta/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/graphics/meta/default-meta-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/graphics/meta/favicon.ico
Binary file not shown.
Binary file added assets/graphics/meta/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 020380b

Please sign in to comment.