Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cozy/cozy-ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v20.12.2
Choose a base ref
...
head repository: cozy/cozy-ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 1,799 changed files with 78,455 additions and 22,576 deletions.
22 changes: 22 additions & 0 deletions .bundlemonrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"baseDir": ".",
"files": [
{
"path": "dist/cozy-ui.min.css",
"maxPercentIncrease": 10
},
{
"path": "dist/cozy-ui.utils.min.css",
"maxPercentIncrease": 10
},
{
"path": "transpiled/react/stylesheet.css"
}
],
"groups": [
{
"path": "transpiled/react/**"
}
],
"reportOutput": ["github"]
}
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
react/Icon/icons-sprite.js
react/palette.js
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"extends": ["cozy-app"],
"extends": ["cozy-app/react"],
"rules": {
"no-console": "off",
"react/display-name": "off"
"no-param-reassign": "error",
"react/display-name": "off",
"react-hooks/exhaustive-deps": "error"
},
"globals": {
"mount": true,
@@ -12,5 +14,8 @@
"react": {
"version": "16.5.2"
}
},
"parserOptions": {
"project": "tsconfig.json"
}
}
14 changes: 14 additions & 0 deletions .github/actions/build_argos_desktop_cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Cache Argos desktop"

runs:
using: "composite"
steps:
- name: Cache Argos desktop
id: cache-argos-desktop
uses: actions/cache@v4
env:
cache-name: cache-argos-desktop
with:
path: |
${{ github.workspace }}/screenshots/reactDesktop
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
14 changes: 14 additions & 0 deletions .github/actions/build_argos_kss_cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Cache Argos kss"

runs:
using: "composite"
steps:
- name: Cache Argos kss
id: cache-argos-kss
uses: actions/cache@v4
env:
cache-name: cache-argos-kss
with:
path: |
${{ github.workspace }}/screenshots/kss
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
14 changes: 14 additions & 0 deletions .github/actions/build_argos_mobile_cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Cache Argos mobile"

runs:
using: "composite"
steps:
- name: Cache Argos mobile
id: cache-argos-mobile
uses: actions/cache@v4
env:
cache-name: cache-argos-mobile
with:
path: |
${{ github.workspace }}/screenshots/reactMobile
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
18 changes: 18 additions & 0 deletions .github/actions/build_cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Cache builds"

runs:
using: "composite"
steps:
- name: Cache builds
id: cache-builds
uses: actions/cache@v4
env:
cache-name: cache-builds
with:
path: |
${{ github.workspace }}/react/Icon/icons-sprites.js
${{ github.workspace }}/react/palette.js
${{ github.workspace }}/transpiled
${{ github.workspace }}/dist
${{ github.workspace }}/build
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
18 changes: 18 additions & 0 deletions .github/actions/build_cache_read/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Read builds cache"

runs:
using: "composite"
steps:
- name: Read builds cache
id: cache-builds-read
uses: actions/cache/restore@v4
env:
cache-name: cache-builds
with:
path: |
${{ github.workspace }}/react/Icon/icons-sprites.js
${{ github.workspace }}/react/palette.js
${{ github.workspace }}/transpiled
${{ github.workspace }}/dist
${{ github.workspace }}/build
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
20 changes: 20 additions & 0 deletions .github/actions/setup_argos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Setup Argos"

