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

chore(explorer): enable safari fix browser page #704

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to see in dev if we need to remove the / prefix in src, since I think it was just for local testing and might break in deployed environment!

<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
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div id="root"></div>
<script
async
src="static/obsoleteBrowsers.js"
src="/static/obsoleteBrowsers.js"
kaloster marked this conversation as resolved.
Show resolved Hide resolved
id="obsolete-browsers"
data-template="<%= OBSOLETE_TEMPLATE %>"
data-regex="<%= OBSOLETE_REGEX %>"
Expand Down
2 changes: 1 addition & 1 deletion client/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div id="root"></div>
<script
async
src="static/obsoleteBrowsers.js"
src="/static/obsoleteBrowsers.js"
id="obsolete-browsers"
data-template="<%= OBSOLETE_TEMPLATE %>"
data-regex="<%= OBSOLETE_REGEX %>"
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.
6 changes: 6 additions & 0 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import "./index.css";
import App from "./components/app";
import store from "./reducers";

import "./assets/img/safari.png";
kaloster marked this conversation as resolved.
Show resolved Hide resolved
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
Loading