Giter VIP home page Giter VIP logo

terra-ui's Introduction

Cerner OSS Build Status Dependencies status devDependencies status

Documentation site for Terra. Terra is the core UI component library, unifying UX concepts and development across Cerner.

Getting Started

Install Application

git clone https://github.com/cerner/terra-ui.git

npm install

Run Application

npm run start

Test Application

npm run test

Local Development using Docker

  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. 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-ui_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
  7. 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-ui_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

Supported Browsers

Browser Version
Chrome & Chrome for Android Current
Edge Current
Firefox Current
Internet Explorer 10 & 11
Safari & Mobile Safari Current

Contributing

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

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-ui's People

Contributors

amichaelparker avatar benbcai avatar benboersma avatar bjankord avatar dependabot-preview[bot] avatar dkasper-was-taken avatar dmcginn avatar emilyrohrbough avatar jessierandle avatar kenk2 avatar lokesh-0813 avatar matt-butler avatar mjhenkes avatar mndrsn avatar nfaltermeier avatar nikhitasharma avatar poloka avatar renovate[bot] avatar roryhardy avatar ryanthemanuel avatar saket2403 avatar sdadn avatar spartasixzero avatar stephenesser avatar supreethmr avatar sycombs avatar tbiethman avatar windse7en avatar xenoworf 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

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

terra-ui's Issues

Resolve console errors in example pages

Issue Description

Some of the examples are throwing console errors when viewing them.

The following pages are throwing errors:

  • Datepicker
  • Forms
  • Time Input
  • Status - only throws error when served over https. Issue with img resource coming from http url.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Example pages don't throw console errors.

Current Behavior

Some of the example pages throw console errors.

Steps to Reproduce

  1. Navigate to the documentation pages for the components above
  2. Open the developer console

Review OSS files

Description of Issue

Review all of the OSS files to ensure they are up-to-date.

  • CONTRIBUTING.md
  • CONTRIBUTORS.md
  • LICENSE
  • NOTICE
  • README
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/ISSUE_TEMPLATE.md

Replace UI's Footer with terra-brand-footer

Issue Description

On the home page we use a custom footer. We should update this to use terra-brand-footer.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Use our pretty react components

Current Behavior

Being custom

Add missing props-tables

Issue Description

A couple of the props-tables were missing. After merging this pr: cerner/terra-core#584 and releasing the components, we need to add the missing tables on terra-ui.com

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Document CSS custom properties for each component

Issue Description

Add documentation for CSS custom properties used in terra components

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Terra UI components include documentation on the available CSS custom properties they support

Current Behavior

No doc provided

Add props table for each component

Description of Issue

Add props table for each component. We have a props table for each component on our functional testing site. However, props table does not currently work on terra-ui.com because we do not distribute our src directory(react-docgen only works with our src directory for generating the table).

Components using the ResponsiveElement component trigger Invalid calling object Javascript error in IE11

Issue Description

In IE11, when navigating to one of documentation examples of a component that uses the terra responsive element component, it will trigger an JS error with a message "Invalid calling object".
This happens on the Alert, Demographics Banner, ReposniveElement, and Clinical Item Collection pages

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Navigating to the Alert, Demographics Banner, ReposniveElement, and Clinical Item Collection pages does not trigger a JS error.

Current Behavior

Navigating to the Alert, Demographics Banner, ReposniveElement, and Clinical Item Collection pages does trigger a JS error.

Steps to Reproduce

  1. Open the developer tools in IE 11:
  2. Navigate to one of the following pages in IE11:

Loading one of these pages without the developer tools being open seems to avoid the error from being triggered.

Environment

  • Component Version: terra-site 1.8.0
  • Browser Name and Version: IE 11
  • Operating System and version (desktop or mobile): Desktop

Add terra-clinical components

Description of Issue

We currently only have pages for each of the terra-core components. We want to add pages for all of the terra-clinical components.

Add favicon

Issue Description

Add favicon to terra-ui.com

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Add new relic tracking code to doc site

Issue Description

To help monitor usage, logs, errors on the doc site, we'll want to hook up new relic. We currently have it set up in terra-core. We should shift this to monitor the terra-ui site to have broader reporting on more of terra.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Site includes new relic tracking

Component pages not rendering

Issue Description

The alert, clinical-item-collection, clinical-item-view, infinite-list, notification-dialog pages are not rendering correctly on the doc site.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Component doc pages render

