Skip to content

Commit

Permalink
Merge pull request #79 from dnbexperience/develop
Browse files Browse the repository at this point in the history
Release of v2
  • Loading branch information
tujoworker authored Feb 7, 2019
2 parents c20cdce + 613c97b commit 323c195
Show file tree
Hide file tree
Showing 211 changed files with 3,993 additions and 4,104 deletions.
20 changes: 18 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

deploy-preview:
docker:
- image: circleci/node:10.6
- image: circleci/node:latest-browsers
working_directory: ~/repo
steps:
- checkout
Expand All @@ -59,6 +59,10 @@ jobs:
paths:
- ~/.cache/yarn

- run: yarn audit-ci
- run: yarn lint-ci
- run: yarn test-ci

- run:
name: Prepublish the ui-lib and commit changes
command: yarn prepublish-ci
Expand All @@ -67,9 +71,13 @@ jobs:
name: Build the portal, just to test if the build is successful
command: yarn build-ci

- run:
name: Run screenshot tests
command: test-ci-screenshots

deploy-release:
docker:
- image: circleci/node:10.6
- image: circleci/node:latest-browsers
working_directory: ~/repo
steps:
- checkout
Expand All @@ -93,6 +101,10 @@ jobs:
paths:
- ~/.cache/yarn

- run: yarn audit-ci
- run: yarn lint-ci
- run: yarn test-ci

- run:
name: Prepublish the ui-lib to use it in "build-ci"
command: yarn prepublish-ci
Expand All @@ -101,6 +113,10 @@ jobs:
name: Build the portal
command: yarn build-ci

- run:
name: Run screenshot tests
command: test-ci-screenshots

