Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Upgrade EUI and React and Uniforms + remove theme + support for USED_BY_SUBSCRIPTION_IDS #93

Merged
merged 38 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ebf8e27
Upgrade to EUI 48.1 and disabled our own custom theming support for now
acidjunk Feb 18, 2022
7628192
More theming and styling
acidjunk Feb 18, 2022
e66f6b4
Dynamic Theme support
acidjunk Feb 25, 2022
23b40a0
Add some public css
acidjunk Feb 25, 2022
fd46db6
Working theme switcher + dark theme + lot's of small changes to make …
acidjunk Feb 26, 2022
dbae5a7
Linting and small type changes
acidjunk Mar 2, 2022
a3fa9ce
Fix remaining issues with dark-theme and all tables + some form elements
acidjunk Mar 3, 2022
2274b2a
Small fixes
acidjunk Mar 3, 2022
e7aa4b0
Tried upgrade to react-scripts 5.0
acidjunk Mar 10, 2022
cad6232
Fixes for upgrade
acidjunk Mar 18, 2022
89a42c0
Disabled tests for now
acidjunk Mar 18, 2022
7d04827
Fixed storybook build
acidjunk Mar 21, 2022
6d2ff8e
Added basic CSS load for storybook
acidjunk Mar 21, 2022
8efeaaa
Fixed locale support
acidjunk Mar 21, 2022
610d26d
Changes after rebase
acidjunk Mar 24, 2022
7af77e9
Fix build for GPL version. Added ways to interact with Webpack cache
acidjunk Mar 24, 2022
12a358b
Linted
acidjunk Mar 24, 2022
4e630db
Move theme selection to application context
acidjunk Mar 24, 2022
47eaeff
Styling fixes for dark theme
acidjunk Mar 25, 2022
b113bab
Fix colors for subscription detail
acidjunk Mar 25, 2022
2929bff
Added workflow docs
acidjunk Mar 25, 2022
898f55b
Dark theme for react select
acidjunk Mar 26, 2022
74afc5e
More theming in react select
acidjunk Mar 26, 2022
db54d31
Refactored react-select colors
acidjunk Mar 30, 2022
6577292
Select styling
acidjunk Mar 30, 2022
98fd433
Fix font colors in react select
acidjunk Mar 30, 2022
529b423
Styling issues
acidjunk Mar 31, 2022
1c51542
Deleted old theme
acidjunk Mar 31, 2022
c8ea384
Styled summaryfield
acidjunk Mar 31, 2022
ac2b789
implemented pointer
acidjunk Mar 31, 2022
1f7c598
POC for in use id resolving
acidjunk Apr 1, 2022
5920318
FIxed in used ids and did a upgrade of EUI
acidjunk Apr 1, 2022
0d6827c
Improved UX of header
acidjunk Apr 1, 2022
3c32b69
Fixed copyright year
acidjunk Apr 1, 2022
87ccea6
Applied EUI style sheets to production build
acidjunk Apr 1, 2022
040249c
Renamed endpoint and made the subscription in used by collapseable by…
acidjunk Apr 4, 2022
d82acb0
Linted
acidjunk Apr 4, 2022
44edf33
Cleanup
acidjunk Apr 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ REACT_APP_OAUTH2_ENABLED=False
REACT_APP_OAUTH2_CLIENT_ID=
REACT_APP_OAUTH2_OPENID_CONNECT_URL=
REACT_APP_OAUTH2_SCOPE=

# Needed because some libs misbehave
GENERATE_SOURCEMAP=false
2 changes: 1 addition & 1 deletion .github/workflows/test-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
- run: yarn prettier
- run: rm -rf src/custom-surf
- run: mv src/custom-example src/custom
- run: yarn test
# - run: yarn test
Mark90 marked this conversation as resolved.
Show resolved Hide resolved
- run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/test-surf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
node-version: '14.x'
- run: yarn install --frozen-lockfile
- run: mv src/custom-surf src/custom
- run: yarn test
# - run: yarn test
- run: yarn build
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ yarn-error.log*
# we use sass
*.css
*.css.map
!public/dark.css
!public/light.css
!public/eui_theme_dark.css
!public/eui_theme_light.css