Current Behavior

Page errors out with the following error message:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at m (PropsTable.js:197)

Update 'What is Terra' docs

Issue Description

These are outdates and the first thing people will read.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Missing Documentation For terra-form/lib Components

Issue Description

Terra documentation located here: link, is missing the documentation for terra-form/lib components such as TextField, NumberField, etc, that are documented here: link.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Components that are part of the terra-form/lib library should have their documentation listed on: link.

Current Behavior

The documentation for terra-form/lib components are not being shown.

Steps to Reproduce

  1. Go to the URL: http://engineering.cerner.com/terra-ui/#/site/components/core/site.
  2. Verify that the documentation for components in the terra-form/lib library is missing.

Environment

  • Component Version: 2.1.0
  • Browser Name and Version: Chrome 64.0.3282.186 (64-bit)
  • Operating System and version (desktop or mobile): macOS Sierra (10.12.6)

Use react-router

Description of Issue

Some of our components are dependent on terra-base and specifying a locale. We want to only include base once in our application so we cannot put our layout in application.haml. If we use react-router, we only need to specify base once.

Switch from webpacker_lite to webpacker.

Issue Description

Webpacker is available for our applications to use. To get this app as a good example app for our teams, we need to switch over to using webpacker.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Select and Select-Field Prop Tables display information incorrrectly

Issue Description

Select and Select-Field prop tables aren't enclosed correctly - the resulting table abruptly ends and props are being rendered in a paragraph.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Prop tables should fully display relevant information in the proper format.

Current Behavior

Prop tables for Select and Select-Field display information erratically.

screen shot 2017-10-11 at 4 50 35 pm

Performance Improvements

Issue Description

The terra-ui.com bundle is very large. We want to seperate the site into several bundles.
We can use dynamic imports with webpack to make this easier.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Known accessibility issues

Issue Description

There are some accessibility issues in the doc site mainly related to heading order and color contrast of <code> blocks in markdown rendered content.

This issue serves as a collection of issues from manual testing with http://squizlabs.github.io/HTML_CodeSniffer/

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Doc site renders without any WCAG 2 AA or Section 508 errors reported from http://squizlabs.github.io/HTML_CodeSniffer/

Current Behavior

https://terra-ui.herokuapp.com/#/components/terra-alert/alert/alert

  • This form does not contain a submit button
  • This textinput element does not have a name available to an accessibility API
  • This form field should be labelled in some way

https://terra-ui.herokuapp.com/#/components/terra-application-layout/application-layout/about

  • Duplicate id attribute value "is-required-false" found on the web page.
  • Duplicate id attribute value "is-required-true" found on the web page.

https://terra-ui.herokuapp.com/#/components/terra-application-links/application-links/application-links

  • Color contrast issues

https://terra-ui.herokuapp.com/#/components/terra-application-utility/application-utility/application-utility

  • Color contrast issue
  • Duplicate id attribute value "default" found on the web page.

https://terra-ui.herokuapp.com/#/components/terra-arrange/arrange/arrange

  • This form does not contain a submit button

https://terra-ui.herokuapp.com/#/components/terra-avatar/avatar/avatar

  • Color contrast issues

https://terra-ui.herokuapp.com/#/components/terra-base/base/base

  • This link points to a named anchor "license" within the document, but no anchor exists with that name.

https://terra-ui.herokuapp.com/#/components/terra-brand-footer/brand-footer/brand-footer

  • Anchor element found with a valid href attribute, but no link content has been supplied.

https://terra-ui.herokuapp.com/#/components/terra-clinical-item-collection/clinical-item-collection

https://terra-ui.herokuapp.com/#/components/terra-clinical-onset-picker/clinical-onset-picker

  • This fieldset element does not have a name available to an accessibility API.
  • Fieldset does not contain a legend element.
  • This select element does not have a name available to an accessibility API.
  • This form field should be labelled in some way.
    There is currently no way to apply a legend for the field sets in this component. New issue logged here: cerner/terra-clinical#435

https://terra-ui.herokuapp.com/#/components/terra-date-picker/date-picker/date-picker

  • This textinput element does not have a name available to an accessibility API.
  • This form field should be labelled in some way.

https://terra-ui.herokuapp.com/#/components/terra-date-time-picker/date-time-picker/date-time-picker

  • This textinput element does not have a name available to an accessibility API.
  • This form field should be labelled in some way.

https://terra-ui.herokuapp.com/#/components/terra-dialog-modal/dialog-modal/dialog-modal

  • Duplicate id attribute value "trigger-dialog-modal"

https://terra-ui.herokuapp.com/#/components/terra-dynamic-grid/dynamic-grid/dynamic-grid

  • Color contrast issues

https://terra-ui.herokuapp.com/#/components/terra-embedded-content-consumer/embedded-content-consumer/embedded-content-consumer

  • Iframe element requires a non-empty title attribute that identifies the frame.

https://terra-ui.herokuapp.com/#/components/terra-form-fieldset/form-fieldset/form-fieldset

  • This form does not contain a submit button
  • This textinput element does not have a name available to an accessibility API
  • This form field should be labelled in some way

https://terra-ui.herokuapp.com/#/components/terra-form-input/form-input/input

  • This textinput element does not have a name available to an accessibility API
  • This form field should be labelled in some way.
  • The heading structure is not logically nested

https://terra-ui.herokuapp.com/#/components/terra-form-select/form-select/select

https://terra-ui.herokuapp.com/#/components/terra-form-textarea/form-textarea/textarea

  • This textarea element does not have a name available to an accessibility API
  • This form field should be labelled in some way.

https://terra-ui.herokuapp.com/#/components/terra-form-validation/form-validation/validation-events

https://terra-ui.herokuapp.com/#/components/terra-hookshot/hookshot/hookshot

  • This form does not contain a submit button
  • This numberinput element does not have a name available to an accessibility API
  • Duplicate id attribute value "hookshotAttachmentBehaviorundefined"
  • Duplicate id attribute value "hookshotAttachmentMarginundefined"
  • Duplicate id attribute value "hookshotContentAttachmentundefined"
  • Duplicate id attribute value "hookshotTargetAttachmentundefined"

https://terra-ui.herokuapp.com/#/components/terra-i-18-n/i-18-n/i-18-n

  • This select element does not have a name available to an accessibility API
  • Select is missing label
  • The heading structure is not logically nested.

https://terra-ui.herokuapp.com/#/components/terra-menu/menu/menu

  • This form does not contain a submit button

https://terra-ui.herokuapp.com/#/components/terra-modal-manager/modal-manager/example

  • This form does not contain a submit button.

https://terra-ui.herokuapp.com/#/components/terra-navigation-layout/navigation-layout/navigation-layout

  • The heading structure is not logically nested.

https://terra-ui.herokuapp.com/#/components/terra-notification-dialog/notification-dialog/notification-dialog

  • The heading structure is not logically nested.

https://terra-ui.herokuapp.com/#/components/terra-popup/popup/popup

  • This select element does not have a name available to an accessibility API
  • Select missing label
  • Form does not contain a submit button
  • The heading structure is not logically nested.

https://terra-ui.herokuapp.com/#/components/terra-section-header/section-header/section-header

  • The heading structure is not logically nested.

https://terra-ui.herokuapp.com/#/components/terra-slide-panel-manager/slide-panel-manager/slide-panel-manager

  • Form does not contain a submit button
  • Duplicate id attribute value "disclosureHeightdimensions"
  • Duplicate id attribute value "disclosureWidthdimensions"

https://terra-ui.herokuapp.com/#/components/terra-status-view/status-view/status-view

  • Form does not contain a submit button

https://terra-ui.herokuapp.com/#/components/terra-table/table/table

  • Color contrast issue with sample content

https://terra-ui.herokuapp.com/#/components/terra-tag/tag/tag

  • Color contrast issue with component

https://terra-ui.herokuapp.com/#/components/terra-theme-provider/theme-provider/theme-provider

  • Select is missing label
  • The heading structure is not logically nested.

https://terra-ui.herokuapp.com/components/core/time-input

  • Inputs missing labels

Common issues

  • Color contrast for code blocks
  • Duplicate ids for change log headers
  • Links are indicated as an anchor since they start with #.

Steps to Reproduce

  1. Navigate to URL
  2. Run http://squizlabs.github.io/HTML_CodeSniffer/ bookmarklet
  3. Check WCAG 2 AA errors
  4. Check Section 508 errors

div does not respect height:100% in IE 11

Issue Description

Hi,

We are seeing a strange issue with IE 11 only.

