Skip to content

Commit

Permalink
chore(explorer): enable safari fix browser page (#704)
Browse files Browse the repository at this point in the history
* Enable Safari
* Fix Supported Browser page
  • Loading branch information
kaloster authored Jan 17, 2024
1 parent c6aa2a7 commit 8ebd1a1
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 32 deletions.
2 changes: 1 addition & 1 deletion client/configuration/webpack/SUPPORTED_BROWSERS_REGEX.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 23 additions & 18 deletions client/configuration/webpack/obsoleteHTMLTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
font-family: 'Inter, sans serif';
"
>
<img
src="https://cellxgene.cziscience.com/s3/cellxgene/static/images/cellxgene-logo.png"
style="width: 320px"
/>
<img src="/images/cellxgene.png" style="width: 320px" />
<div
style="
margin-top: 16px;
Expand All @@ -38,27 +35,35 @@
<a
href="https://www.google.com/chrome/?hl=en%22"
aria-label="Download Google Chrome"
target="_blank"
>
<img
src="https://cellxgene.cziscience.com/s3/cellxgene/static/images/chrome.png"
style="width: 80px; height: 80px"
/>
<img src="/images/chrome.png" style="width: 80px; height: 80px" />
<div>Chrome &gt; 60</div>
</a>
<a href="https://www.mozilla.com/firefox/" aria-label="Download Firefox">
<img
src="https://cellxgene.cziscience.com/s3/cellxgene/static/images/firefox.png"
style="width: 80px; height: 80px"
/>
<a
href="https://www.mozilla.com/firefox/"
aria-label="Download Firefox"
target="_blank"
>
<img src="/images/firefox.png" style="width: 80px; height: 80px" />
<div>Firefox ≥ 60</div>
</a>
<a href="//www.microsoft.com/edge" aria-label="Download Edge">
<img
src="https://cellxgene.cziscience.com/s3/cellxgene/static/images/edge.png"
style="width: 80px; height: 80px"
/>
<a
href="https://www.microsoft.com/edge"
aria-label="Download Edge"
target="_blank"
>
<img src="/images/edge.png" style="width: 80px; height: 80px" />
<div>Edge ≥ 79</div>
</a>
<a
href="https://www.apple.com/ca/safari/"
aria-label="Download Safari"
target="_blank"
>
<img src="/images/safari.png" style="width: 80px; height: 80px" />
<div>Safari ≥ 12</div>
</a>
</div>
</div>
</div>
10 changes: 3 additions & 7 deletions client/configuration/webpack/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const devConfig = {
// so it ignores the base_url (/d, /e) and dataset in the url.
// e.g., http://localhost:3000/static/assets/heatmap.svg
publicPath: "/",
assetModuleFilename: "images/[name][ext][query]",
},
module: {
rules: [
Expand All @@ -41,12 +42,7 @@ const devConfig = {
},
{
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2|otf)$/i,
loader: "file-loader",
options: {
name: "static/assets/[name].[ext]",
// (thuang): This is needed to make sure @font url path is '/static/assets/'
publicPath: "/",
},
type: "asset/resource",
},
],
},
Expand All @@ -57,7 +53,7 @@ const devConfig = {
}),
new FaviconsWebpackPlugin({
logo: "./favicon.png",
prefix: "static/img/",
prefix: "static/assets/",
favicons: {
icons: {
android: false,
Expand Down
6 changes: 2 additions & 4 deletions client/configuration/webpack/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const prodConfig = {
cache: false,
output: {
filename: "static/[name]-[contenthash].js",
assetModuleFilename: "images/[name][ext][query]",
},
optimization: {
minimize: true,
Expand All @@ -55,10 +56,7 @@ const prodConfig = {
},
{
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2|otf)$/i,
loader: "file-loader",
options: {
name: "static/assets/[name]-[contenthash].[ext]",
},
type: "asset/resource",
},
],
},
Expand Down
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"iOS >= 10.3",
"Firefox >= 60",
"Edge >= 79",
"not Explorer > 0",
"not Safari > 0"
"Safari >= 12",
"not Explorer > 0"
],
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.13.0",
Expand Down
Binary file added client/src/assets/img/cellxgene.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/img/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/img/edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/img/firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/img/safari.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ import "./index.css";
import App from "./components/app";
import store from "./reducers";

/**
* These are imported for Webpack asset/resource module
* to bundle in order to be used in obsolete browser template
*/
import "./assets/img/safari.png";
import "./assets/img/chrome.png";
import "./assets/img/firefox.png";
import "./assets/img/edge.png";
import "./assets/img/cellxgene.png";

FocusStyleManager.onlyShowFocusOnTabs();

ReactDOM.render(
Expand Down

0 comments on commit 8ebd1a1

Please sign in to comment.