- run:
name: Deploy the portal
command: yarn deploy-ci
Expand Down
5 changes: 4 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
- rc/*

- name: deploy-preview
image: node:10.6
image: buildkite/puppeteer
environment:
FIGMA_MAIN_FILE:
from_secret: FIGMA_MAIN_FILE
Expand All @@ -42,10 +42,12 @@ steps:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn audit-ci
- yarn lint-ci
- yarn test-ci
- yarn prepublish-ci
- yarn build-ci
- yarn test-ci-screenshots
when:
event:
- push
Expand Down Expand Up @@ -74,6 +76,7 @@ steps:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn audit-ci
- yarn lint-ci
- yarn test-ci
- yarn prepublish-ci
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:

- stage: deploy-preview
name: Build a portal preview
script: yarn prepublish-ci && yarn build-ci
script: yarn audit-ci && yarn lint-ci && yarn test-ci && yarn prepublish-ci && yarn build-ci && test-ci-screenshots

- stage: deploy-release
name: Deploy portal and make eventually NPM release
script: yarn prepublish-ci && yarn build-ci && yarn deploy-ci && yarn publish-ci
script: yarn audit-ci && yarn lint-ci && yarn test-ci && yarn prepublish-ci && yarn build-ci && test-ci-screenshots && yarn deploy-ci && yarn publish-ci

stages:
- name: test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Find more information on how to use the Design System on the [Eufemia Portal](ht

## Requirements

Install [Node](https://nodejs.org) and [Yarn](https://yarnpkg.com).
Install [Node.js](https://nodejs.org) and [yarn](https://yarnpkg.com).

## Setup Instructions

Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@
],
"main": "./packages/dnb-ui-lib/index.js",
"scripts": {
"prepublish-ci": "cd ./packages/dnb-ui-lib && yarn prepublish-ci && cd -",
"precommit": "cd ./packages/dnb-ui-lib && yarn precommit && cd - && cd ./packages/dnb-design-system-portal && yarn precommit && cd -",
"build-ci": "cd ./packages/dnb-design-system-portal && yarn build-ci && cd -",
"deploy-ci": "cd ./packages/dnb-design-system-portal && yarn deploy-ci && cd -",
"start": "cd ./packages/dnb-design-system-portal && yarn start && cd -",
"lint-ci": "cd ./packages/dnb-ui-lib && yarn lint-ci && cd - && cd ./packages/dnb-design-system-portal && yarn lint-ci && cd -",
"publish-ci": "cd ./packages/dnb-ui-lib && yarn publish-ci && cd -",
"reset": "rm -rf ./node_modules && rm yarn.lock && rm -rf ./packages/dnb-ui-lib/node_modules && rm -rf ./packages/dnb-design-system-portal/node_modules && yarn install",
"build": "cd ./packages/dnb-ui-lib && yarn build && cd - && cd ./packages/dnb-design-system-portal && yarn build && cd -",
"test": "cd ./packages/dnb-ui-lib && yarn test && cd -",
"test:update": "cd ./packages/dnb-ui-lib && yarn test:update && cd -",
"test-ci": "cd ./packages/dnb-ui-lib && yarn test-ci && cd - && cd ./packages/dnb-design-system-portal && yarn test-ci && cd -",
"test-ci:update": "yarn test-ci --updateSnapshot"
"audit-ci": "yarn workspace dnb-ui-lib audit-ci",
"prepublish-ci": "yarn workspace dnb-ui-lib prepublish-ci",
"precommit": "yarn workspace dnb-ui-lib precommit && yarn workspace dnb-design-system-portal precommit",
"build-ci": "yarn workspace dnb-design-system-portal build-ci",
"deploy-ci": "yarn workspace dnb-design-system-portal deploy-ci",
"start": "yarn workspace dnb-design-system-portal start",
"lint-ci": "yarn workspace dnb-ui-lib lint-ci && yarn workspace dnb-design-system-portal lint-ci",
"publish-ci": "yarn workspace dnb-ui-lib publish-ci",
"reset": "rm -rf ./node_modules && rm -rf ./packages/dnb-ui-lib/node_modules && rm -rf ./packages/dnb-design-system-portal/node_modules && yarn install",
"build": "yarn workspace dnb-ui-lib build && yarn workspace dnb-design-system-portal build",
"test": "yarn workspace dnb-ui-lib test",
"test:update": "yarn workspace dnb-ui-lib test:update",
"test-ci": "yarn workspace dnb-ui-lib test-ci && yarn workspace dnb-design-system-portal test-ci",
"test-ci-screenshots": "yarn workspace dnb-ui-lib test-ci-screenshots"
},
"devDependencies": {
"husky": "^1.3.1"
Expand Down
10 changes: 1 addition & 9 deletions packages/dnb-design-system-portal/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// Load dev styles (to use hot reloading, we do have to import the styles in here)
if (process.env.NODE_ENV === 'development') {
require('dnb-ui-lib/src/style/core') // import the core styles
require('dnb-ui-lib/src/style/patterns') // import ony patterns
require('dnb-ui-lib/src/style/components') // import ony components
// // require('dnb-ui-lib/src/style/themes/open-banking') // import the "open-banking" theme
Expand All @@ -22,19 +23,10 @@ const { applyPageFocus } = require('dnb-ui-lib/src/shared/tools')
exports.disableCorePrefetching = () => false

exports.onRouteUpdate = ({ prevLocation }) => {
// if (typeof window !== 'undefined') {
// // -1 makes Safari scroll to the top on route changes
// window.scrollTo(0, -1)
// }
// if previous location is not null
// witch means that this was an page change/switch
// then we apply the page content focus for accissibility
if (prevLocation) {
applyPageFocus('content')
} else {
applyPageFocus('sidebar')
}
}
// exports.shouldUpdateScroll = () => {
// return false
// }
50 changes: 25 additions & 25 deletions packages/dnb-design-system-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint-ci": "yarn lint:js && yarn lint:styles",
"lint-staged": "lint-staged",
"lint:js": "yarn lint --fix",
"lint:js:staged": "yarn lint:js",
"lint:js:staged": "eslint --quiet --fix",
"lint:styles": "stylelint './src/**/*.{js,css}'",
"lint:styles:staged": "stylelint",
"make-ui-lib-pages": "babel-node ./scripts/uilib/makeDemosFactory.js && yarn prettier:components",
Expand All @@ -34,7 +34,7 @@
"start": "rm -rf .cache | cross-env DEBUG=gatsby:query-watcher gatsby develop",
"test": "jest --watch",
"test-ci": "jest --ci",
"test:staged": "jest --bail --findRelatedTests :#keep this whitespace",
"test:staged": "jest --bail --findRelatedTests ",
"test:update": "jest --updateSnapshot",
"prettier:components": "prettier --loglevel warn --write './src/uilib/{components,patterns}/**/*.{js,md}' './src/pages/uilib/{components,elements,patterns}/*.{js,md}'",
"prettier:diff": "prettier --list-different '{scripts,stories,src}/**/*.{js,md}'",
Expand All @@ -55,64 +55,64 @@
"@babel/node": "^7.2.2",
"@babel/plugin-proposal-class-properties": "^7.3.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
"@babel/plugin-syntax-jsx": "^7.2.0",
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"@mdx-js/mdx": "0.16.8",
"@mdx-js/tag": "0.16.8",
"babel-plugin-emotion": "^10.0.6",
"babel-plugin-emotion": "^10.0.7",
"camelcase": "^5.0.0",
"ci-info": "^2.0.0",
"classnames": "^2.2.6",
"clean-html": "^1.5.0",
"color": "^3.1.0",
"cross-env": "^5.2.0",
"del": "^3.0.0",
"emotion": "^10.0.6",
"emotion": "^10.0.7",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.8.0",
"enzyme-adapter-react-16": "^1.9.1",
"enzyme-to-json": "^3.3.5",
"eslint": "^5.12.1",
"eslint-plugin-import": "^2.15.0",
"eslint-plugin-jsx-a11y": "^6.2.0",
"eslint": "^5.13.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.12.4",
"front-matter": "^3.0.1",
"fs-extra": "^7.0.1",
"gatsby": "^2.0.103",
"gatsby-link": "^2.0.9",
"gatsby": "^2.0.115",
"gatsby-link": "^2.0.10",
"gatsby-mdx": "^0.3.5",
"gatsby-plugin-catch-links": "^2.0.9",
"gatsby-plugin-emotion": "^4.0.1",
"gatsby-plugin-manifest": "^2.0.14",
"gatsby-plugin-catch-links": "^2.0.10",
"gatsby-plugin-emotion": "^4.0.3",
"gatsby-plugin-manifest": "^2.0.17",
"gatsby-plugin-offline": "^2.0.22",
"gatsby-plugin-postcss": "^2.0.3",
"gatsby-plugin-react-helmet": "^3.0.5",
"gatsby-plugin-sass": "^2.0.8",
"gatsby-plugin-sharp": "^2.0.18",
"gatsby-remark-images": "^3.0.1",
"gatsby-source-filesystem": "^2.0.18",
"gatsby-plugin-postcss": "^2.0.5",
"gatsby-plugin-react-helmet": "^3.0.6",
"gatsby-plugin-sass": "^2.0.10",
"gatsby-plugin-sharp": "^2.0.20",
"gatsby-remark-images": "^3.0.3",
"gatsby-source-filesystem": "^2.0.20",
"gh-pages": "^2.0.1",
"jest": "^23.6.0",
"jest": "^24.1.0",
"jest-css-modules": "^1.1.0",
"jest-emotion": "^10.0.6",
"jest-emotion": "^10.0.7",
"jest-raw-loader": "^1.0.1",
"keycode": "^2.2.0",
"lint-staged": "^8.1.1",
"lint-staged": "^8.1.3",
"live-server": "^1.2.1",
"mime": "^2.4.0",
"nodemon": "^1.18.9",
"ora": "^3.0.0",
"postcss-preset-env": "^6.5.0",
"prettier": "^1.16.1",
"prettier": "^1.16.4",
"prettier-package-json": "^2.0.1",
"pretty": "^2.0.0",
"prism-react-renderer": "^0.1.5",
"raw-loader": "^1.0.0",
"react-fake-props": "^0.3.1",
"react-helmet": "^5.2.0",
"react-live": "^1.12.0",
"react-live-replacement": "https://github.com/tujoworker/react-live/",
"react-live-replacement": "https://github.com/tujoworker/react-live/tarball/d9a44a8b8093a3cb57734d901200f7b66cd30515",
"stylelint": "^9.10.1",
"stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.5.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-design-system-portal/scripts/commitPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
*/

import { commitToBranch } from '../../dnb-ui-lib/scripts/tools/commitToBranch'
import { commitToBranch } from '../../dnb-ui-lib/scripts/prepub/commitToBranch'

if (require.main === module) {
commitToBranch({
Expand Down
3 changes: 1 addition & 2 deletions packages/dnb-design-system-portal/src/core/jest/jestSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*
*/

import * as emotion from 'emotion'
import { createSerializer } from 'jest-emotion'
import fakeProps from 'react-fake-props'
import { mount, render, shallow } from './enzyme'
Expand All @@ -16,7 +15,7 @@ export { toJson }
export { providerProps }

expect.addSnapshotSerializer(
createSerializer(emotion, {
createSerializer({
classNameReplacer(className, index) {
return `jest-class-name-${index}`
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-design-system-portal/src/pages/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class PageNotFound extends PureComponent {
const { pathname } = this.props.location

return (
<Center className="dnb-style">
<Center className="dnb-spacing">
<Inner>
<h1>404</h1>
<h2>We couldn't find that page:</h2>
Expand Down
18 changes: 11 additions & 7 deletions packages/dnb-design-system-portal/src/pages/design-system/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ The goal is to have a single source of truth for design through color, typograph

Thank You for all who as contributed to build Eufemia. People who has contributed heavily to Eufemia are:

- Jens Thuland
- Sindre Marken
- Casper Brekke
- Tobias Høegh
- Kevin Murphy
- [Jens Thuland](https://dnb.enterprise.slack.com/user/@WE4QCR6PQ)
- [Sindre Marken](https://dnb.enterprise.slack.com/user/@WDUUEJNVC)
- [Casper Brekke](https://dnb.enterprise.slack.com/user/@WDU4VCEP5)
- [Tobias Høegh](https://dnb.enterprise.slack.com/user/@WE2M4E65N)
- [Kevin Murphy](https://dnb.enterprise.slack.com/user/@WE38HLQQ4)
- Hans Kristian Smedsrød
- Nicolai Rygh

The DNB ASA Design System is build together with [EGGS Design](https://eggsdesign.com/).
The DNB ASA Design System (Eufemia) is build together with [EGGS Design](https://eggsdesign.com/).

## More People to thank

- [Nicolai Rygh](https://dnb.enterprise.slack.com/user/@WDY36GXKM)
-
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Secondary Icons are an addition to the [Primary Icons](/icons/primary). They

The Secondary Icons can be extended infinitely.

**Technically:** The consequence is that they have to be [imported](/uilib/components/icon#info) where ever they have to be used.
**Technically:** The consequence is that they have to be [imported](/uilib/components/icon) where ever they have to be used.

#### A list of all Secondary Icons

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'Accordion'
draft: false
status: 'wip'
# order: 1
order: 1
---

import Tabs from 'Tags/Tabs'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
---
title: 'Button'
draft: false
status: null
order: 1
order: 2
---

<!--
ATTENTION: This file is auto generated by using "makeDemosFactory".
Do not change the content!
-->
import Tabs from 'Tags/Tabs'

import ButtonPage from 'Src/uilib/components/demos/Button'
import FirstTabContent from 'Pages/uilib/components/button/button-info'
import SecondTabContent from 'Pages/uilib/components/button/button-properties'
import ThirdTabContent from 'Pages/uilib/components/button/button-events'

<ButtonPage />
# Button

<Tabs>
<Tabs.Content>
<FirstTabContent />
</Tabs.Content>
<Tabs.Content>
<SecondTabContent />
</Tabs.Content>
<Tabs.Content>
<ThirdTabContent />
</Tabs.Content>
</Tabs>
Loading

0 comments on commit 323c195

Please sign in to comment.