Skip to content

Commit

Permalink
Merge pull request #20 from patternfly/no-global-css
Browse files Browse the repository at this point in the history
No global css
  • Loading branch information
jschuler authored Jul 21, 2021
2 parents a6370dd + 5330841 commit 2d98acc
Show file tree
Hide file tree
Showing 32 changed files with 237 additions and 196 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ yarn install
# Start the development server
yarn start

# Run a production build (outputs to "packages/module/dist" dir)
# Build the main module (outputs to "packages/module/dist" dir)
yarn build

# Quick build of the main module for local dev
yarn build:quick
```
2 changes: 1 addition & 1 deletion eslint-plugin-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"eslint-plugin-react": "7.17.0",
"eslint-plugin-react-hooks": "2.3.0",
"eslint-plugin-sort-class-members": "1.6.0",
"merge": "1.2.1",
"merge": "2.1.1",
"prettier": "1.19.1"
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
],
"scripts": {
"build": "yarn workspace @patternfly/quickstarts build",
"build:quick": "yarn workspace @patternfly/quickstarts quick",
"start": "yarn workspace @patternfly/quickstarts-dev start",
"watch": "yarn build && concurrently --kill-others \"yarn workspace @patternfly/quickstarts watch\" \"yarn start\"",
"dev:build": "yarn workspace @patternfly/quickstarts-dev build",
Expand Down
12 changes: 6 additions & 6 deletions packages/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
"serve": "serve public"
},
"dependencies": {
"@patternfly/quickstarts": "1.0.2",
"@patternfly/quickstarts": "1.1.0-rc.1",
"@patternfly/react-core": "^4.101.3",
"asciidoctor": "^2.2.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-router-dom": "^5.2.0",
"i18next": "^19.8.3",
"i18next-browser-languagedetector": "^6.0.1",
"i18next-parser": "^3.3.0",
"i18next-pseudo": "^2.2.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-i18next": "^11.7.3",
"react-router-dom": "^5.2.0",
"showdown": "1.8.6"
},
"devDependencies": {
Expand All @@ -34,7 +34,6 @@
"css-loader": "^5.0.0",
"file-loader": "^6.1.1",
"html-webpack-plugin": "^5.0.0-beta.6",
"js-yaml-loader": "^1.2.2",
"jsonpath": "^1.1.0",
"local-web-server": "^2.6.1",
"mini-css-extract-plugin": "^1.0.0",
Expand All @@ -49,6 +48,7 @@
"webpack": "^5.1.3",
"webpack-cli": "^4.0.0",
"webpack-dev-server": "^3.11.2",
"yaml": "^1.10.2"
"yaml": "^1.10.2",
"yaml-loader": "^0.6.0"
}
}
4 changes: 4 additions & 0 deletions packages/dev/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@
transform: rotate(360deg);
}
}

.catalog-sub {
margin: 0 0 11.5px;
}
4 changes: 3 additions & 1 deletion packages/dev/src/CustomCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export const CustomCatalog: React.FC = () => {
<QuickStartCatalogSection>
<TextContent>
<Text component="h2">Quick starts</Text>
<Text component="p">Step-by-step instructions and tasks</Text>
<Text component="p" className="catalog-sub">
Step-by-step instructions and tasks
</Text>
</TextContent>
<Gallery className="co-quick-start-catalog__gallery" hasGutter>
{allQuickStarts
Expand Down
6 changes: 3 additions & 3 deletions packages/dev/src/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button, PageSection, Stack, StackItem } from '@patternfly/react-core';
import { Button, PageSection, Stack, StackItem, Title } from '@patternfly/react-core';
import { QuickStartContext } from '@patternfly/quickstarts';
import i18n from './i18n/i18n';

Expand All @@ -16,8 +16,8 @@ export const Home: React.FunctionComponent = () => {
return (
<>
<PageSection>
<h1>Quick starts demo app</h1>
<p>To view all quick starts, click the left "Quick Starts" nav item</p>
<Title headingLevel="h1">Quick starts demo app</Title>
<p>To view all quick starts, click the left "Quick starts" nav item</p>
</PageSection>
<PageSection>
<Stack hasGutter>
Expand Down
12 changes: 3 additions & 9 deletions packages/dev/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
/*
Projects would typically either load the base.css stylesheet (in combination with PF react components)
or load the whole patternfly stylesheet (and maybe null load react-styles imported stylesheets from PF react components)
*/

// import '@patternfly/patternfly/patternfly.css';
// import '@patternfly/patternfly/utilities/Accessibility/accessibility.css';
import '@patternfly/react-core/dist/styles/base.css';

import '@patternfly/quickstarts/dist/quickstarts.min.css';
import '@patternfly/quickstarts/dist/quickstarts-bootstrap.min.css';
import '@patternfly/quickstarts/dist/quickstarts.css';
import '@patternfly/quickstarts/dist/quickstarts-bootstrap.css';

import React from 'react';
import ReactDOM from 'react-dom';
import { Route, BrowserRouter as Router, Switch } from 'react-router-dom';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ spec:
durationMinutes: 10
icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGUAAABlCAYAAABUfC3PAAAQrElEQVR4Xu2dd3wU1RbHfymkQBomkAYEiICCSFDkw3uACaIi0mJBKT4JRgSehSAoyEMMykMUpfgBBaSEjw8BfX4oL4ogQmjqB5CignQSSgrpZdOTeZ8zYdbdzczO3dm5uxtx/oLMnXvPOd97bj33rhuawFOTeVmoPnsC1edOoC4rHbWZ6aLU9P/6smJZDTzDo+AZ3l58531vHNz9g+DVOQa+vQa4ubrKLilg1dnjQnnaVlT9nGbV8FqNS8AIEMFqHhePZhEdXMoOLiOMYe8WoWLfVhAMpdqvFYLadwTJNzYefsMS4N2lp9Nt4lQBqFkq+XwJDKkpDgehBIoA+Y9OQuCYqU6zjVMKrji6VyhelYzKY/vUKrFT3/sNHYfAF5Id3rw5FEpTgWFZExwNxyFQqOMu/DDJ5T1DzS39R01B8PSl3G3GvYD8D6YIpZuWqunbZN67+wWKTRrPPocbFGqq8ucmoDYro8kY3BZBfe6JRXByCpf+hguUP5t3KMEir2k5bQn8h43X1Y66ZkZD3Nxp8ag+f9KWStfk09JAIC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JIPcyIsFSIP82qMW9QKi1mxJ5TBDYflFCJ5ASGAasdHoS1qbYgVib8C1HlBs+WUIZigkmLXLo3kDkQwjNWGsQFyh6ZK7ktAaaJugUEZyw2RHAZEU6bTtLKoDQpgqsJB+BlfG23/kgqkwmURafm3IZihUbl7yOIGiU+hxNBAqkyIVI1fshhAYbNVWdacO49pLfH43hRWS2r32cvlogiKBKU1dz+0iZRalQybPhd+g0WZwSCHhxlUUfDoPpbv5HgtXk1ELEMpTMxT6+OJTPYTiM7fWT9KqgZDeawViNxTK4OzQaMFw5SKrrLdEOnuA6ALlLzDm9cxeILpBoYwuJ8YKhUcajgfcio+WUZaSnezqUywzzVk6U8hc+574Mxq30kMTw44rd6n+1harTXSFQoUajh8QLk18GDWVFawyNOl0tvxUIKuiukORCv6zN2fUXEU8N4PpJwJZYUjpuEGhAop3bhKuvDn+T+c1chEothreWnquUKSCM6bGCwV7tjX5vob6jogp8xtFn+gJRNfRF4tg1KQVHd3f5ODQxlTI8HFWfwaQRX/WNA7xFEthmgocR8NwSJ+iVjOuJycKBd987nJ9DvUZwcMTuHTiajZxePOlJBANCHLXLoDh/G+oq61lkVv3NNRfBPQdhJBnp+k239AqpFOaL2vCEqCCLz5B+dmTqCop0qqX6nc0pPUOCUVg/yEIGpHgdBCmArscFEtrEqSyH79Dxe8/o+p6OmrLy2z2JvG+E28f+LbvguZ3/w1+9w9xKQiWOrs8FDWvqs1rOLJn+fh07eXShrem1/8BWjy0OmdfIfEAAAAASUVORK5CYII=
description: Import an application from Git, add a pipeline to it, and run the Pipeline.
introduction: 'This quick start guides you through creating an application and associating
it with a CI/CD pipeline.
'
introduction: This quick start guides you through creating an application and associating it with a CI/CD pipeline.
tasks:
- title: Importing an application and associate it with a pipeline
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ spec:
icon: data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz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Y3g9IjY4LjkxIiBjeT0iNTQuMzEiIHI9IjIuMTUiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNCIgY3g9Ijc3Ljk0IiBjeT0iMzcuNzMiIHI9IjIuMTUiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNCIgY3g9IjU5LjcyIiBjeT0iMzcuNzMiIHI9IjIuMTUiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNCIgY3g9IjUwIiBjeT0iMzMuMSIgcj0iMy4wMSIvPjxjaXJjbGUgY2xhc3M9ImNscy00IiBjeD0iMzEuMDkiIGN5PSIzMy4xIiByPSIzLjAxIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTQiIGN4PSI2OC44OSIgY3k9IjMzLjEiIHI9IjMuMDEiLz48L3N2Zz4=
durationMinutes: 15
description: Learn how to create a Serverless application.
introduction: This quick start guides you through creating and using a serverless
application.
introduction: This quick start guides you through creating and using a serverless application.
tasks:
- title: Creating a serverless application
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ spec:
1. In the **Git Repo URL** field, add
```
```
https://github.com/snowdrop/rest-http-example
```
```
1. Click **Show advanced Git options** to expose additional form fields.
1. Add
```
2.3.4-2-redhat
```
```
2.3.4-2-redhat
```
to the **Git reference** field.
1. At the end of the form, click **Create**.
Expand Down
3 changes: 2 additions & 1 deletion packages/dev/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ module.exports = (_env, argv) => {
},
{
test: /\.ya?ml$/,
use: 'js-yaml-loader',
type: 'json',
use: 'yaml-loader',
},
],
},
Expand Down
32 changes: 14 additions & 18 deletions packages/module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yarn add @patternfly/quickstarts

If your project doesn't already have these installed, you'll need:
```bash
yarn add @patternfly/react-core showdown@1.8.6
yarn add @patternfly/react-core showdown
```

### Stylesheets
Expand All @@ -31,16 +31,15 @@ import '@patternfly/quickstarts/dist/quickstarts-bootstrap.min.css';

## Usage

In your main app file wrap your application with the QuickStartContext and the QuickStartDrawer:
In your main app file wrap your application with the QuickStartContextProvider and the QuickStartDrawer:

```js
import {
QuickStartDrawer,
QuickStartContext,
QuickStartContextProvider,
QuickStartCatalogPage,
useValuesForQuickStartContext,
useLocalStorage,
QuickStartContextValues
} from '@patternfly/quickstarts';
// for how these quick start yaml files should look see below
import quickstartOne from '.yamls/quickstart-one.yaml';
Expand All @@ -52,35 +51,32 @@ const App = () => {
// Otherwise you can use React.useState here or another means (backend) to store the active quick start ID and state
const [activeQuickStartID, setActiveQuickStartID] = useLocalStorage('quickstartId', '');
const [allQuickStartStates, setAllQuickStartStates] = useLocalStorage('quickstarts', {});
const valuesForQuickstartContext = useValuesForQuickStartContext({
const valuesForQuickstartContext = {
// array of quick starts
allQuickStarts,
// the next 4 items tie the quick start state to the main app
activeQuickStartID,
setActiveQuickStartID,
allQuickStartStates,
setAllQuickStartStates
});
};

return (
<QuickStartContext.Provider value={valuesForQuickstartContext}>
<QuickStartContextProvider value={valuesForQuickstartContext}>
<QuickStartDrawer>
<div>
<h1>My app</h1>
<button onClick={() => valuesForQuickstartContext.setActiveQuickStart('a quickstart id')}>
Open a quickstart
</button>
<QuickStartCatalogPage />
</div>
<SomeNestedComponent />
<QuickStartCatalogPage />
</QuickStartDrawer>
</QuickStartContext.Provider>
</QuickStartContextProvider>
);
};

