Git Product home page Git Product logo

terra-clinical's Introduction

Terra Logo

Terra Clinical

Cerner OSS License Build Status devDependencies status lerna

Packages

Status

Stable Beta Deprecated

Terra Package Version Status Dependencies
terra-clinical-data-grid NPM version Stable terra-clinical-data-grid
terra-clinical-detail-view NPM version Stable terra-clinical-detail-view
terra-clinical-header NPM version Stable terra-clinical-header
terra-clinical-item-display NPM version Stable terra-clinical-item-display
terra-clinical-item-view NPM version Stable terra-clinical-item-view
terra-clinical-label-value-view NPM version Stable terra-clinical-label-value-view
terra-clinical-onset-picker NPM version Stable terra-clinical-onset-picker

Deprecated

Terra Package Version Status
terra-clinical-action-header NPM version Deprecated
terra-clinical-app-delegate NPM version Deprecated
terra-clinical-error-view NPM version Deprecated
terra-clinical-item-collection NPM version Stable
terra-clinical-modal-manager NPM version Deprecated
terra-clinical-no-data-view NPM version Deprecated
terra-clinical-site NPM version Deprecated
terra-clinical-slide-group NPM version Deprecated

Internationalization (I18n)

Please review Terra's Internationalization documentation for more information. Included are directions on consumption and how internationalization is setup.

Contributing

Please read through our contributing guidelines. Included are directions for issue reporting and pull requests.

Local Development

  1. Install docker https://www.docker.com/ to run browser tests.
  2. Install dependencies and run tests.
npm install
npm run test

Local Development using Docker (Dev Containers)

  1. Install Rancher or Docker.
    • Rancher is free and open-source and is highly recommended whereas Docker may require a license for use.
  2. Install Microsoft VS Code.
  3. Install the Dev Container extension.
    • Navigate to View -> Extension -> Search for and install Dev Containers (or "ms-vscode-remote.remote-containers")
    • More information on Dev Containers
  4. Build the dev container:
    • (Option 1) - Opening local workspace in dev container
      • Clone the repository (or fork) locally and open the project in Visual Studio Code
      • Navigate to View -> Command Palette and run Dev Containers: Open Workspace in Container
    • (Option 2) - Recommended for Windows for hot-reloading to work during development and improved performance: Creating the dev container using dev volumes (for more information and guidance, see the Official Guide)
      • If you have git setup and have global config file ~/.gitconfig locally, these settings should automatically be transferred to the dev container
      • Navigate to View -> Command Palette and run Dev Containers: Clone Repository in Container Volume
      • Paste the GitHub URL of this repository (or fork)
      • VS Code will now reload the workspace and create/start the dev container and volume
      • Please note: changes made using this option will only update files in the Docker volume. It is recommended to commit changes often in case the volume is deleted or dev container gets removed.
  5. You're now running in a dev container. Use the terminal of the dev container in Visual Studio Code to issue any npm or bash commands.
  6. Before running any WDIO tests, make sure to perform the following steps:
    • Open a new terminal (outside the dev container) and navigate to ".devcontainer/" path in your repository.
    • Execute the command "docker compose -f docker-compose-wdio.yml up". Selenium hub should spin up. Leave this running in the background. If you see errors saying "container name already exists", run "docker container prune" command followed by pressing "y" to clear up any unused containers and try running the previous command again.
    • You can now run npm run test:docker or npm run wdio:docker commands to run WDIO tests from inside the Dev Container.
    • NOTE: Optionally, if you want to run other WDIO commands in the dev container, you can also edit the root package.json file WDIO scripts to include --disableSeleniumService=true flag. This will disable the selenium service from spinning up again. For example:
      "scripts": {
       "wdio-lowlight": "terra wdio --disableSeleniumService=true --themes clinical-lowlight-theme"
       }
    • If any of the compose files were to be changed, you must refresh the docker container by deleting the corresponding existing docker images, then running the following command:
        docker compose -f <changed compose file name>.yml up
  7. To terminate a dev container:
    • Use command line or Rancher/Docker Desktop OR
    • Using Visual Studio Code
      • Select the Remote Explorer icon in the Activity Bar or View -> Command Palette and run Remote Explorer: Focus on Containers View
      • Locate the terra-clinical_devcontainer or currently running dev container under "Dev Containers"
      • Right click and select Stop Container and close the workspace
        • You can also select Rebuild Container to restart the dev container
  8. To reopen a dev container:
    • Existing local workspace (for Option 1)
      • Open the project in Visual Studio Code
      • Ensure the workspace contains the .devcontainer folder
      • Navigate to View -> Command Palette and run Dev Containers: Open Workspace in Container
    • Isolated dev container volume (for Option 2)
      • Open Visual Studio Code
      • Use the Remote Explorer icon in the Activity Bar or View -> Command Palette and run Remote Explorer: Focus on Containers View to view containers
      • Locate the terra-clinical_devcontainer under "Dev Containers"
      • Hover over the dev container and click the Folder icon labelled Open Folder in Container or by right clicking and selecting Open Folder in Container

