Uploaded image for project: 'ui-users'
  1. ui-users
  2. UIU-679

Users App: Use documented react-intl patterns instead of stripes.intl

    XMLWordPrintable

Details

    • stripes-force Sprint 50, stripes-force - Sprint 51, stripes-force Sprint 51
    • 8
    • Stripes Force

    Description

      Retrieving the intl object from this.context.intl or the stripes god object (stripes.intl) is a deprecated pattern.

      Update ui-users to only use react-intl constructs outlined at https://github.com/folio-org/stripes-core/blob/master/doc/i18n.md

      Use <FormattedMessage>, <FormattedDate>, and <FormattedTime> as often as possible, only falling back to formatMessage(), formatDate(), and formatTime() (accompanied by injectIntl) when a bare string is absolutely necessary.

      formatDateTime() should be replaced by <FormattedTime> or formatTime() with day/month/year props like https://github.com/folio-org/stripes-core/blob/d0d8f71ec322c9b89ae6ba92cb29179db1cc1704/util/dateUtil.js#L21

      Util functions formatDate() and formatDateTime() defined in this repo shouldn't be necessary.

      React Intl docs: https://github.com/yahoo/react-intl/wiki

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Igor Godlevskyi Igor Godlevskyi
                cherewaty Jeffrey Cherewaty
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases