From 9b013dd38dbe7d47819b8a8dda4bc77158dc2f5e Mon Sep 17 00:00:00 2001 From: Erik Ziegler Date: Mon, 26 Jul 2021 21:12:00 +0200 Subject: [PATCH] fix(tailwind): Missed some changes when upgrading to tailwind 2.x --- .vscode/launch.json | 15 +++++++++++++++ extensions/default/src/ViewerLayout/index.jsx | 2 +- .../component-library/components/SidePanel.mdx | 6 +++--- .../example-views/Viewer.mdx.todo | 2 +- platform/ui/.webpack/webpack.prod.js | 4 ++-- platform/ui/package.json | 1 - .../ui/src/components/DateRange/DateRange.css | 3 --- .../HotkeysPreferences/HotkeysPreferences.jsx | 2 +- .../WindowLevelMenuItem/WindowLevelMenuItem.jsx | 6 +++--- platform/ui/src/views/Viewer/Viewer.js | 2 +- platform/ui/tailwind.config.js | 4 ---- platform/viewer/.webpack/webpack.pwa.js | 7 +++++++ 12 files changed, 34 insertions(+), 20 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..1689524c2 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}" + } + ] +} diff --git a/extensions/default/src/ViewerLayout/index.jsx b/extensions/default/src/ViewerLayout/index.jsx index faf208b13..06e710dd7 100644 --- a/extensions/default/src/ViewerLayout/index.jsx +++ b/extensions/default/src/ViewerLayout/index.jsx @@ -189,7 +189,7 @@ function ViewerLayout({
{/* LEFT SIDEPANELS */} diff --git a/platform/docs/docs/platform/component-library/components/SidePanel.mdx b/platform/docs/docs/platform/component-library/components/SidePanel.mdx index 822187d67..646006ee1 100644 --- a/platform/docs/docs/platform/component-library/components/SidePanel.mdx +++ b/platform/docs/docs/platform/component-library/components/SidePanel.mdx @@ -18,7 +18,7 @@ import { SidePanel } from '@ohif/ui'; ```jsx live
)```` +()`` diff --git a/platform/docs/docs/platform/component-library/example-views/Viewer.mdx.todo b/platform/docs/docs/platform/component-library/example-views/Viewer.mdx.todo index 2420b44a4..5fb148455 100644 --- a/platform/docs/docs/platform/component-library/example-views/Viewer.mdx.todo +++ b/platform/docs/docs/platform/component-library/example-views/Viewer.mdx.todo @@ -56,7 +56,7 @@ import { tabs } from './studyBrowserMockData';
{/* LEFT SIDEPANELS */} diff --git a/platform/ui/.webpack/webpack.prod.js b/platform/ui/.webpack/webpack.prod.js index 32d99604c..381727468 100644 --- a/platform/ui/.webpack/webpack.prod.js +++ b/platform/ui/.webpack/webpack.prod.js @@ -24,8 +24,8 @@ module.exports = (env, argv) => { warnings: true, }, optimization: { - minimize: false, - sideEffects: false, + minimize: true, + sideEffects: true, }, output: { path: ROOT_DIR, diff --git a/platform/ui/package.json b/platform/ui/package.json index db9f6361c..7ae7aa8b4 100644 --- a/platform/ui/package.json +++ b/platform/ui/package.json @@ -45,7 +45,6 @@ }, "devDependencies": { "autoprefixer": "9.7.4", - "mini-css-extract-plugin": "^2.1.0", "postcss": "^8.3.5", "postcss-loader": "^6.1.1", "prop-types": "15.7.2", diff --git a/platform/ui/src/components/DateRange/DateRange.css b/platform/ui/src/components/DateRange/DateRange.css index f310fb167..4529762f3 100644 --- a/platform/ui/src/components/DateRange/DateRange.css +++ b/platform/ui/src/components/DateRange/DateRange.css @@ -1,6 +1,3 @@ -/*@tailwind base; -@tailwind utilities;*/ - /** CONTAINER STYLES **/ .DateRangePickerInput { diff --git a/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.jsx b/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.jsx index 08129cc21..c76d69a61 100644 --- a/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.jsx +++ b/platform/ui/src/components/HotkeysPreferences/HotkeysPreferences.jsx @@ -66,7 +66,7 @@ const HotkeysPreferences = ({ disabled, hotkeyDefinitions, errors: controlledErr + className={classNames('pr-6 h-full flex flex-row items-center whitespace-nowrap', isFirst && 'mt-5')}> {definition.label}
diff --git a/platform/ui/src/components/WindowLevelMenuItem/WindowLevelMenuItem.jsx b/platform/ui/src/components/WindowLevelMenuItem/WindowLevelMenuItem.jsx index b4ab50691..ff479568e 100644 --- a/platform/ui/src/components/WindowLevelMenuItem/WindowLevelMenuItem.jsx +++ b/platform/ui/src/components/WindowLevelMenuItem/WindowLevelMenuItem.jsx @@ -9,13 +9,13 @@ const WindowLevelMenuItem = ({ title, subtitle, isSelected, index }) => ( isSelected && 'bg-primary-dark' )} > - + {title} - + {subtitle} - {index + 1} + {index + 1}
); diff --git a/platform/ui/src/views/Viewer/Viewer.js b/platform/ui/src/views/Viewer/Viewer.js index 706e427a2..884b8d03c 100644 --- a/platform/ui/src/views/Viewer/Viewer.js +++ b/platform/ui/src/views/Viewer/Viewer.js @@ -10,7 +10,7 @@ const Viewer = () => {
{ path: DIST_DIR, filename: isProdBuild ? '[name].bundle.[chunkhash].js' : '[name].js', publicPath: PUBLIC_URL, // Used by HtmlWebPackPlugin for asset prefix + devtoolModuleFilenameTemplate: function(info) { + if (isProdBuild) { + return `webpack:///${info.resourcePath}`; + } else { + return 'file:///' + encodeURI(info.absoluteResourcePath); + } + }, }, resolve: { modules: [