LICENSE

Copyright 2017 - 2020 Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

terra-clinical's People

Contributors

aalexanderj avatar adoroshk avatar amichaelparker avatar avinashg1994 avatar benbcai avatar benboersma avatar bjankord avatar dkasper-was-taken avatar emilyrohrbough avatar lokesh-0813 avatar matt-butler avatar mayurikini avatar mjhenkes avatar neilpfeiffer avatar nfaltermeier avatar nikhitasharma avatar pranav300 avatar rakshith91 avatar rayguny avatar rm012685 avatar ryanthemanuel avatar saket2403 avatar sdadn avatar smason0 avatar supreethmr avatar sycombs avatar tbiethman avatar trandrew1023 avatar vinaybhargavar avatar yuderekyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terra-clinical's Issues

ItemView Subcomponent Custom Props Not Rendering

Description of Issue

The terra-clinical-item-view does not display custom props placed on the display subcomponent.

Considering the following:
const display = <ItemView.Display text="display" style={{ color: 'red' }} />;
<ItemView displays={[display]} />;
If ItemView.Display is rendered individually, the red styling is placed on the text, however when passed to the ItemView component, the red styling does not appear.

Expected Outcomes

  • The custom props places on the subcomponents should render when rendered within the ItemView component.

Update the error view to use a more proper svg

Please fill out the below template as best you can.

Description of Issue

We need to update the image in the error view to use a more proper svg. There was one that was used in legacy terra rails view models that we should use until the glyphs are more officially released.

Terra Clinical Item View has failing Nightwatch tests

Please fill out the below template as best you can.

Description of Issue

Terra Clinical Item View has three failing Nightwatch tests.
screen shot 2017-04-13 at 7 55 52 am

Expected Outcomes

  • Links can be styled as buttons
  • Disabled links behave the same as disabled buttons

Convert Application Component to CSS Modules

Issue Description

To better align with modern CSS practices and modern CSS theming capabilities, we want to update this component to use CSS modules and if applicable, CSS custom properties.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component styles are converted to use CSS modules. If applicable, convert SCSS variables to CSS custom properties.

Current Behavior

Component styles use manual name spaced classes and SCSS variables.

Convert Error View Component to CSS Modules

Issue Description

To better align with modern CSS practices and modern CSS theming capabilities, we want to update this component to use CSS modules and if applicable, CSS custom properties.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component styles are converted to use CSS modules. If applicable, convert SCSS variables to CSS custom properties.

Current Behavior

Component styles use manual name spaced classes and SCSS variables.

Convert Application Site to CSS Modules

Issue Description

To better align with modern CSS practices and modern CSS theming capabilities, we want to update this component to use CSS modules and if applicable, CSS custom properties.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component styles are converted to use CSS modules. If applicable, convert SCSS variables to CSS custom properties.