It looks fine in Chrome and Edge but looks squished in IE 11.

After further investigation, I've tracked down the responsible element that is causing the squished height.

image

It is the div with the class "_1d5no1b"

I have no idea why this div doesn't seem to respect height: 100% in IE 11 but does respect height: 400px

I think the component in question is DynamicGrid. https://engineering.cerner.com/terra-ui/#/components/terra-dynamic-grid/dynamic-grid/dynamic-grid

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Expect this div to have height of 100% in IE 11

Current Behavior

div looks squished

Environment

  • Component Version:
  • Browser Name and Version: IE 11 (Version 11.0.9600.17843)
    Update Versions: 11.0.20 (KB3058515)
  • Operating System and version (desktop or mobile): Windows 7 Enterprise SP1

Update doc in developer guide on when to use injectIntl vs contextTypes vs FormattedMessage component and standardize testing these different approaches

Issue Description

Need to make it clear in our developer contribution guide when to use injectIntl vs contextTypes vs FormattedMessage component and standardize testing these different approaches.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Developer guide explains when to use injectIntl vs contextTypes vs FormattedMessage component and standardize testing these different approaches.

Update to use Terra-site v2

Issue Description

Update to use Terra Site v2 to pull in the master branches of terra-core, terra-clinical, and terra-framework.

Rename Repo from terra-ui.com to terra-ui

Issue Description

I propose we rename this repo from terra-ui.com to terra-ui. The reason for this change is to make the gh-pages url less strange. Currently the url is engineering.cerner.com/terra-ui.com which is weird. After the name change it would be engineering.cerner.com/terra-ui

Unable to get property 'getInstance' of undefined or null reference

Issue Description

Seeing 'Unable to get property 'getInstance' of undefined or null reference' in New Relic logs. This error is happening in react-onclickoutside. Likely one of our examples is causing this. It only seems to be showing up in IE10 and IE11.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Environment

  • Browser Name and Version: IE 10 and 11
  • Operating System and version (desktop or mobile): Desktop

Preparing the next major release of terra-ui

It's been a while since we cut a major release holistically across all terra ui components. There are some non-passive changes needed in terra-ui components like terra-base and terra-i18n that will require a major version bump for all components.

We want to communicate these changes as well as other non-passive changes that we are considering across terra-ui. At this time, we are planning to cut a new major release involving terra-base and terra-i18n around then end of March 2019. We are planning to release some other major version bumps to individual packages are the updates become available.

Terra Core Updates planned for end of March 2019 Release

PR for this set of work: cerner/terra-core#2288

Additional Terra Core Updates (Post March 2019 MVB release)

Terra Framework Major Version Bump changes (Post March 2019 MVB release)

Terra Toolkit Major Version Bump Proposal

cerner/terra-toolkit#262

Terra Dev Site Major Version Bump changes

Add Landing Page

Description of Issue

Currently, when visiting terra-ui.herokuapp.com, it returns a page with a list of components. Instead, we want to have a professional looking landing page. UX has done some work on an initial landing page design.

Create "Thing" to Listen for Terra Master Branch Updates

Issue Description

Terra-UI needs to display the most up-to-date terra-components available to consumer. With the completion of #57, this will be possible, however every time the master branch of a terra-repo is updated, this site will need manually redeployed. This should be automated

Expected Behavior

Lets add some sort of bot or webhook that will listen/receive master-branch merge updates. Upon receiving the update this will trigger a new deployment build to keep terra-ui in sync.

Update UI Dependencies

Issue Description

Several UI devDependencies should be dependencies. These should be evaluated & updated.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Add Developer FAQ guide.

Issue Description

Terra code has several developers concerns such as theming and internationalization, as well as standards for concerns such as writing styles, jest tests, wdio tests, and other frontend aspects. We should have a page in our site that details these to developers so they know how to contribute appropriately.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Terra i18n Testing Guidance

Issue Description

Looking at the Testing Components Which Include Translations guide, it says to use enzyme-react-intl (which needs a new release so that each method is decoupled from actual translations, see: enzyme-intl will be moving this to toolkit soon 😉) as well as putting the following snippet in the jest setup config file:

import aggregateTranslations from 'terra-toolkit/scripts/aggregate-translations/aggregate-translations';

aggregateTranslations();

