From 20d6680e066dba301cfda1a8180dd88730e99337 Mon Sep 17 00:00:00 2001 From: dannyrb Date: Thu, 5 Sep 2019 21:52:45 -0400 Subject: [PATCH] chore: update references to `ohif-core` and `react-viewerbase` --- README.md | 1 - docs/latest/essentials/themeing.md | 6 +++--- docs/latest/essentials/translating.md | 4 ++-- extensions/cornerstone/src/toolbarModule.js | 2 -- platform/core/README.md | 13 ++++++------- platform/ui/README.md | 17 ++++++++--------- platform/ui/src/__docs__/compatibility.mdx | 2 +- platform/ui/src/__docs__/getting-started.mdx | 16 ++++++++-------- platform/ui/src/__docs__/introduction.mdx | 18 +++++++++--------- platform/ui/src/__docs__/translating.mdx | 12 ++++++------ .../ui/src/components/cineDialog/CineDialog.js | 5 ----- platform/viewer/README.md | 1 - .../docker_openresty-orthanc-keycloak.js | 3 +-- platform/viewer/src/store/index.js | 2 +- 14 files changed, 45 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 2d839159d..edc142726 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,6 @@ MIT © [OHIF](https://github.com/OHIF) [netlify-image]: https://api.netlify.com/api/v1/badges/a5d369ab-18a6-41c3-bcde-83805205ac7f/deploy-status [netlify-url]: https://app.netlify.com/sites/ohif/deploys [all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square -[contributing-url]: https://github.com/OHIF/Viewers/blob/master/CONTRIBUTING.md [circleci-image]: https://circleci.com/gh/OHIF/Viewers.svg?style=svg [circleci-url]: https://circleci.com/gh/OHIF/Viewers [codecov-image]: https://codecov.io/gh/OHIF/Viewers/branch/master/graph/badge.svg diff --git a/docs/latest/essentials/themeing.md b/docs/latest/essentials/themeing.md index f67f0e2c9..383a1588b 100644 --- a/docs/latest/essentials/themeing.md +++ b/docs/latest/essentials/themeing.md @@ -4,7 +4,7 @@ Themeing is currently accomplished with color variables that are defined within the [`:root`](https://css-tricks.com/almanac/selectors/r/root/) selector (allowing them to cascade across all elements). This repository's components, and the ones we consume from our -[React Viewerbase component library](https://react.ohif.org/styling-and-theming) +[`@ohif/ui` component library](https://react.ohif.org/styling-and-theming) utilize them. We are interested in pursuing more robust themeing options, and open to pull requests and discussion issues. @@ -80,12 +80,12 @@ function RadicalImagingLogo() { href: 'http://radicalimaging.com', }, React.createElement('h5', {}, 'RADICAL IMAGING') - ) + ); } props.whiteLabelling = { logoComponent: RadicalImagingLogo(), -} +}; ``` -[npm-url]: https://npmjs.org/package/ohif-core -[npm-downloads-image]: https://img.shields.io/npm/dm/ohif-core.svg?style=flat-square -[npm-version-image]: https://img.shields.io/npm/v/ohif-core.svg?style=flat-square +[npm-url]: https://npmjs.org/package/@ohif/core +[npm-downloads-image]: https://img.shields.io/npm/dm/@ohif/core.svg?style=flat-square +[npm-version-image]: https://img.shields.io/npm/v/@ohif/core.svg?style=flat-square [all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square -[contributing-url]: https://github.com/OHIF/ohif-core/blob/master/CONTRIBUTING.md [license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square [license-url]: LICENSE diff --git a/platform/ui/README.md b/platform/ui/README.md index 284ca4991..c4c8907ce 100644 --- a/platform/ui/README.md +++ b/platform/ui/README.md @@ -49,8 +49,8 @@ yarn add @ohif/ui --exact ## Usage ```jsx -import React, { Component } from "react"; -import { LayoutButton } from "@ohif/ui"; +import React, { Component } from 'react'; +import { LayoutButton } from '@ohif/ui'; class Example extends Component { constructor(props) { @@ -58,10 +58,10 @@ class Example extends Component { this.state = { selectedCell: { - className: "hover", + className: 'hover', col: 1, - row: 1 - } + row: 1, + }, }; } @@ -117,10 +117,9 @@ Links: [all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square -[contributing-url]: https://github.com/OHIF/react-viewerbase/blob/master/CONTRIBUTING.md -[npm-url]: https://npmjs.org/package/react-viewerbase -[npm-downloads-image]: https://img.shields.io/npm/dm/react-viewerbase.svg?style=flat-square -[npm-version-image]: https://img.shields.io/npm/v/react-viewerbase.svg?style=flat-square +[npm-url]: https://npmjs.org/package/@ohif/ui +[npm-downloads-image]: https://img.shields.io/npm/dm/@ohif/ui.svg?style=flat-square +[npm-version-image]: https://img.shields.io/npm/v/@ohif/ui.svg?style=flat-square [license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square [license-url]: LICENSE diff --git a/platform/ui/src/__docs__/compatibility.mdx b/platform/ui/src/__docs__/compatibility.mdx index cd95c68d1..fd6b842c7 100644 --- a/platform/ui/src/__docs__/compatibility.mdx +++ b/platform/ui/src/__docs__/compatibility.mdx @@ -7,7 +7,7 @@ route: /compatibility ## Browser Support -React Viewerbase relies on +`@ohif/ui` relies on [browsers supported by Styled Components](https://www.styled-components.com/docs/faqs#which-browsers-are-supported) or browsers supported by emotion. diff --git a/platform/ui/src/__docs__/getting-started.mdx b/platform/ui/src/__docs__/getting-started.mdx index dd3cc7900..9f299d7e8 100644 --- a/platform/ui/src/__docs__/getting-started.mdx +++ b/platform/ui/src/__docs__/getting-started.mdx @@ -11,20 +11,20 @@ route: /getting-started > possibility of introducing breaking changes. Please depend on an "exact" > version in your projects to prevent issues caused by loose versioning. -Install `react-viewerbase` from npm: +Install `@ohif/ui` from npm: ```shell // with npm -npm i react-viewerbase --save-exact +npm i @ohif/ui --save-exact // with yarn -yarn add react-viewerbase --exact +yarn add @ohif/ui --exact ``` ## Usage -There is some setup required for `react-viewerbase`. We are working to eliminate -these requirements with the goal of providing ready to use components. +There is some setup required for `@ohif/ui`. We are working to eliminate these +requirements with the goal of providing ready to use components. ### External Dependencies @@ -37,8 +37,8 @@ or the font you set for your theme: 'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700|Sanchez&display=swap'; ``` -React Viewerbase also looks for theme CSS variabled defined on `:root`. You can -find a list of variables [on the theming page](/styling-and-theming) +`@ohif/ui` also looks for theme CSS variabled defined on `:root`. You can find a +list of variables [on the theming page](/styling-and-theming) ### Import & Use @@ -46,7 +46,7 @@ You can use components in your React app: ```js import React, { Component } from 'react'; -import { LayoutButton } from 'react-viewerbase'; +import { LayoutButton } from '@ohif/ui'; class Example extends Component { constructor(props) { diff --git a/platform/ui/src/__docs__/introduction.mdx b/platform/ui/src/__docs__/introduction.mdx index efdde28a1..061928b0a 100644 --- a/platform/ui/src/__docs__/introduction.mdx +++ b/platform/ui/src/__docs__/introduction.mdx @@ -3,14 +3,14 @@ name: Introduction route: / --- -import { Playground, Props } from 'docz' -import { State } from 'react-powerplug' -import { TableList, TableListItem } from './../index.js' +import { Playground, Props } from 'docz'; +import { State } from 'react-powerplug'; +import { TableList, TableListItem } from './../index.js'; # Introduction -**React Viewerbase is a collection of components and utilities** that power -OHIF's [zero-footprint DICOM viewer](https://github.com/OHIF/Viewers) +**@ohif/ui is a collection of components and utilities** that power OHIF's +[zero-footprint DICOM viewer](https://github.com/OHIF/Viewers) ([demo][demo-url]). We maintain them as a separate component library to: - Decouple presentation from business logic @@ -25,11 +25,11 @@ OHIF's [zero-footprint DICOM viewer](https://github.com/OHIF/Viewers) > version in your projects to prevent issues caused by loose versioning. ```js -// Add 'react-viewerbase' as a dependency -yarn add react-viewerbase +// Add '@ohif/ui' as a dependency +yarn add @ohif/ui // Import and use components -import { TableList } from 'react-viewerbase' +import { TableList } from '@ohif/ui' ``` @@ -56,7 +56,7 @@ import { TableList } from 'react-viewerbase' > - ) + ); })} )} diff --git a/platform/ui/src/__docs__/translating.mdx b/platform/ui/src/__docs__/translating.mdx index 44e810751..0fe4f9bab 100644 --- a/platform/ui/src/__docs__/translating.mdx +++ b/platform/ui/src/__docs__/translating.mdx @@ -36,9 +36,9 @@ export default withTranslation('MyNameSpace')(MyComponent); For further information about namespaces and how they work, please visit [OHIF Namespaces docs](https://docs.ohif.org/essentials/translating.html#namespaces). -### How to get right the Name Space of a react-viewerbase component? +### How to get right the Namespace of a `@ohif/ui` component? -Check the component's page in this site, the NameSpace information should be on +Check the component's page in this site, the Namespace information should be on the bottom line. Also, a nameSpace is defined when exporting a component, this information can be @@ -50,10 +50,10 @@ E.g. export default withTranslation('TheNamespaceYouAreLookingFor')(TheComponentYouWantToUse); ``` -### How to use another NameSpace inside the current NameSpace? +### How to use another Namespace inside the current Namespace? i18next provides a parsing feature able to get translations strings from any -NameSpace, like this following example getting data from `InnerSpace` NameSpace: +Namespace, like this following example getting data from `InnerSpace` Namespace: ``` $t(InnerSpace:Reset) @@ -64,8 +64,8 @@ export default withTranslation('OuterSpace')(TheComponent); ## I18next Provider -**React Viewerbase** pass down the `t` function trough the custom -[withTranslation HOC](https://github.com/OHIF/react-viewerbase/blob/master/src/utils/LanguageProvider.js). +**@ohif/ui** pass down the `t` function trough the custom +[withTranslation HOC](https://github.com/OHIF/Viewers/blob/master/platform/ui/src/utils/LanguageProvider.js). --- diff --git a/platform/ui/src/components/cineDialog/CineDialog.js b/platform/ui/src/components/cineDialog/CineDialog.js index 854f80695..d74592977 100644 --- a/platform/ui/src/components/cineDialog/CineDialog.js +++ b/platform/ui/src/components/cineDialog/CineDialog.js @@ -121,11 +121,6 @@ class CineDialog extends PureComponent { } }; - // TODO: - // - Add next / previous display set buttons which just call - // onClickNextDisplaySet and onClickPreviousDisplaySet which are passed in as props. - // See https://github.com/OHIF/Viewers/blob/master/Packages/ohif-viewerbase/client/components/viewer/cineDialog/cineDialog.html#L38 - // - Add 'isEnabled' prop: https://github.com/OHIF/Viewers/blob/master/Packages/ohif-viewerbase/client/components/viewer/cineDialog/cineDialog.js#L301 render() { const { t } = this.props; return ( diff --git a/platform/viewer/README.md b/platform/viewer/README.md index bfe9eeb8f..ae3d20ee2 100644 --- a/platform/viewer/README.md +++ b/platform/viewer/README.md @@ -188,7 +188,6 @@ Links: [docker-pulls-img]: https://img.shields.io/docker/pulls/ohif/viewer.svg?style=flat-square [docker-image-url]: https://hub.docker.com/r/ohif/viewer [all-contributors-image]: https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square -[contributing-url]: https://github.com/OHIF/Viewers/blob/react/CONTRIBUTING.md [license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square [license-url]: LICENSE diff --git a/platform/viewer/public/config/docker_openresty-orthanc-keycloak.js b/platform/viewer/public/config/docker_openresty-orthanc-keycloak.js index 8aaff155d..4a57db574 100644 --- a/platform/viewer/public/config/docker_openresty-orthanc-keycloak.js +++ b/platform/viewer/public/config/docker_openresty-orthanc-keycloak.js @@ -13,7 +13,6 @@ window.config = { imageRendering: 'wadors', thumbnailRendering: 'wadors', // REQUIRED TAG: - // https://github.com/OHIF/ohif-core/blob/59e1e04b92be24aee5d4402445cb3dcedb746995/src/studies/retrieveStudyMetadata.js#L54 // TODO: Remove tag after https://github.com/OHIF/ohif-core/pull/19 is merged and we bump version requestOptions: { // undefined to use JWT + Bearer auth @@ -39,4 +38,4 @@ window.config = { post_logout_redirect_uri: '/logout-redirect.html', }, ], -} +}; diff --git a/platform/viewer/src/store/index.js b/platform/viewer/src/store/index.js index 3a9a11cb5..1167184d2 100644 --- a/platform/viewer/src/store/index.js +++ b/platform/viewer/src/store/index.js @@ -11,7 +11,7 @@ import { reducer as oidcReducer } from 'redux-oidc'; import { redux } from '@ohif/core'; import thunkMiddleware from 'redux-thunk'; -// Combine our ohif-core, ui, and oidc reducers +// Combine our @ohif/core, ui, and oidc reducers // Set init data, using values found in localStorage const { reducers, localStorage } = redux; const middleware = [thunkMiddleware];