Current Behavior

Component styles use manual name spaced classes and SCSS variables.

Create EmbeddedContentConsumer component to interface with embedded iframe content

Progress

  • Design Input
  • Expected Behaviour
  • Tech Design
  • Development
  • Functional Validation
  • UX Validation
  • Released

Feature / Enhancement Request

Future React applications will need to embed iFrame content into themselves in order to present non-React content. However, we still want content in those embedded frames to communicate to their containing applications (using a messaging system like XFC) in order to drive workflows.

I would like to develop a generic EmbeddedContentConsumer component that will mount an iFrame within itself using XFC and handle the generated messages in a standard way.

Expected Behavior

I have an (admittedly out of data) example in this branch: https://github.com/cerner/terra-clinical/blob/pdf_redux/packages/terra-clinical-application/src/patient-app/embedded-content-consumer/EmbeddedContentConsumer.jsx

Ideally, the EmbeddedContentConsumer (better names welcome :D) would have a simple prop API:

  • src - The URL for the iFrame's src attribute
  • handlers - An Object mapping message names to function handlers

When the EmbeddedContentConsumer mounts, it will mount the iFrame using XFC and establish communication with the Provider in the iFrame content. Then, when the Provider dispatches messages back to the EmbeddedContentConsumer, the EmbeddedContentConsumer will use the message name to lookup the proper handler from the handlers prop and will call the handler with the message payload as a parameter.

This would allow more opinionated components to wrap the EmbeddedContentConsumer and provide specific URLs and handlers. We may wish to include some default handlers in the EmbeddedContentConsumer itself, but I'm not sure what those defaults would be at this time.

The above linked branch also includes a EmbeddedContentProvider: https://github.com/cerner/terra-clinical/blob/pdf_redux/packages/terra-clinical-application/src/patient-app/embedded-content-provider/EmbeddedContentProvider.jsx

Theoretically, React content in the iFrame could be wrapped in that component and have the bootstrapping handled automatically. Non-React content would have to handle the bootstrapping separately (but in a similar way). I'm not sure a component like EmbeddedContentProvider is necessary at this time, but I'm documenting the prototype here to hopefully give everything a bit more context.

Remove individual publish scripts from packages

Description of Issue

Using lerna publish creates git tags when publishing packages. These tags are used to help determine if a package contains any new commits that should be released since the last time the package was published.

Using the individual release:version scripts will publish a package without making a tag for the release. This results in sync issues when trying to use lerna publish again. To avoid this issue, we should use lerna publish solely for publishing and avoid using individual publish scripts.

Add lib to gitignore

Description of Issue

A common pattern for npm modules is to add the lib(es5) directory to the .gitignore and add the src(es6) directory to the .npmignore. Babel is an example of this pattern that also uses lerna.

More information can be found in this article:
http://jamesknelson.com/writing-npm-packages-with-es6-using-the-babel-6-cli/

To Do:

  • Update the .gitignore to no longer check in the lib directory.
  • We can probably remove the prepush script after this is completed.
  • Compile for travis CI tests
  • Add script which compiles before publishing cerner/terra-core#353

Reference: cerner/terra-core#316

terra-clinical-item-collection component

Issue Description

An Item Collection is a wrapper component to display data as either a table or list of items dependent on the relative container size.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Initially data is displayed in a tabular format that flexes the rendered component, but as the container is resized and the indicated breakpoint is hit, the display changes to shows the data as a list of items. The terra-table and terra-clinical-item react components will be utilized for displaying the data in these two ways.

Ultimately, the terra-clinical-item-collection component allows consumers to organize tabular data and ensure this data is readable as screen sizes become progressively smaller.

Convert Detail View Component to CSS Modules

Issue Description

To better align with modern CSS practices and modern CSS theming capabilities, we want to update this component to use CSS modules and if applicable, CSS custom properties.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component styles are converted to use CSS modules. If applicable, convert SCSS variables to CSS custom properties.

