Skip to content

Commit

Permalink
Prettify AwsMarketplace/Features.tsx and everything (#3319)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus authored and Rob Newman committed Apr 6, 2023
1 parent c281c8c commit 0a3a2d3
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 51 deletions.
14 changes: 12 additions & 2 deletions catalog/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['airbnb-typescript', 'prettier'],
plugins: ['@typescript-eslint', 'redux-saga', 'react', 'react-hooks', 'jsx-a11y', 'import'],
plugins: [
'@typescript-eslint',
'redux-saga',
'react',
'react-hooks',
'jsx-a11y',
'import',
],
env: {
jest: true,
browser: true,
Expand All @@ -23,7 +30,10 @@ module.exports = {
'import/no-named-as-default': 0,
'import/no-unresolved': 2,
'import/no-webpack-loader-syntax': 0,
'import/order': [2, { groups: ["builtin", "external", "internal", "parent", "sibling"] }],
'import/order': [
2,
{ groups: ['builtin', 'external', 'internal', 'parent', 'sibling'] },
],
'import/prefer-default-export': 0,
'jsx-a11y/aria-props': 2,
'jsx-a11y/label-has-associated-control': [
Expand Down
18 changes: 13 additions & 5 deletions catalog/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Quilt catalog

The catalog is a web frontend for browsing meta-data held by the Quilt registry.

# Developer

## Configuration

The app configuration (API endpoints, bucket federations, etc.) is read from
the `/config.js` path.

## Running the catalog locally

```sh
# local web server for catalog w/hot reload
$ cd catalog
Expand All @@ -17,26 +21,30 @@ $ npm start
```

## Notes

- don't be surprised if react-boilerplate code and doc gets way ahead of our repo;
it's rapidly evolving and there isn't a good way to pick up changes
it's rapidly evolving and there isn't a good way to pick up changes

- Redux store.app is generally populated with Immutable.js data structures, whereas
selectors mostly return JS (use Immutable.toJS()) for consumption by React components.
React-redux also seems to rely on JS data structures for `routingState` and `LOCATION_CHANGE`,
but that's handled in a separate domain (`state.route`) via reducer composition;
selectors mostly return JS (use Immutable.toJS()) for consumption by React components.
React-redux also seems to rely on JS data structures for `routingState` and `LOCATION_CHANGE`,
but that's handled in a separate domain (`state.route`) via reducer composition;
- makeSelectorNAME converts to JS for mapping to props
- leaf nodes may be primitive types
- use toJS() and fromJS from 'immutable' to convert

### Connecting to the router

- all route handling components already get a bunch of params injected as props
- for everything else: [`withRouter`](https://github.com/ReactTraining/react-router/blob/c3cd9675bd8a31368f87da74ac588981cbd6eae7/upgrade-guides/v2.4.0.#d)

### Fetch

- An accurate check for a successful fetch() would include checking that the promise resolved, then checking that the Response.ok property has a value of true. The code would look something like this:
[msdn fetch doc](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)
[msdn fetch doc](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)

## Deployment (for Quilt internal usage)

```sh
cd catalog
npm run build
Expand Down
29 changes: 16 additions & 13 deletions catalog/app/website/pages/AwsMarketplace/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,26 @@ export default function Features({ className }: FeaturesProps) {
return (
<div className={cx(classes.root, className)}>
<Feature heading="Data Versioning" logo={dataVersionControl}>
Take control of your data with Quilt Packages. Manage every version of your datasets with ease,
using our robust data version control system. Quilt empowers you to create and share packages that
securely store your data, complete with cryptographic fingerprints for verifiable revision history.
Ensure data integrity and reliability, and trace the lineage of your data with confidence.
Take control of your data with Quilt Packages. Manage every version of your
datasets with ease, using our robust data version control system. Quilt empowers
you to create and share packages that securely store your data, complete with
cryptographic fingerprints for verifiable revision history. Ensure data integrity
and reliability, and trace the lineage of your data with confidence.
</Feature>
<Feature heading="Collaborate" logo={dataCommons}>
Unleash the full potential of your data with Quilt Data's data catalog. Create and share data packages
complete with metadata, charts, documentation, and lineage to give others the complete context they need.
Effortlessly discover and access the datasets you need with our keyword-powered search feature, making it
simple to find relevant and actionable data.
Unleash the full potential of your data with Quilt Data's data catalog. Create and
share data packages complete with metadata, charts, documentation, and lineage to
give others the complete context they need. Effortlessly discover and access the
datasets you need with our keyword-powered search feature, making it simple to
find relevant and actionable data.
</Feature>
<Feature heading="Visualize" logo={visualizations}>
Utilize Quilt's powerful capabilities to view and analyze your data in a variety of
formats, including charts, plots, and graphs. Explore and interpret your data with ease, and add custom
interactives and visualizations to gain a deeper understanding. With Quilt's built-in visualizers
for Genomes using Interactive Genome Viewer (IGV) and protein structures (PDB Files), scientists can
see exactly which data they're exploring directly within their browser.
Utilize Quilt's powerful capabilities to view and analyze your data in a variety
of formats, including charts, plots, and graphs. Explore and interpret your data
with ease, and add custom interactives and visualizations to gain a deeper
understanding. With Quilt's built-in visualizers for Genomes using Interactive
Genome Viewer (IGV) and protein structures (PDB Files), scientists can see exactly
which data they're exploring directly within their browser.
</Feature>
</div>
)
Expand Down
22 changes: 11 additions & 11 deletions catalog/ipynb-styling/ipynb.less
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.ipynb-preview {
@import "notebook/notebook/static/components/bootstrap/less/variables.less";
@import "notebook/notebook/static/components/bootstrap/less/mixins.less";
@import 'notebook/notebook/static/components/bootstrap/less/variables.less';
@import 'notebook/notebook/static/components/bootstrap/less/mixins.less';

@import "notebook/notebook/static/base/less/style.less";
@import 'notebook/notebook/static/base/less/style.less';

@import "notebook/notebook/static/notebook/less/variables.less";
@import "notebook/notebook/static/notebook/less/ansicolors.less";
@import "notebook/notebook/static/notebook/less/cell.less";
@import "notebook/notebook/static/notebook/less/codecell.less";
@import "notebook/notebook/static/notebook/less/outputarea.less";
@import "notebook/notebook/static/notebook/less/renderedhtml.less";
@import "notebook/notebook/static/notebook/less/textcell.less";
@import 'notebook/notebook/static/notebook/less/variables.less';
@import 'notebook/notebook/static/notebook/less/ansicolors.less';
@import 'notebook/notebook/static/notebook/less/cell.less';
@import 'notebook/notebook/static/notebook/less/codecell.less';
@import 'notebook/notebook/static/notebook/less/outputarea.less';
@import 'notebook/notebook/static/notebook/less/renderedhtml.less';
@import 'notebook/notebook/static/notebook/less/textcell.less';
}

@import (less) "pygments-css/default.css";
@import (less) 'pygments-css/default.css';
5 changes: 1 addition & 4 deletions catalog/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ module.exports = {
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/internals/mocks/image.js',
},
setupFiles: [
'jest-localstorage-mock',
'./setup-jest.ts',
],
setupFiles: ['jest-localstorage-mock', './setup-jest.ts'],
testRegex: '.*\\.(test|spec)\\.[jt]sx?$',
testURL: 'https://quilt-test',
transformIgnorePatterns: [
Expand Down
22 changes: 11 additions & 11 deletions catalog/setup-jest.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
;(window as any).QUILT_CATALOG_CONFIG = {
"apiGatewayEndpoint": "",
"alwaysRequiresAuth": true,
"s3Proxy": "",
"registryUrl": "",
"ssoAuth": "DISABLED",
"ssoProviders": "",
"analyticsBucket": "",
"serviceBucket": "",
"mode": "PRODUCT",
"mixpanelToken": "",
"passwordAuth": "ENABLED",
apiGatewayEndpoint: '',
alwaysRequiresAuth: true,
s3Proxy: '',
registryUrl: '',
ssoAuth: 'DISABLED',
ssoProviders: '',
analyticsBucket: '',
serviceBucket: '',
mode: 'PRODUCT',
mixpanelToken: '',
passwordAuth: 'ENABLED',
}
7 changes: 5 additions & 2 deletions catalog/static/oauth-callback.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<body>
<script>
window.opener.postMessage({type: "callback", fragment: window.location.hash}, window.location.origin);
window.opener.postMessage(
{ type: 'callback', fragment: window.location.hash },
window.location.origin,
)
</script>
</body>
</html>
4 changes: 1 addition & 3 deletions catalog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
"importHelpers": true,
"allowJs": true
},
"include": [
"./app/**/*"
]
"include": ["./app/**/*"]
}

0 comments on commit 0a3a2d3

Please sign in to comment.