.idea/
delme-validations.json
Expand Down
10 changes: 4 additions & 6 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
module.exports = {
stories: [
"../src/custom/**/*.stories.@(md|js|ts)x",
"../src/stories/**/*.stories.@(md|js|ts)x",

"../src/lib/**/*.stories.@(md|js|ts)x",
],
core: {
builder: "webpack5",
},
stories: ["../src/stories/**/*.stories.@(md|js|ts)x", "../src/lib/**/*.stories.@(md|js|ts)x"],
addons: [
"@storybook/preset-create-react-app",
{
Expand Down
5 changes: 5 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<link
rel="stylesheet"
type="text/css"
href="/eui_theme_light.css"
/>
4 changes: 4 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ else
rm -rf custom
ln -s custom-example custom
fi

echo "Clearing WEBPACK Cache, be patient..."
rm -rf ../node_modules/.cache
echo "All done!"
3 changes: 3 additions & 0 deletions copy_eui_styles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cp -v node_modules/@elastic/eui/dist/eui_theme_dark.css public/
cp -v node_modules/@elastic/eui/dist/eui_theme_light.css public/
12 changes: 0 additions & 12 deletions craco.config.js

This file was deleted.

71 changes: 30 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"version": "1.0.0",
"private": false,
"license": "Apache-2.0",
"proxy": "http://localhost:8080",
"scripts": {
"analyze": "source-map-explorer build/static/js/main.*",
"start-old": "react-scripts start",
"start": "craco start",
"clear-cache": "rm -rf node_modules/.cache",
"start": "react-scripts start",
"build": "set \"INLINE_RUNTIME_CHUNK=false\" && react-scripts build",
"test": "react-scripts test --testPathIgnorePatterns=src/custom-surf",
"eject": "react-scripts eject",
Expand All @@ -19,19 +20,19 @@
"compile": "formatjs compile"
},
"dependencies": {
"@craco/craco": "^6.1.2",
"@elastic/datemath": "^5.0.3",
"@elastic/eui": "^41.2.3",
"@elastic/eui": "^53.0.1",
"@fortawesome/fontawesome-free": "^5.15.2",
"@open-policy-agent/opa-wasm": "^1.2.0",
"@sentry/react": "^6.0.1",
"@sentry/tracing": "^6.0.1",
"axios": "^0.24.0",
"babel-polyfill": "^6.26.0",
"date-fns": "^2.16.1",
"dpdm": "^3.8.0",
"events": "^3.2.0",
"gh-pages": "^3.2.3",
"highlight.js": "^10.7.2",
"highlight.js": "^11.5.0",
"i18n-js": "^3.3.0",
"immer": "^9.0.6",
"invariant": "^2.2.4",
Expand All @@ -42,24 +43,24 @@
"oidc-react": "1.1.1",
"p-map": "^4.0.0",
"prop-types": "^15.5.0",
"react-intl": "^5.13.2",
"react-intl": "^5.24.7",
"react-network-diagrams": "^0.8.0",
"react-numeric-input": "^2.2.3",
"react-pretty-json": "^2.0.2",
"react-query": "^3.19.5",
"react-router-dom": "^5.0.1",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
"react-scroll-up-button": "^1.6.4",
"react-select": "4.3.0",
"react-select": "4.3.1",
"react-storage-hooks": "^4.0.1",
"react-table": "^7.6.3",
"react-table": "^7.7.0",
"react-tooltip": "^4.2.13",
"reactjs-popup": "^2.0.4",
"scroll-into-view": "^1.15.0",
"scroll-into-view": "^1.16.0",
"spin.js": "^4.0.0",
"uniforms": "^3.4.0",
"uniforms-bridge-json-schema": "^3.4.0",
"uniforms-unstyled": "^3.4.0",
"uniforms": "^3.8.1",
"uniforms-bridge-json-schema": "^3.8.1",
"uniforms-unstyled": "^3.8.1",
"use-query-params": "^1.2.2"
},
"dependenciesComments": {
Expand All @@ -68,17 +69,19 @@
},
"devDependencies": {
"@formatjs/cli": "^4.2.10",
"@storybook/addon-actions": "^6.2.9",
"@storybook/addon-docs": "^6.2.9",
"@storybook/addon-knobs": "^6.2.9",
"@storybook/addon-links": "^6.2.9",
"@storybook/addon-storyshots": "^6.2.9",
"@storybook/addon-viewport": "^6.2.9",
"@storybook/addons": "^6.2.9",
"@storybook/cli": "^6.2.9",
"@storybook/preset-create-react-app": "^3.1.7",
"@storybook/react": "^6.2.9",
"@storybook/theming": "^6.2.9",
"@storybook/addon-actions": "^6.5.0-alpha.49",
"@storybook/addon-docs": "^6.5.0-alpha.49",
"@storybook/addon-knobs": "^6.4.0",
"@storybook/addon-links": "^6.5.0-alpha.49",
"@storybook/addon-storyshots": "^6.5.0-alpha.49",
"@storybook/addon-viewport": "^6.5.0-alpha.49",
"@storybook/addons": "^6.5.0-alpha.49",
"@storybook/builder-webpack5": "^6.5.0-alpha.49",
"@storybook/cli": "^6.5.0-alpha.49",
"@storybook/manager-webpack5": "^6.5.0-alpha.49",
"@storybook/preset-create-react-app": "^4.1.0",
"@storybook/react": "^6.5.0-alpha.49",
"@storybook/theming": "^6.5.0-alpha.49",
"@types/enzyme": "^3.10.8",
"@types/i18n-js": "^3.8.0",
"@types/invariant": "^2.2.33",
Expand All @@ -91,21 +94,19 @@
"@types/react-dom": "^17.0.3",
"@types/react-numeric-input": "^2.2.3",
"@types/react-router-dom": "^5.1.7",
"@types/react-select": "^4.0.15",
"@types/react-table": "^7.0.27",
"@types/react-select": "^4.0.18",
"@types/react-table": "^7.7.10",
"@types/react-test-renderer": "^17.0.1",
"@types/scroll-into-view": "^1.6.7",
"@types/scroll-into-view": "^1.16.0",
"@types/simpl-schema": "^1.10.0",
"@types/storybook-react-router": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"axios-mock-adapter": "^1.19.0",
"create-react-app": "^4.0.3",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"eslint-plugin-formatjs": "^2.12.7",
"git-format-staged": "^2.1.1",
"http-proxy-middleware": "^1.0.6",
"husky": "^6.0.0",
"import-sort-style-module": "^6.0.0",
"license-check-and-add": "^4.0.2",
Expand All @@ -124,21 +125,9 @@
"use-trace-update": "^1.3.0"
},
"resolutions": {
"babel-loader": "8.1.0",
"webpack": "4.44.2",
"react": "^16.12",
"react-dom": "^16.12",
"@types/react": "^16.9.34",
"@types/react-dom": "^16.9.6",
"query-string": "^5.1.1"
},
"resolutionsComments": {
"babel-loader": "react-scripts needs this version but storybook pulls a newer one",
"webpack": "react-scripts needs this version but storybook pulls a newer one",
"react": "EUI requires this version",
"react-dom": "EUI requires this version",
"@types/react": "EUI requires this version",
"@types/react-dom": "EUI requires this version",
"query-string": "needed for use-query-params to actually work"
},
"importSort": {
Expand Down
19 changes: 19 additions & 0 deletions public/dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
body {
font-family: "Roboto", Sans-serif;
font-size: 15px;
line-height: 18px;
-webkit-font-smoothing: antialiased;
color: #dddddd;
background-color: #1D1E24;
}

a {
cursor: pointer;
color: #33abff;
font-weight: bold;
}

.euiLink--primary {
color: #33abff;
font-weight: bold;
}
2 changes: 1 addition & 1 deletion public/env.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2020 SURF.
* Copyright 2019-2022 SURF.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down
Loading