Current Behavior

Component styles use manual name spaced classes and SCSS variables.

Tests Fail to Run on a Package Level

Issue Description

To fix the heroku slug issue, the terra-toolkit devDependency was removed in each package level. With the removal of this devDependency, test scripts on a package level are resulting in the following error:

Error: Cannot find module '/Users/er047227/terra-clinical/packages/terra-clinical-item-view/node_modules/terra-toolkit/lib/scripts/nightwatch.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

The tests scripts on a package level uses the following path, which is causing the error:
node ./node_modules/terra-toolkit/lib/scripts/nightwatch.js

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Steps to Reproduce

  1. In any package directory, run npm run test:nightwatch-default to produce the error.

Update space styling for Item-Displays in Clinical-Item-Collection

Issue Description

Fix line-height/margin/padding/vertical-aligment of Displays when presented in the table view of the Clinical Item Collection, so that all text “baselines” are aligned and icons and text all appear to look centered vertically when there is only one line of text content.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

All Text and icons, when there is only a single line of content, in the table view should appear visually "centered" or aligned to the same baseline.

Current Behavior

Start and End Accessories (icons) correctly display vertically centered. The Clinical Item Displays (text) are correctly aligned top but when single line of text, they align too high visually (row height could be too tall) and icons, the basic displays, and the comments - all align to different visual baselines.

Required Enhancement

Will resolve fix comment added in PR #91

Error in running Nightwatch tests on a per-package basis

Description of Issue

Terra-clinical nightwatch tests uses the terra-toolkit for the webpack configuration. Nightwatch tests cannot be ran for individual packages because the server-launcher default config-path is '../../terra-site/webpack.config', it results in the error:

Error: Cannot find module '../../terra-site/webpack.config'

Each package needs updated to include a webpack_config_path so these tests can be run for each individual package.

Steps to Reproduce the Issue

  1. cd into package directory
  2. npm run test:nightwatch-default

Convert Action Header Component to CSS Modules

Issue Description

To better align with modern CSS practices and modern CSS theming capabilities, we want to update this component to use CSS modules and if applicable, CSS custom properties.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component styles are converted to use CSS modules. If applicable, convert SCSS variables to CSS custom properties.

Current Behavior

Component styles use manual name spaced classes and SCSS variables.

Update Site Layout

Once terra-list is release, the site layout should be updated to mimic terra-core's site layout to maintain consistency.

Item-display, icon does not scale

Issue Description

item-display

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Icon scales with font-size

Current Behavior

Icon does not scale with font-size. At large font-sizes, icon is no longer visible.

Steps to Reproduce

  1. Navigate to the item display examples
  2. Increase or decrease the font-size of the item-display.

Environment

  • Component Version: 0.2.0
  • Browser Name and Version: Chrome
  • Operating System and version (desktop or mobile): Desktop

Alias moment and react-dom

  • Alias moment and react-dom. There were multiple copies of moment being pulled into our bundle. This is due to react-datepicker having moment as a dependency instead of a peerDependency. React-datepicker has an outstanding issue for this here: Hacker0x01/react-datepicker#122

After adding the alias for moment and react-dom, we can see that only one copy is pulled into our bundle.

References: cerner/terra-core#297

Remove Jest warnings for terra-Base and dir="ltr"

To get rid of the jest warnings, add this to your jestsetup.js file.

const htmlTag = document.getElementsByTagName('html')[0];
htmlTag.setAttribute('class', 'terra-Base');
htmlTag.setAttribute('dir', 'ltr');

Add npm whoami check when publishing

Issue Description

To ensure we are using an authenticated NPM account when we run the publish command, we should check using npm whoami and bail if we are not signed in to an authenticated account

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Check npm whoami an ensure we're logged into to an authenticated NPM account before continuing with the publishing scripts.

Current Behavior

