This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 05632b9 chore: Moves the stylesheets folder to the assets folder
(#16880)
05632b9 is described below
commit 05632b9804f355c9a925a9a88109de9e2c32c253
Author: Michael S. Molina <[email protected]>
AuthorDate: Thu Sep 30 09:28:38 2021 -0300
chore: Moves the stylesheets folder to the assets folder (#16880)
* chore: Moves the stylesheets folder to the assets folder
* Changes {src} to src
---
superset-frontend/.eslintignore | 2 +-
superset-frontend/package.json | 6 +++---
superset-frontend/src/CRUD/crud.less | 2 +-
superset-frontend/src/SqlLab/App.jsx | 2 +-
superset-frontend/src/SqlLab/main.less | 2 +-
superset-frontend/{ => src/assets}/stylesheets/antd/index.less | 0
.../{ => src/assets}/stylesheets/less/cosmo/bootswatch.less | 0
.../{ => src/assets}/stylesheets/less/cosmo/cosmoTheme.js | 1 +
.../{ => src/assets}/stylesheets/less/cosmo/variables.less | 0
superset-frontend/{ => src/assets}/stylesheets/less/fonts.less | 0
superset-frontend/{ => src/assets}/stylesheets/less/index.less | 0
superset-frontend/{ => src/assets}/stylesheets/less/variables.less | 0
.../{ => src/assets}/stylesheets/reactable-pagination.less | 2 +-
superset-frontend/{ => src/assets}/stylesheets/superset.less | 2 +-
.../src/components/FilterableTable/FilterableTableStyles.less | 2 +-
superset-frontend/src/components/TableLoader/index.tsx | 2 +-
superset-frontend/src/dashboard/stylesheets/builder-sidepane.less | 2 +-
.../src/dashboard/stylesheets/components/new-component.less | 2 +-
.../src/dashboard/stylesheets/filter-scope-selector.less | 2 +-
superset-frontend/src/dashboard/stylesheets/index.less | 2 +-
superset-frontend/src/explore/App.jsx | 2 +-
superset-frontend/src/explore/main.less | 2 +-
superset-frontend/src/profile/main.less | 2 +-
superset-frontend/src/theme.ts | 4 ++--
superset-frontend/src/utils/downloadAsImage.ts | 2 +-
superset-frontend/src/visualizations/FilterBox/FilterBox.less | 2 +-
superset-frontend/webpack.config.js | 2 +-
27 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/superset-frontend/.eslintignore b/superset-frontend/.eslintignore
index 36e0e2d..7d3533a 100644
--- a/superset-frontend/.eslintignore
+++ b/superset-frontend/.eslintignore
@@ -19,9 +19,9 @@
coverage/**
dist/*
src/assets/images/*
+src/assets/stylesheets/*
node_modules/*
node_modules*/*
-stylesheets/*
vendor/*
docs/*
src/dashboard/deprecated/*
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index a6cb456..2326996 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -19,10 +19,10 @@
"build-instrumented": "cross-env NODE_ENV=development
BABEL_ENV=instrumented webpack --mode=development --color",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192
NODE_ENV=production BABEL_ENV=\"${BABEL_ENV:=production}\" webpack
--mode=production --color",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . &&
npm run type",
- "prettier-check": "prettier --check
'{src,stylesheets}/**/*.{css,less,sass,scss}'",
+ "prettier-check": "prettier --check 'src/**/*.{css,less,sass,scss}'",
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext
.js,.jsx,.ts,tsx . && npm run clean-css && npm run type",
- "clean-css": "prettier --write
'{src,stylesheets}/**/*.{css,less,sass,scss}'",
- "format": "prettier --write
'./{src,spec,stylesheets,cypress-base}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'",
+ "clean-css": "prettier --write 'src/**/*.{css,less,sass,scss}'",
+ "format": "prettier --write
'./{src,spec,cypress-base}/**/*{.js,.jsx,.ts,.tsx,.css,.less,.scss,.sass}'",
"prettier": "npm run format",
"check-translation": "prettier --check
../superset/translations/**/LC_MESSAGES/*.json",
"clean-translation": "prettier --write
../superset/translations/**/LC_MESSAGES/*.json",
diff --git a/superset-frontend/src/CRUD/crud.less
b/superset-frontend/src/CRUD/crud.less
index cace6f8..a12df7f 100644
--- a/superset-frontend/src/CRUD/crud.less
+++ b/superset-frontend/src/CRUD/crud.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../stylesheets/less/variables.less';
+@import '../assets/stylesheets/less/variables.less';
.CRUD {
.text-right {
diff --git a/superset-frontend/src/SqlLab/App.jsx
b/superset-frontend/src/SqlLab/App.jsx
index 857d1db..b0b5e73 100644
--- a/superset-frontend/src/SqlLab/App.jsx
+++ b/superset-frontend/src/SqlLab/App.jsx
@@ -39,7 +39,7 @@ import { BYTES_PER_CHAR, KB_STORAGE } from './constants';
import setupApp from '../setup/setupApp';
import './main.less';
-import '../../stylesheets/reactable-pagination.less';
+import '../assets/stylesheets/reactable-pagination.less';
import '../components/FilterableTable/FilterableTableStyles.less';
import { theme } from '../preamble';
diff --git a/superset-frontend/src/SqlLab/main.less
b/superset-frontend/src/SqlLab/main.less
index 7e5cf6e..a6c4738 100644
--- a/superset-frontend/src/SqlLab/main.less
+++ b/superset-frontend/src/SqlLab/main.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../stylesheets/less/variables.less';
+@import '../assets/stylesheets/less/variables.less';
body {
min-height: ~'max(100vh, 500px)'; // Set a min height so the gutter is
always visible when resizing
diff --git a/superset-frontend/stylesheets/antd/index.less
b/superset-frontend/src/assets/stylesheets/antd/index.less
similarity index 100%
rename from superset-frontend/stylesheets/antd/index.less
rename to superset-frontend/src/assets/stylesheets/antd/index.less
diff --git a/superset-frontend/stylesheets/less/cosmo/bootswatch.less
b/superset-frontend/src/assets/stylesheets/less/cosmo/bootswatch.less
similarity index 100%
rename from superset-frontend/stylesheets/less/cosmo/bootswatch.less
rename to superset-frontend/src/assets/stylesheets/less/cosmo/bootswatch.less
diff --git a/superset-frontend/stylesheets/less/cosmo/cosmoTheme.js
b/superset-frontend/src/assets/stylesheets/less/cosmo/cosmoTheme.js
similarity index 99%
rename from superset-frontend/stylesheets/less/cosmo/cosmoTheme.js
rename to superset-frontend/src/assets/stylesheets/less/cosmo/cosmoTheme.js
index c3a5783..817049d 100644
--- a/superset-frontend/stylesheets/less/cosmo/cosmoTheme.js
+++ b/superset-frontend/src/assets/stylesheets/less/cosmo/cosmoTheme.js
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+/* eslint-disable */
(function () {
$(window).scroll(function () {
var top = $(document).scrollTop();
diff --git a/superset-frontend/stylesheets/less/cosmo/variables.less
b/superset-frontend/src/assets/stylesheets/less/cosmo/variables.less
similarity index 100%
rename from superset-frontend/stylesheets/less/cosmo/variables.less
rename to superset-frontend/src/assets/stylesheets/less/cosmo/variables.less
diff --git a/superset-frontend/stylesheets/less/fonts.less
b/superset-frontend/src/assets/stylesheets/less/fonts.less
similarity index 100%
rename from superset-frontend/stylesheets/less/fonts.less
rename to superset-frontend/src/assets/stylesheets/less/fonts.less
diff --git a/superset-frontend/stylesheets/less/index.less
b/superset-frontend/src/assets/stylesheets/less/index.less
similarity index 100%
rename from superset-frontend/stylesheets/less/index.less
rename to superset-frontend/src/assets/stylesheets/less/index.less
diff --git a/superset-frontend/stylesheets/less/variables.less
b/superset-frontend/src/assets/stylesheets/less/variables.less
similarity index 100%
rename from superset-frontend/stylesheets/less/variables.less
rename to superset-frontend/src/assets/stylesheets/less/variables.less
diff --git a/superset-frontend/stylesheets/reactable-pagination.less
b/superset-frontend/src/assets/stylesheets/reactable-pagination.less
similarity index 97%
rename from superset-frontend/stylesheets/reactable-pagination.less
rename to superset-frontend/src/assets/stylesheets/reactable-pagination.less
index f3bb9f0..9b48d21 100644
--- a/superset-frontend/stylesheets/reactable-pagination.less
+++ b/superset-frontend/src/assets/stylesheets/reactable-pagination.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../stylesheets/less/variables.less';
+@import './less/variables.less';
.reactable-pagination td {
padding: 15px 0 0 0 !important;
diff --git a/superset-frontend/stylesheets/superset.less
b/superset-frontend/src/assets/stylesheets/superset.less
similarity index 99%
rename from superset-frontend/stylesheets/superset.less
rename to superset-frontend/src/assets/stylesheets/superset.less
index eb2b083..ecfdd01 100644
--- a/superset-frontend/stylesheets/superset.less
+++ b/superset-frontend/src/assets/stylesheets/superset.less
@@ -579,6 +579,6 @@ hr {
border-top: 1px solid @gray-light;
}
.ace_gutter-cell.ace_error {
- background-image:
url('../src/assets/images/icons/error_solid_small_red.svg') !important;
+ background-image: url('../images/icons/error_solid_small_red.svg')
!important;
background-position: -2px center !important;
}
diff --git
a/superset-frontend/src/components/FilterableTable/FilterableTableStyles.less
b/superset-frontend/src/components/FilterableTable/FilterableTableStyles.less
index 7144624..00786db 100644
---
a/superset-frontend/src/components/FilterableTable/FilterableTableStyles.less
+++
b/superset-frontend/src/components/FilterableTable/FilterableTableStyles.less
@@ -17,7 +17,7 @@
* under the License.
*/
-@import '../../../stylesheets/less/variables.less';
+@import '../../assets/stylesheets/less/variables.less';
.ReactVirtualized__Grid__innerScrollContainer {
border: 1px solid @gray-light;
diff --git a/superset-frontend/src/components/TableLoader/index.tsx
b/superset-frontend/src/components/TableLoader/index.tsx
index 2956df3..d354a32 100644
--- a/superset-frontend/src/components/TableLoader/index.tsx
+++ b/superset-frontend/src/components/TableLoader/index.tsx
@@ -21,7 +21,7 @@ import { t, SupersetClient, JsonObject } from
'@superset-ui/core';
import TableView, { EmptyWrapperType } from 'src/components/TableView';
import withToasts from 'src/components/MessageToasts/withToasts';
import Loading from 'src/components/Loading';
-import 'stylesheets/reactable-pagination.less';
+import '../../assets/stylesheets/reactable-pagination.less';
export interface TableLoaderProps {
dataEndpoint?: string;
diff --git a/superset-frontend/src/dashboard/stylesheets/builder-sidepane.less
b/superset-frontend/src/dashboard/stylesheets/builder-sidepane.less
index a5e4809..5fbf66a 100644
--- a/superset-frontend/src/dashboard/stylesheets/builder-sidepane.less
+++ b/superset-frontend/src/dashboard/stylesheets/builder-sidepane.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../../stylesheets/less/variables.less';
+@import '../../assets/stylesheets/less/variables.less';
.dashboard-builder-sidepane {
flex: 0 0 @builder-pane-width;
diff --git
a/superset-frontend/src/dashboard/stylesheets/components/new-component.less
b/superset-frontend/src/dashboard/stylesheets/components/new-component.less
index 0401515..2202a59 100644
--- a/superset-frontend/src/dashboard/stylesheets/components/new-component.less
+++ b/superset-frontend/src/dashboard/stylesheets/components/new-component.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../../../stylesheets/less/variables.less';
+@import '../../../assets/stylesheets/less/variables.less';
.new-component {
display: flex;
diff --git
a/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less
b/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less
index 344964a..06e9bae 100644
--- a/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less
+++ b/superset-frontend/src/dashboard/stylesheets/filter-scope-selector.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../../stylesheets/less/variables.less';
+@import '../../assets/stylesheets/less/variables.less';
.filter-scope-container {
display: flex;
diff --git a/superset-frontend/src/dashboard/stylesheets/index.less
b/superset-frontend/src/dashboard/stylesheets/index.less
index 6dee17e..9c93d6b 100644
--- a/superset-frontend/src/dashboard/stylesheets/index.less
+++ b/superset-frontend/src/dashboard/stylesheets/index.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import './../../../stylesheets/less/variables.less';
+@import '../../assets/stylesheets/less/variables.less';
@import './builder.less';
@import './builder-sidepane.less';
diff --git a/superset-frontend/src/explore/App.jsx
b/superset-frontend/src/explore/App.jsx
index 86e0402..63bd552 100644
--- a/superset-frontend/src/explore/App.jsx
+++ b/superset-frontend/src/explore/App.jsx
@@ -27,7 +27,7 @@ import ToastContainer from
'src/components/MessageToasts/ToastContainer';
import setupApp from 'src/setup/setupApp';
import setupPlugins from 'src/setup/setupPlugins';
import './main.less';
-import 'stylesheets/reactable-pagination.less';
+import '../assets/stylesheets/reactable-pagination.less';
import { theme } from 'src/preamble';
import ExploreViewContainer from './components/ExploreViewContainer';
diff --git a/superset-frontend/src/explore/main.less
b/superset-frontend/src/explore/main.less
index 43de0da..d85e855 100644
--- a/superset-frontend/src/explore/main.less
+++ b/superset-frontend/src/explore/main.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../stylesheets/less/variables.less';
+@import '../assets/stylesheets/less/variables.less';
.scrollbar-container {
position: relative;
diff --git a/superset-frontend/src/profile/main.less
b/superset-frontend/src/profile/main.less
index ce1f0a7..7e16c67 100644
--- a/superset-frontend/src/profile/main.less
+++ b/superset-frontend/src/profile/main.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../stylesheets/less/variables.less';
+@import '../assets/stylesheets/less/variables.less';
.tab-pane {
min-height: 400px;
diff --git a/superset-frontend/src/theme.ts b/superset-frontend/src/theme.ts
index b140f84..33e7eae 100644
--- a/superset-frontend/src/theme.ts
+++ b/superset-frontend/src/theme.ts
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import '../stylesheets/superset.less';
+import './assets/stylesheets/superset.less';
// Importing Antd under its own stylesheet to prevent unintentional theming.
-import '../stylesheets/antd/index.less';
+import './assets/stylesheets/antd/index.less';
diff --git a/superset-frontend/src/utils/downloadAsImage.ts
b/superset-frontend/src/utils/downloadAsImage.ts
index b19dfe2..da9ca8b 100644
--- a/superset-frontend/src/utils/downloadAsImage.ts
+++ b/superset-frontend/src/utils/downloadAsImage.ts
@@ -24,7 +24,7 @@ import { addWarningToast } from
'src/components/MessageToasts/actions';
/**
* @remark
- * same as
https://github.com/apache/superset/blob/c53bc4ddf9808a8bb6916bbe3cb31935d33a2420/superset-frontend/stylesheets/less/variables.less#L34
+ * same as
https://github.com/apache/superset/blob/c53bc4ddf9808a8bb6916bbe3cb31935d33a2420/superset-frontend/src/assets/stylesheets/less/variables.less#L34
*/
const GRAY_BACKGROUND_COLOR = '#F5F5F5';
diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.less
b/superset-frontend/src/visualizations/FilterBox/FilterBox.less
index b1252b2..5a8f095 100644
--- a/superset-frontend/src/visualizations/FilterBox/FilterBox.less
+++ b/superset-frontend/src/visualizations/FilterBox/FilterBox.less
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-@import '../../../stylesheets/less/variables.less';
+@import '../../assets/stylesheets/less/variables.less';
.dashboard .filter_box .slice_container > div:not(.alert) {
padding-top: 0;
diff --git a/superset-frontend/webpack.config.js
b/superset-frontend/webpack.config.js
index 1bd3043..440812b 100644
--- a/superset-frontend/webpack.config.js
+++ b/superset-frontend/webpack.config.js
@@ -129,7 +129,7 @@ const plugins = [
patterns: [
'package.json',
{ from: 'src/assets/images', to: 'images' },
- { from: 'stylesheets', to: 'stylesheets' },
+ { from: 'src/assets/stylesheets', to: 'stylesheets' },
],
}),