runs:
using: "composite"
steps:
- uses: ./.github/actions/setup_modules
- name: Cache puppeteer
id: cache-node-modules-puppeteer
uses: actions/cache@v4
env:
cache-name: cache-node-modules-puppeteer
with:
path: |
${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
- name: Argos - Prepare env
if: ${{ steps.cache-node-modules-puppeteer.outputs.cache-hit != 'true' }}
shell: bash
run: |
yarn add puppeteer@"22.15.0" --dev --exact
21 changes: 21 additions & 0 deletions .github/actions/setup_modules/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Setup modules"

runs:
using: "composite"
steps:
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
${{ github.workspace }}/node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
- name: Install packages
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
shell: bash
run: yarn install --frozen-lockfile
8 changes: 8 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
minApprovals:
MEMBER: 1
requiredLabels:
- merge
reportStatus: true
blockingChecks:
status: 'pending'
mergeMethod: rebase
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
commit-message:
# Prefix all commit messages with "fix"
prefix: "fix"
schedule:
interval: "weekly"
day: "saturday"
labels:
- ":package: dependencies"
7 changes: 0 additions & 7 deletions .github/pull_request_template.md

This file was deleted.

116 changes: 116 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Build and Deploy Cozy-ui
on:
push:
branches: [ master ]
pull_request:
env:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_modules
prepareArgos:
needs: [install]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_argos
build:
needs: [install]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ./.github/actions/setup_modules
- uses: ./.github/actions/build_cache
- name: Lint
run: yarn lint
- name: Generate Sprite and Palette
run: yarn makeSpriteAndPalette
- name: Build JS
run: yarn build
- name: Build CSS
run: yarn build:css:all
- name: Build docs
run: |
yarn build:doc:react
yarn build:doc:kss
test:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_modules
- uses: ./.github/actions/build_cache_read
- name: BundleMon
uses: lironer/bundlemon-action@v1
- name: Tests
run: yarn test
argosDesktop:
needs: [prepareArgos, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_argos
- uses: ./.github/actions/build_cache_read
- uses: ./.github/actions/build_argos_desktop_cache
- name: Argos - Create desktop screenshots
run: |
mkdir -p ./screenshots
yarn screenshots --mode react --viewport desktop --screenshot-dir ./screenshots/reactDesktop
argosMobile:
needs: [prepareArgos, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_argos
- uses: ./.github/actions/build_cache_read
- uses: ./.github/actions/build_argos_mobile_cache
- name: Argos - Create mobile screenshots
run: |
mkdir -p ./screenshots
yarn screenshots --mode react --viewport 300x600 --screenshot-dir ./screenshots/reactMobile
argosKss:
needs: [prepareArgos, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_argos
- uses: ./.github/actions/build_cache_read
- uses: ./.github/actions/build_argos_kss_cache
- name: Argos - Create kss screenshots
run: |
mkdir -p ./screenshots
yarn screenshots --mode kss --screenshot-dir ./screenshots/kss
argosUpload:
needs: [argosDesktop, argosMobile, argosKss]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_argos
- uses: ./.github/actions/build_argos_desktop_cache
- uses: ./.github/actions/build_argos_mobile_cache
- uses: ./.github/actions/build_argos_kss_cache
- name: Argos - Upload all screenshots
run: |
UUID=$(uuidgen)
yarn argos:upload --parallel screenshots/reactDesktop/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore ''
yarn argos:upload --parallel screenshots/reactMobile/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore ''
yarn argos:upload --parallel screenshots/kss/ --token $ARGOS_TOKEN --parallel-total 3 --parallel-nonce $GITHUB_RUN_ID-${UUID} --ignore ''
deploy:
needs: [argosUpload, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ./.github/actions/setup_modules
- uses: ./.github/actions/build_cache_read
- name: Deploy
if: ${{ github.ref_name == 'master' }}
run: yarn deploy:doc --username cozycloud --email contact@cozycloud.cc --repo https://cozy-bot:$GH_TOKEN@github.com/cozy/cozy-ui.git && yarn semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -22,5 +22,7 @@ desktop.ini
.cache
transpiled

# Generated files
react/Icon/icons-sprite.js
react/palette.js
/screenshots
11 changes: 9 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -8,11 +8,18 @@ build
.travis.yml
renovate.json
yarn.lock
/scripts

.changelog
examples
docs
coverage
codemods
loaders
.github/

# Do not ship postcss.config.js in the npm package otherwise
# parcel will try to use it if it is present.
# Since parcel users will use the transpiled version of cozy-ui
# that has already been processed by postcss, it is not necessary.
postcss.config.js

screenshots/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
1 change: 1 addition & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
11 changes: 11 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"settings": {
"bullet": "*",
"fences": true,
"listItemIndent": "1"
},
"plugins": [
"remark-preset-lint-recommended",
["lint-list-item-indent", "space"]
]
}
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

Loading