const SomeNestedComponent = () => {
const qsContext = React.useContext<QuickStartContextValues> QuickStartContext;
const qsContext = React.useContext<QuickStartContextValues>(QuickStartContext);
// the quick start ID is defined in the quick start object's metadata.name field
return (
<button onClick={() => qsContext.setActiveQuickStart('a quickstart id')}>
Open a quickstart from a nested component
<button onClick={() => qsContext.setActiveQuickStart('a_quickstart_id')}>
Toggle quick start
</button>
);
};
Expand Down
24 changes: 12 additions & 12 deletions packages/module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patternfly/quickstarts",
"version": "1.0.2",
"version": "1.1.0-rc.1",
"description": "PatternFly quick starts",
"files": [
"dist"
Expand All @@ -21,7 +21,8 @@
"clean": "rm -rf dist",
"prebuild": "yarn clean",
"build": "rollup -c && yarn post-css",
"watch": "rollup -cw",
"watch": "rollup -w --config rollup-quick.config.js",
"quick": "rollup --config rollup-quick.config.js",
"test": "LANG=en_US.UTF-8 jest",
"format": "prettier --check --write ./src/**/*.{tsx,ts}",
"type-check": "tsc --noEmit",
Expand All @@ -34,25 +35,24 @@
"clean-css": "yarn clean-css:quickstarts && yarn clean-css:bootstrap"
},
"peerDependencies": {
"@patternfly/patternfly": ">=4.90.5",
"@patternfly/react-catalog-view-extension": ">=4.10.13",
"@patternfly/react-core": ">=4.101.3",
"@patternfly/react-icons": ">=4.9.5",
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"@patternfly/react-core": ">=4.101.3",
"showdown": ">=1.8.6"
},
"dependencies": {
"@patternfly/patternfly": "4.108.2",
"@patternfly/react-catalog-view-extension": "4.11.42",
"@patternfly/react-core": "4.128.2",
"bootstrap-sass": "^3.3.7",
"classnames": "^2.2.6",
"dompurify": "^2.2.6",
"history": "^5.0.0",
"showdown": "1.8.6"
},
"devDependencies": {
"@patternfly/patternfly": "4.122.2",
"@patternfly/react-catalog-view-extension": "4.12.15",
"@patternfly/react-core": "4.135.15",
"@patternfly/react-icons": "4.11.4",
"@patternfly/react-tokens": "4.12.5",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.1.0",
Expand All @@ -68,7 +68,6 @@
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.6.1",
"sass": "^1.35.2",
"node-sass": "^6.0.1",
"prettier": "^2.1.2",
"purgecss": "^4.0.0",
Expand All @@ -80,11 +79,12 @@
"rimraf": "^3.0.2",
"rollup": "^2.37.0",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-node-externals": "^2.2.0",
"rollup-plugin-scss": "^3.0.0",
"rollup-plugin-typescript2": "^0.29.0",
"rollup-plugin-visualizer": "^5.5.0",
"rollup-plugin-copy": "^3.4.0",
"sass": "^1.35.2",
"tslib": "^2.0.3"
}
}
3 changes: 3 additions & 0 deletions packages/module/rollup-quick.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { esBuild, cssBootstrap } from './rollup.config';

export default [esBuild, cssBootstrap];
Loading

0 comments on commit 2d98acc

Please sign in to comment.