Why should a test be concerned with actual translations? Putting that code snippet in the setup file can D R A S T I C A L L Y slow down jest tests, which should be fast (unlike a certain functional/visual regression test suite coughwdiocough 😒😒😒).

gottagofast

I propose that we follow the react-intl docs suggestion and mock out translations. We can decouple tests from translations which is good because:

  • faster tests
  • less brittle tests
  • mocking out formatMessage, like so will have expected translation ids in the snapshots/tests

If we want to make sure that all translations are present, we should make a tool that:

  • gets all the keys from each translations/*.json file and ensure that each file has every key, e.g.:
const fs = require('fs-extra');

const translationsDir = './translations';
const translationFilePath = file => `${translationsDir}/${file}`;

const extractLocale = (file = '') => {
  const indexOfExt = file.indexOf('.json');
  return indexOfExt > 0 ? file.slice(0, indexOfExt) : '';
};

const allTranslations = () => {
  try {
    const translationFiles = fs.readdirSync(translationsDir);

    const translations = translationFiles.reduce((acc, file) => ({
      ...acc,
      [extractLocale(file)]: fs.readJsonSync(translationFilePath(file)),
    }), {});

    return translations;
  } catch (e) {
    console.error(e);
  }

  return {};
};

const translationsObj = allTranslations();
const standard = translationsObj.en;

const ensureAllKeysExist = (compareWith = {}) => (translationsDictionary = {}) => {
  const differences = Object.entries(translationsDictionary).reduce((acc, [locale, translations]) => {
    const diff = { ...compareWith, ...translations };

    return {
      ...acc,
      [locale]: Object.entries(diff).filter(([k, _]) => !(k in compareWith)).reduce((a, [k, v]) => ({ ...a, [k]: v }), {}),
    };
  }, {});

  Object.entries(differences).forEach(([locale, translations]) => {
    if (Object.entries(translations).length > 0) {
      console.error(`locale ${locale} has the following differences: ${JSON.stringify(translations, undefined, 2)}`);
    }
  });
};

ensureAllKeysExist(standard)(translationsObj);
  • Makes sure that every call to intl.formatMessage({ id: '...' }) and <FormattedMessage id="..." /> has a corresponding entry for each id in each locale

Additional Info

react-intl has been compiled weird, so it's kind of hard to make a reusable component that can be imported, but we should suggest putting the following under app-name/__mocks__/react-intl.js:

/**
 * See: https://github.com/yahoo/react-intl/wiki/Testing-with-React-Intl#jest-mock
 */
const { createElement } = require('react');
const Intl = require.requireActual('react-intl');

const mockIntl = {
  defaultLocale: 'en',
  formatDate: (date, options) => `${date}`,
  formatHTMLMessage: ({ id }, options) => id,
  formatMessage: ({ id }, options) => id,
  formatNumber: (value, options) => `${value}`,
  formatPlural: (value, options) => `${value}`,
  formatTime: (value, options) => `${value}`,
  formatRelative: (value, options) => `${value}`,
  now: () => 0,
};

Intl.injectIntl = (Node) => {
  const renderWrapped = props => createElement(Node, Object.assign({}, props, { intl: mockIntl }));
  renderWrapped.displayName = Node.displayName || Node.name || 'Component';
  return renderWrapped;
};

module.exports = Intl;

Then in their jestSetup.js:

...

jest.mock('react-intl');

It has also been suggested to add a "pretest" script which just runs aggregateTranslations once per test run, not before every test.

image

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Fast.

Current Behavior

Slow.

Create bug reporter/feature request page

Issue Description

To help facilitate users with reporting bugs and requesting new features, we should set up a page that helps guide users similar to https://new-issue.ant.design/
Source code: https://github.com/ant-design/antd-issue-helper

Currently, there is a link in the footer to "Log an issue". We should update this to go to a new page we make for logging issues for all components.

Issue Type

  • New Feature
  • Enhancement
  • Bug
  • Other

Expected Behavior

Terra UI site has a bug report/feature request page to log issues for components to their respective repo.

Current Behavior

Users have to figure out which repo a component is in to log a bug report or feature request.
At times, users don't provide all the information needed to be fully actionable on bug reports or feature requests. Creating a form with required fields should help with this.

Getting Started Documentation

Description of Issue

We want to add documentation on how to get started with terra components. There should be documentation on:

  • Installing components
  • Setting up webpack
  • Importing components
  • Setting up i18n
  • Creating a simple page

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.