Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIG-314: Override Ant Design's variables and change Timeline annotation styles #543

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"document"
],
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.hover.enabled": true,
"editor.colorDecorators": true,
"[typescriptreact]": {
Expand Down
16 changes: 16 additions & 0 deletions frontend/craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const CracoAntDesignPlugin = require('craco-antd');
const path = require('path');

module.exports = {
plugins: [
{
plugin: CracoAntDesignPlugin,
options: {
customizeThemeLessPath: path.join(
__dirname,
'src/style/AntDesign/antd.overrides.less'
),
},
},
],
};
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
"written-number": "^0.9.1"
},
"scripts": {
"start": "doppler run -- react-scripts start",
"start": "doppler run -- craco start",
"styles": " tsm src -w",
"gql": "graphql-codegen --config --watch codegen.yml",
"build": "react-scripts build",
"test": "react-scripts test",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"lint": "prettier --check --write 'src/**/*.{ts,tsx,scss}' && yarn lint:es",
"lint:es": "eslint --fix src/**/*.{ts,tsx}"
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ type PopoverProps = Pick<
const Popover: React.FC<PopoverProps> = ({ children, title, ...props }) => {
return (
<AntDesignPopover
overlayStyle={{ maxWidth: `300px` }}
{...props}
content={
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
display: grid;
grid-template-columns: 1fr 1fr;
gap: $size-xSmall;
justify-items: center;
}

.circle {
Expand All @@ -69,3 +68,7 @@
width: 85px;
justify-content: space-between;
}

.contentWrapper {
max-width: 300px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const checkboxesContainer: string;
export const checkboxGroup: string;
export const checkBoxLabel: string;
export const circle: string;
export const contentWrapper: string;
export const eventType: string;
export const eventTypesContainer: string;
export const grow: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const TimelineAnnotationsSettings = () => {
<Popover
trigger="click"
content={
<div>
<div className={styles.contentWrapper}>
<p>
Timeline annotations are the circles above the timeline.
You can configure what types of events are drawn as
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Player/Toolbar/Toolbar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
}

.tooltipContent {
width: 100%;
width: 300px;
overflow-wrap: anywhere;
}

Expand Down
7 changes: 7 additions & 0 deletions frontend/src/style/AntDesign/antd.overrides.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// These variables are used to override Ant Design's default variables.
JohnPhamous marked this conversation as resolved.
Show resolved Hide resolved
// Changes to this file requires you to restart the React dev server for the effects to take place in the browser.
// https://ant.design/docs/react/customize-theme
@font-family: AvenirNext, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif;
@primary-color: #5629c6;
@border-radius-base: 5px;
118 changes: 110 additions & 8 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,16 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@craco/craco@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@craco/craco/-/craco-6.1.1.tgz#0233b28d6896b6560379f64b608d3c888874e9fa"
integrity sha512-4irfOM8RgYNhFJzAXyIuM8CZLju2Jh9GdOem8uqM2/cI2xPulQSxZKU/9q3uiSbFUJfQLi3pomVKii6KzWLu3Q==
dependencies:
cross-spawn "^7.0.0"
lodash "^4.17.15"
semver "^7.3.2"
webpack-merge "^4.2.2"

"@csstools/convert-colors@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
Expand Down Expand Up @@ -3994,6 +4004,14 @@ babel-plugin-emotion@^10.0.27:
find-root "^1.1.0"
source-map "^0.5.7"

babel-plugin-import@^1.13.1:
version "1.13.3"
resolved "https://registry.yarnpkg.com/babel-plugin-import/-/babel-plugin-import-1.13.3.tgz#9dbbba7d1ac72bd412917a830d445e00941d26d7"
integrity sha512-1qCWdljJOrDRH/ybaCZuDgySii4yYrtQ8OJQwrcDqdt0y67N30ng3X3nABg6j7gR7qUJgcMa9OMhc4AGViDwWw==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/runtime" "^7.0.0"

babel-plugin-istanbul@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765"
Expand Down Expand Up @@ -4888,6 +4906,11 @@ clone-response@^1.0.2:
dependencies:
mimic-response "^1.0.0"

clone@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=

co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
Expand Down Expand Up @@ -5126,6 +5149,13 @@ cookie@0.4.0:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==

copy-anything@^2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-2.0.3.tgz#842407ba02466b0df844819bbe3baebbe5d45d87"
integrity sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==
dependencies:
is-what "^3.12.0"

copy-concurrently@^1.0.0:
version "1.0.5"
resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0"
Expand Down Expand Up @@ -5222,6 +5252,23 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"

craco-antd@^1.19.0:
version "1.19.0"
resolved "https://registry.yarnpkg.com/craco-antd/-/craco-antd-1.19.0.tgz#ad3b95853a29a20c6de4003874517ae2a995064b"
integrity sha512-MpbF2LQxb/POiR003oOkuAhHwpyRx1w5opyg7SA4/2og/FMRR/2oca/eqKYQ7vre2dOpt64gkQ5xWETktHWCQQ==
dependencies:
babel-plugin-import "^1.13.1"
craco-less "1.17.0"
less-vars-to-js "^1.3.0"

craco-less@1.17.0:
version "1.17.0"
resolved "https://registry.yarnpkg.com/craco-less/-/craco-less-1.17.0.tgz#3d92e59966e1fdecef4d173b2389985a75cb6bb9"
integrity sha512-G+GPEKPPKiSvYDsnQWuj1C4CIuaY8w+iHvULHkNf5QWLE0LkPfSRf3frhRDJjFxtkThpLPSLjWndD9kx8bCWzw==
dependencies:
less "^3.11.1"
less-loader "^6.1.0"

create-ecdh@^4.0.0:
version "4.0.4"
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e"
Expand Down Expand Up @@ -6222,7 +6269,7 @@ entities@^2.0.0:
resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==

errno@^0.1.3, errno@~0.1.7:
errno@^0.1.1, errno@^0.1.3, errno@~0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"
integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==
Expand Down Expand Up @@ -8027,6 +8074,11 @@ ignore@^5.1.4:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==

image-size@~0.5.0:
version "0.5.5"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=

immer@7.0.9:
version "7.0.9"
resolved "https://registry.yarnpkg.com/immer/-/immer-7.0.9.tgz#28e7552c21d39dd76feccd2b800b7bc86ee4a62e"
Expand Down Expand Up @@ -8581,6 +8633,11 @@ is-utf8@^0.2.0:
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=

is-what@^3.12.0:
version "3.14.1"
resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1"
integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==

is-what@^3.3.1:
version "3.12.0"
resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.12.0.tgz#f4405ce4bd6dd420d3ced51a026fb90e03705e55"
Expand Down Expand Up @@ -9464,6 +9521,39 @@ latest-version@5.1.0:
dependencies:
package-json "^6.3.0"

less-loader@^6.1.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-6.2.0.tgz#8b26f621c155b342eefc24f5bd6e9dc40c42a719"
integrity sha512-Cl5h95/Pz/PWub/tCBgT1oNMFeH1WTD33piG80jn5jr12T4XbxZcjThwNXDQ7AG649WEynuIzO4b0+2Tn9Qolg==
dependencies:
clone "^2.1.2"
less "^3.11.3"
loader-utils "^2.0.0"
schema-utils "^2.7.0"

less-vars-to-js@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/less-vars-to-js/-/less-vars-to-js-1.3.0.tgz#c322cf43a3c8fc3fab655da3e51a14c1499ab571"
integrity sha512-xeiLLn/IMCGtdyCkYQnW8UuzoW2oYMCKg9boZRaGI58fLz5r90bNJDlqGzmVt/1Uqk75/DxIVtQSNCMkE5fRZQ==
dependencies:
strip-json-comments "^2.0.1"

less@^3.11.1, less@^3.11.3:
version "3.13.1"
resolved "https://registry.yarnpkg.com/less/-/less-3.13.1.tgz#0ebc91d2a0e9c0c6735b83d496b0ab0583077909"
integrity sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==
dependencies:
copy-anything "^2.0.1"
tslib "^1.10.0"
optionalDependencies:
errno "^0.1.1"
graceful-fs "^4.1.2"
image-size "~0.5.0"
make-dir "^2.1.0"
mime "^1.4.1"
native-request "^1.0.5"
source-map "~0.6.0"

leven@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
Expand Down Expand Up @@ -9831,7 +9921,7 @@ magic-string@^0.25.0, magic-string@^0.25.7:
dependencies:
sourcemap-codec "^1.4.4"

make-dir@^2.0.0:
make-dir@^2.0.0, make-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
Expand Down Expand Up @@ -10020,7 +10110,7 @@ mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.17, mime-types@~2.1.19,
dependencies:
mime-db "1.46.0"

mime@1.6.0:
mime@1.6.0, mime@^1.4.1:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
Expand Down Expand Up @@ -10262,6 +10352,11 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
to-regex "^3.0.1"

native-request@^1.0.5:
version "1.0.8"
resolved "https://registry.yarnpkg.com/native-request/-/native-request-1.0.8.tgz#8f66bf606e0f7ea27c0e5995eb2f5d03e33ae6fb"
integrity sha512-vU2JojJVelUGp6jRcLwToPoWGxSx23z/0iX+I77J3Ht17rf2INGjrhOoQnjVo60nQd8wVsgzKkPfRXBiVdD2ag==

native-url@^0.2.6:
version "0.2.6"
resolved "https://registry.yarnpkg.com/native-url/-/native-url-0.2.6.tgz#ca1258f5ace169c716ff44eccbddb674e10399ae"
Expand Down Expand Up @@ -14582,16 +14677,16 @@ strip-indent@^3.0.0:
dependencies:
min-indent "^1.0.0"

strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=

strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==

strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=

stripe@^8.128.0:
version "8.137.0"
resolved "https://registry.yarnpkg.com/stripe/-/stripe-8.137.0.tgz#9344d99d96ef3a19ff4c92f2bb141c40f2b18a6a"
Expand Down Expand Up @@ -15670,6 +15765,13 @@ webpack-manifest-plugin@2.2.0:
object.entries "^1.1.0"
tapable "^1.0.0"

webpack-merge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d"
integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==
dependencies:
lodash "^4.17.15"

webpack-sources@^1.1.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
Expand Down