Users can run the publish script without being logged into NPM. This results in tags being created but nothing is published to NPM. This puts the repo in an odd state as trying to publish with lerna will note there are no changes since the last commit.

Update the doc site for terra-clinical-item-view to be more realistic

Please fill out the below template as best you can.

Description of Issue

Since we are using the doc site to demo components right now, I'd like to update the doc site to be more realistic for terra-clinical-item-view. It's possible we might want to engage some functional people on this to get more realistic data.

Update the example icons for terra-clinical-item-view

Please fill out the below template as best you can.

Description of Issue

Neil recommended that we change the start and end accessories for clinical item view to (src/icons/0021_flag_a.svg) for the startAccessory and the trophy (0025_trophy_a.svg) as the endAccessory.

Convert Header Component to CSS Modules

Issue Description

To better align with modern CSS practices and modern CSS theming capabilities, we want to update this component to use CSS modules and if applicable, CSS custom properties.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component styles are converted to use CSS modules. If applicable, convert SCSS variables to CSS custom properties.

Current Behavior

Component styles use manual name spaced classes and SCSS variables.

Remove SCSS theming capability from clinical components

Issue Description

We currently support theming via SCSS variables in various components. As we plan to switch to a css-in-js solution for styling, the current implementation of theming variables leaks implementation details of how we are styling/theming components.

With css-in-js, we'd plan to use JSON files for theming. Switching from SCSS variables to a JSON file for theming would be a non-passive change for our consumers.

We've discussed removing theming functionality via SCSS variables before the v1 release of the various components. This will allow use to roll out theming functionality via JSON files as a new feature rather than a non-passive change.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

All components use hard-coded values instead of SCSS theming variables.

Current Behavior

Various terra components use SCSS theming variables.

Action header missing translation, message fallback

Issue Description

When action header was missing the en translation, the component still loaded correctly. This was the error I saw in the console:

image

This is what the component looked like:
image

When translations are missing, it should not use the message id as a fallback

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Heroku PR deployed issue

Summary

The Heroku review app can't be deployed due to the code size (after installing all npm modules, around 1.6 GB). It exceeds Heroku slug size after the compression.

The root cause is terra-toolkit(which is around 130 MB) has been installed repeatedly.

Enhancement Request

Reorganize the source code and devDependencies to only import terra-toolkit once.

Expected Behavior

Only import terra-toolki once. Reduce the code size less than 1G.

Implementation terra-clinical-overlay

Progress

  • Design Input
  • Expected Behaviour
  • Tech Design
  • Development
  • Functional Validation
  • UX Validation
  • Released

Feature / Enhancement Request

The terra-clinical-overlay component creates an overlay relative to the container which triggered the overlay.

Expected Behavior

This component will block interactions and fade out all elements of the triggering container.

Update DetailView to accept elements under subtitles

We have a situation where we would like to provide an array of elements within the DetailView to display a series of Icons/Graphics under subtitles.

For items that need to retain multiple icons in
image
the detail view, we would like to be able to list them in the "header" area like the attached image.

We would like the DetailView's subtitles to take in elements, not just strings.

Item-View, icons do not scale

Issue Description

At larger font-sizes, icons get cropped off at the bottom.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Icons scaled with font-size.

Current Behavior

Icons are not scaled with font-size.
screen shot 2017-06-28 at 12 44 08 pm

The person, comment, and information icon are cropped off at the bottom.

Steps to Reproduce

  1. Open the item-view examples
  2. Adjust the browser font-size to very large.

Environment

  • Component Version: 0.2.0
  • Browser Name and Version: Chrome
  • Operating System and version (desktop or mobile): v58

Investigate DRYing up the nightwatch.conf.js file between packages

Progress

  • Design Input
  • Expected Behaviour
  • Tech Design
  • Development
  • Functional Validation
  • UX Validation
  • Released

Feature / Enhancement Request

The nightwatch.conf.js file is repeated among all of the test directories in each package. We should investigate using just one file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.