mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 05:08:12 +08:00
chore: replace optimize-css-assets-webpack-plugin with css-minimizer-webpack-plugin (#2525)
* Replace optimize-css-assets-webpack-plugin with css-minimizer-webpack-plugin * Fix lint issues in JS * remove favicons * update snapshots * update annotations snapshots Co-authored-by: Trent Smith <1429913+Bento007@users.noreply.github.com> Co-authored-by: Seve Badajoz <sbadajoz@chanzuckerberg.com>
This commit is contained in:
co-authored by
Trent Smith
Seve Badajoz
parent
f2bd6ebce1
commit
8b4c1e418e
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
exports[`did launch page launched 1`] = `"<span style=\\"max-width: 155px; display: flex; overflow: hidden; justify-content: flex-start; width: 100%; padding: 0px;\\"><span style=\\"overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 5px;\\">pbm</span><span style=\\"position: relative; overflow: hidden; white-space: nowrap;\\"><span style=\\"color: transparent;\\">c3k</span><span style=\\"position: absolute; right: 0px; color: inherit;\\">c3k</span></span></span>"`;
|
exports[`did launch page launched 1`] = `"<span style=\\"max-width: 155px; display: flex; overflow: hidden; justify-content: flex-start; width: 100%; padding: 0px;\\"><span style=\\"overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 5px;\\">pbm</span><span style=\\"position: relative; overflow: hidden; white-space: nowrap;\\"><span style=\\"color: transparent;\\">c3k</span><span style=\\"position: absolute; right: 0px; color: inherit;\\">c3k</span></span></span>"`;
|
||||||
|
|
||||||
exports[`metadata loads categories and values from dataset appear 1`] = `"<div style=\\"display: flex; justify-content: space-between; align-items: baseline;\\"><div style=\\"display: flex; justify-content: flex-start; align-items: flex-start;\\"><label class=\\"bp3-control bp3-checkbox\\" for=\\"category-select-louvain\\"><input id=\\"category-select-louvain\\" data-testclass=\\"category-select\\" data-testid=\\"louvain:category-select\\" type=\\"checkbox\\" checked=\\"\\"><span class=\\"bp3-control-indicator\\"></span></label><span role=\\"menuitem\\" tabindex=\\"0\\" data-testclass=\\"category-expand\\" data-testid=\\"louvain:category-expand\\" style=\\"cursor: pointer;\\"><span aria-haspopup=\\"true\\" class=\\"bp3-popover2-target\\"><span data-testid=\\"louvain:category-label\\" tabindex=\\"-1\\" aria-label=\\"louvain\\" class=\\"\\" style=\\"max-width: 265px;\\"><span style=\\"max-width: 265px; display: flex; overflow: hidden; justify-content: flex-start; width: 100%; padding: 0px;\\"><span style=\\"overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 5px;\\">lou</span><span style=\\"position: relative; overflow: hidden; white-space: nowrap;\\"><span style=\\"color: transparent;\\">vain</span><span style=\\"position: absolute; right: 0px; color: inherit;\\">vain</span></span></span></span></span><svg stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" viewBox=\\"0 0 320 512\\" data-testclass=\\"category-expand-is-not-expanded\\" height=\\"1em\\" width=\\"1em\\" xmlns=\\"http://www.w3.org/2000/svg\\" style=\\"font-size: 10px; margin-left: 5px;\\"><path d=\\"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z\\"></path></svg></span></div><div><span class=\\"bp3-popover-wrapper\\"><span aria-haspopup=\\"true\\" class=\\"bp3-popover-target\\"><a role=\\"button\\" data-testclass=\\"colorby\\" data-testid=\\"colorby-louvain\\" class=\\"bp3-button\\" tabindex=\\"0\\"><span icon=\\"tint\\" class=\\"bp3-icon bp3-icon-tint\\"><svg data-icon=\\"tint\\" width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 16 16\\"><desc>tint</desc><path d=\\"M7.88 1s-4.9 6.28-4.9 8.9c.01 2.82 2.34 5.1 4.99 5.1 2.65-.01 5.03-2.3 5.03-5.13C12.99 7.17 7.88 1 7.88 1z\\" fill-rule=\\"evenodd\\"></path></svg></span></a></span></span></div></div><div style=\\"margin-left: 26px;\\"></div>"`;
|
exports[`metadata loads categories and values from dataset appear 1`] = `"<div style=\\"display: flex; justify-content: space-between; align-items: baseline;\\"><div style=\\"display: flex; justify-content: flex-start; align-items: flex-start;\\"><label class=\\"bp3-control bp3-checkbox\\" for=\\"category-select-louvain\\"><input id=\\"category-select-louvain\\" data-testclass=\\"category-select\\" data-testid=\\"louvain:category-select\\" type=\\"checkbox\\" checked=\\"\\"><span class=\\"bp3-control-indicator\\"></span></label><span role=\\"menuitem\\" tabindex=\\"0\\" data-testclass=\\"category-expand\\" data-testid=\\"louvain:category-expand\\" style=\\"cursor: pointer;\\"><span aria-haspopup=\\"true\\" class=\\"bp3-popover2-target\\"><span data-testid=\\"louvain:category-label\\" tabindex=\\"-1\\" aria-label=\\"louvain\\" class=\\"\\" style=\\"max-width: 265px;\\"><span style=\\"max-width: 265px; display: flex; overflow: hidden; justify-content: flex-start; width: 100%; padding: 0px;\\"><span style=\\"overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 5px;\\">lou</span><span style=\\"position: relative; overflow: hidden; white-space: nowrap;\\"><span style=\\"color: transparent;\\">vain</span><span style=\\"position: absolute; right: 0px; color: inherit;\\">vain</span></span></span></span></span><svg stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" viewBox=\\"0 0 320 512\\" data-testclass=\\"category-expand-is-not-expanded\\" height=\\"1em\\" width=\\"1em\\" xmlns=\\"http://www.w3.org/2000/svg\\" style=\\"font-size: 10px; margin-left: 5px;\\"><path d=\\"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z\\"></path></svg></span></div><div><span class=\\"bp3-popover-wrapper\\"><span aria-haspopup=\\"true\\" class=\\"bp3-popover-target\\"><a role=\\"button\\" data-testclass=\\"colorby\\" data-testid=\\"colorby-louvain\\" class=\\"bp3-button\\" tabindex=\\"0\\"><span icon=\\"tint\\" aria-hidden=\\"true\\" tabindex=\\"0\\" class=\\"bp3-icon bp3-icon-tint\\"><svg data-icon=\\"tint\\" width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 16 16\\"><path d=\\"M7.88 1s-4.9 6.28-4.9 8.9c.01 2.82 2.34 5.1 4.99 5.1 2.65-.01 5.03-2.3 5.03-5.13C12.99 7.17 7.88 1 7.88 1z\\" fill-rule=\\"evenodd\\"></path></svg></span></a></span></span></div></div><div style=\\"margin-left: 26px;\\"></div>"`;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,6 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
|
|
||||||
const ScriptExtHtmlWebpackPlugin = require("script-ext-html-webpack-plugin");
|
const ScriptExtHtmlWebpackPlugin = require("script-ext-html-webpack-plugin");
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
|
|
||||||
@@ -44,21 +43,6 @@ const devConfig = {
|
|||||||
inject: true,
|
inject: true,
|
||||||
template: path.resolve("index.html"),
|
template: path.resolve("index.html"),
|
||||||
}),
|
}),
|
||||||
new FaviconsWebpackPlugin({
|
|
||||||
logo: "./favicon.png",
|
|
||||||
prefix: "static/img/",
|
|
||||||
favicons: {
|
|
||||||
icons: {
|
|
||||||
android: false,
|
|
||||||
appleIcon: false,
|
|
||||||
appleStartup: false,
|
|
||||||
coast: false,
|
|
||||||
firefox: false,
|
|
||||||
windows: false,
|
|
||||||
yandex: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "static/[name].css",
|
filename: "static/[name].css",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ const webpack = require("webpack");
|
|||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||||
const TerserJSPlugin = require("terser-webpack-plugin");
|
const TerserJSPlugin = require("terser-webpack-plugin");
|
||||||
const CleanCss = require("clean-css");
|
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||||
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
|
|
||||||
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
|
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
|
|
||||||
const { merge } = require("webpack-merge");
|
const { merge } = require("webpack-merge");
|
||||||
@@ -29,8 +27,8 @@ const prodConfig = {
|
|||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new TerserJSPlugin({}),
|
new TerserJSPlugin({}),
|
||||||
new OptimizeCSSAssetsPlugin({
|
new CssMinimizerPlugin({
|
||||||
cssProcessor: CleanCss,
|
minify: CssMinimizerPlugin.cleanCssMinify,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -66,21 +64,6 @@ const prodConfig = {
|
|||||||
protectWebpackAssets: false,
|
protectWebpackAssets: false,
|
||||||
cleanAfterEveryBuildPatterns: ["main.js", "main.css"],
|
cleanAfterEveryBuildPatterns: ["main.js", "main.css"],
|
||||||
}),
|
}),
|
||||||
new FaviconsWebpackPlugin({
|
|
||||||
logo: "./favicon.png",
|
|
||||||
prefix: "static/assets/",
|
|
||||||
favicons: {
|
|
||||||
icons: {
|
|
||||||
android: false,
|
|
||||||
appleIcon: false,
|
|
||||||
appleStartup: false,
|
|
||||||
coast: false,
|
|
||||||
firefox: false,
|
|
||||||
windows: false,
|
|
||||||
yandex: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "static/[name]-[contenthash].css",
|
filename: "static/[name]-[contenthash].css",
|
||||||
}),
|
}),
|
||||||
|
|||||||
Generated
+9129
-20852
File diff suppressed because it is too large
Load Diff
+1
-3
@@ -101,6 +101,7 @@
|
|||||||
"clean-webpack-plugin": "^4.0.0-alpha.0",
|
"clean-webpack-plugin": "^4.0.0-alpha.0",
|
||||||
"codecov": "^3.7.1",
|
"codecov": "^3.7.1",
|
||||||
"css-loader": "^5.2.4",
|
"css-loader": "^5.2.4",
|
||||||
|
"css-minimizer-webpack-plugin": "^4.0.0",
|
||||||
"eslint": "^7.24.0",
|
"eslint": "^7.24.0",
|
||||||
"eslint-config-airbnb": "^18.2.0",
|
"eslint-config-airbnb": "^18.2.0",
|
||||||
"eslint-config-prettier": "^8.2.0",
|
"eslint-config-prettier": "^8.2.0",
|
||||||
@@ -114,8 +115,6 @@
|
|||||||
"eslint-plugin-react-hooks": "^4.0.8",
|
"eslint-plugin-react-hooks": "^4.0.8",
|
||||||
"expect-puppeteer": "^5.0.0",
|
"expect-puppeteer": "^5.0.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"favicons": "^6.2.2",
|
|
||||||
"favicons-webpack-plugin": "^5.0.2",
|
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"html-webpack-plugin": "^5.3.1",
|
"html-webpack-plugin": "^5.3.1",
|
||||||
"husky": "^7.0.2",
|
"husky": "^7.0.2",
|
||||||
@@ -134,7 +133,6 @@
|
|||||||
"lodash.zip": "^4.2.0",
|
"lodash.zip": "^4.2.0",
|
||||||
"mini-css-extract-plugin": "^1.5.0",
|
"mini-css-extract-plugin": "^1.5.0",
|
||||||
"obsolete-webpack-plugin": "^0.5.6",
|
"obsolete-webpack-plugin": "^0.5.6",
|
||||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
|
||||||
"prettier": "^2.0.5",
|
"prettier": "^2.0.5",
|
||||||
"puppeteer": "^8.0.0",
|
"puppeteer": "^8.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
|
|||||||
@@ -58,10 +58,11 @@ function _maskToList(mask) {
|
|||||||
if (!mask) {
|
if (!mask) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const list = new Int32Array(mask.length);
|
const [...m] = mask;
|
||||||
|
const list = new Int32Array(m.length);
|
||||||
let elems = 0;
|
let elems = 0;
|
||||||
for (let i = 0, l = mask.length; i < l; i += 1) {
|
for (let i = 0, l = m.length; i < l; i += 1) {
|
||||||
if (mask[i]) {
|
if (m[i]) {
|
||||||
list[elems] = i;
|
list[elems] = i;
|
||||||
elems += 1;
|
elems += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,12 +91,9 @@ export function _whereCacheCreate(field, query, columnLabels) {
|
|||||||
*/
|
*/
|
||||||
if (typeof query !== "object") return null;
|
if (typeof query !== "object") return null;
|
||||||
|
|
||||||
if (query.where) {
|
const { where, summarize } = query;
|
||||||
const {
|
if (where) {
|
||||||
field: queryField,
|
const { field: queryField, column: queryColumn, value: queryValue } = where;
|
||||||
column: queryColumn,
|
|
||||||
value: queryValue,
|
|
||||||
} = query.where;
|
|
||||||
return {
|
return {
|
||||||
where: {
|
where: {
|
||||||
[field]: {
|
[field]: {
|
||||||
@@ -107,13 +104,13 @@ export function _whereCacheCreate(field, query, columnLabels) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (query.summarize) {
|
if (summarize) {
|
||||||
const {
|
const {
|
||||||
method,
|
method,
|
||||||
field: queryField,
|
field: queryField,
|
||||||
column: queryColumn,
|
column: queryColumn,
|
||||||
values: queryValues,
|
values: queryValues,
|
||||||
} = query.summarize;
|
} = summarize;
|
||||||
const queryValueHash = _hashStringValues(queryValues);
|
const queryValueHash = _hashStringValues(queryValues);
|
||||||
return {
|
return {
|
||||||
summarize: {
|
summarize: {
|
||||||
|
|||||||
@@ -139,8 +139,9 @@ function _getEmbeddingRowOffsets(baseRowIndex, embeddingDf) {
|
|||||||
|
|
||||||
Currently assumes that there will be onl two dimensions in the embedding.
|
Currently assumes that there will be onl two dimensions in the embedding.
|
||||||
*/
|
*/
|
||||||
const X = embeddingDf.icol(0).asArray();
|
const { icol } = embeddingDf;
|
||||||
const Y = embeddingDf.icol(1).asArray();
|
const X = icol(0).asArray();
|
||||||
|
const Y = icol(1).asArray();
|
||||||
const offsets = new Int32Array(X.length);
|
const offsets = new Int32Array(X.length);
|
||||||
let numOffsets = 0;
|
let numOffsets = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user