[zanata/zanata-platform] fa8f01: Upgrade to React 15.5 (ZNTA-1922) (#397)

GitHub noreply at github.com
Mon Jun 19 04:02:54 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/zanata/zanata-platform
  Commit: fa8f01c7f4dcc7f64766f8b3aaa019872a5253c2
      https://github.com/zanata/zanata-platform/commit/fa8f01c7f4dcc7f64766f8b3aaa019872a5253c2
  Author: David Mason <drdmason at gmail.com>
  Date:   2017-06-19 (Mon, 19 Jun 2017)

  Changed paths:
    M server/zanata-frontend/src/frontend/app/actions/explore-actions.js
    M server/zanata-frontend/src/frontend/app/actions/glossary-actions.js
    M server/zanata-frontend/src/frontend/app/actions/languages-actions.js
    M server/zanata-frontend/src/frontend/app/components/EditableText/index.js
    M server/zanata-frontend/src/frontend/app/components/Icon/index.jsx
    M server/zanata-frontend/src/frontend/app/components/Link/Link.story.js
    M server/zanata-frontend/src/frontend/app/components/Link/index.js
    M server/zanata-frontend/src/frontend/app/components/Loader/index.js
    M server/zanata-frontend/src/frontend/app/components/LoaderText/index.js
    M server/zanata-frontend/src/frontend/app/components/LogoLoader/index.js
    M server/zanata-frontend/src/frontend/app/components/Modal/ModalBody.jsx
    M server/zanata-frontend/src/frontend/app/components/Modal/ModalFooter.jsx
    M server/zanata-frontend/src/frontend/app/components/Modal/ModalHeader.jsx
    M server/zanata-frontend/src/frontend/app/components/Modal/ModalTitle.jsx
    M server/zanata-frontend/src/frontend/app/components/Modal/index.jsx
    M server/zanata-frontend/src/frontend/app/components/Nav/NavIcon.jsx
    M server/zanata-frontend/src/frontend/app/components/Nav/NavItem.jsx
    M server/zanata-frontend/src/frontend/app/components/Nav/index.jsx
    M server/zanata-frontend/src/frontend/app/components/Notification/component.js
    M server/zanata-frontend/src/frontend/app/components/TextInput/index.js
    M server/zanata-frontend/src/frontend/app/containers/App.js
    M server/zanata-frontend/src/frontend/app/containers/Explore/GroupTeaser.jsx
    M server/zanata-frontend/src/frontend/app/containers/Explore/LanguageTeamTeaser.jsx
    M server/zanata-frontend/src/frontend/app/containers/Explore/ProjectTeaser.jsx
    M server/zanata-frontend/src/frontend/app/containers/Explore/TeaserList.jsx
    M server/zanata-frontend/src/frontend/app/containers/Explore/TeaserListHeader.jsx
    M server/zanata-frontend/src/frontend/app/containers/Explore/UserTeaser.jsx
    M server/zanata-frontend/src/frontend/app/containers/Explore/index.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/DeleteAllEntriesModal.jsx
    M server/zanata-frontend/src/frontend/app/containers/Glossary/DeleteEntryModal.jsx
    M server/zanata-frontend/src/frontend/app/containers/Glossary/Entry.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/EntryModal.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/ExportModal.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/Header.jsx
    M server/zanata-frontend/src/frontend/app/containers/Glossary/ImportModal.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/NewEntryModal.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/ViewHeader.js
    M server/zanata-frontend/src/frontend/app/containers/Glossary/index.js
    M server/zanata-frontend/src/frontend/app/containers/Languages/DeleteEntry.js
    M server/zanata-frontend/src/frontend/app/containers/Languages/Entry.js
    M server/zanata-frontend/src/frontend/app/containers/Languages/NewLanguageModal.js
    M server/zanata-frontend/src/frontend/app/containers/Languages/index.js
    M server/zanata-frontend/src/frontend/app/containers/Root.js
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/CalendarMonthMatrix.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/CalendarPeriodHeading.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/CategoryItemMatrix.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/CategoryMatrixTable.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/ContentStateFilter.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/ContributionChart.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/DayMatrix.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/FilterableMatrixTable.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/RecentContributions.jsx
    M server/zanata-frontend/src/frontend/app/containers/UserProfile/index.jsx
    M server/zanata-frontend/src/frontend/app/editor/components/Button/Button.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/Button/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/DashboardLink/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/DocsDropdown/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/Dropdown/Dropdown.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/Dropdown/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/EditorSearchInput.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/FilterToggle/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/GlossarySearchInput/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/GlossaryTerm/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/GlossaryTermModal/component.js
    M server/zanata-frontend/src/frontend/app/editor/components/IconButton/IconButton.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/IconButton/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/IconButtonToggle/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/KeyCombinations.js
    M server/zanata-frontend/src/frontend/app/editor/components/LanguagesDropdown/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/NoSuggestionsPanel/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/Pager/Pager.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/Pager/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/ProgressBar/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/ProjectVersionLink/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/SplitDropdown/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/Suggestion.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionContents/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionDetailsSummary/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionList.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionMatchPercent/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionSearchInput/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionSources/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionTranslationDetails.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionTranslations.js
    M server/zanata-frontend/src/frontend/app/editor/components/SuggestionUpdateMessage.js
    M server/zanata-frontend/src/frontend/app/editor/components/TextDiff/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/ToggleSwitch/ToggleSwitch.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/ToggleSwitch/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnit/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitFilter/TransUnitFilter.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitFilter/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitLocaleHeading.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitSourceHeader.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitSourcePanel.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitStatus.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitTranslationFooter.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitTranslationHeader.js
    M server/zanata-frontend/src/frontend/app/editor/components/TransUnitTranslationPanel.js
    M server/zanata-frontend/src/frontend/app/editor/components/TranslatingIndicator/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/UiLanguageDropdown/UiLanguageDropdown.test.js
    M server/zanata-frontend/src/frontend/app/editor/components/UiLanguageDropdown/index.js
    M server/zanata-frontend/src/frontend/app/editor/components/ValidationOptions/ValidationOptions.story.js
    M server/zanata-frontend/src/frontend/app/editor/components/ValidationOptions/index.js
    M server/zanata-frontend/src/frontend/app/editor/containers/ControlsHeader.js
    M server/zanata-frontend/src/frontend/app/editor/containers/EditorHeader/index.js
    M server/zanata-frontend/src/frontend/app/editor/containers/GlossaryTab.js
    M server/zanata-frontend/src/frontend/app/editor/containers/KeyShortcutCheatSheet/index.js
    M server/zanata-frontend/src/frontend/app/editor/containers/KeyShortcutDispatcher.js
    M server/zanata-frontend/src/frontend/app/editor/containers/MainContent.js
    M server/zanata-frontend/src/frontend/app/editor/containers/NavHeader.js
    M server/zanata-frontend/src/frontend/app/editor/containers/ParamPropDispatcher.js
    M server/zanata-frontend/src/frontend/app/editor/containers/Root/index.js
    M server/zanata-frontend/src/frontend/app/editor/containers/Sidebar/index.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SidebarContent.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SidebarSettings.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionDetailsModal/ImportedTMDetailPanel.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionDetailsModal/LocalProjectDetailPanel.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionDetailsModal/PlainSuggestionContents.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionDetailsModal/index.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionsBody.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionsHeader.js
    M server/zanata-frontend/src/frontend/app/editor/containers/SuggestionsPanel.js
    M server/zanata-frontend/src/frontend/app/editor/containers/ZanataLogoLoader.js
    M server/zanata-frontend/src/frontend/app/editor/index.js
    M server/zanata-frontend/src/frontend/app/editor/middlewares/new-context-fetch.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/dropdown-reducer.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/glossary-reducer.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/header-data-reducer.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/index.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/phrase-reducer.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/suggestions-reducer.js
    M server/zanata-frontend/src/frontend/app/editor/reducers/ui-reducer.js
    M server/zanata-frontend/src/frontend/app/index.js
    M server/zanata-frontend/src/frontend/app/reducers/index.js
    M server/zanata-frontend/src/frontend/app/styles/style.less
    M server/zanata-frontend/src/frontend/package.json
    M server/zanata-frontend/src/frontend/yarn.lock

  Log Message:
  -----------
  Upgrade to React 15.5 (ZNTA-1922) (#397)

* chore(ZNTA-1922): upgrade react to v15.5.x

This introduces numerous warnings that will be fixed in subsequent commits.

* chore(ZNTA-1922): upgrade/remove peer dependencies of react at 15.5.x

Some peer dependencies are moved to other modules. The imports will be
updated in the following commits.

* chore(ZNTA-1922): replace react-addons-test-utils with react-dom/test-utils

This is the same module, it was just moved into the react-dom package.

* chore(ZNTA-1922): replace react-addons-update with immutability-helper

As described in React 15 blog post:
https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html

* chore(ZNTA-1922): replace React.PropTypes with prop-types module

Using React.PropTypes is deprecated, so the separate module is now
the standard way to use PropTypes.

* chore(ZNTA-1922): replace redux-simple-router with react-router-redux

They are the same package, just renamed to react-router-redux when it
went from version 2 to 3.

* chore(ZNTA-1922): upgrade react-router and react-router-redux to be compatible with react at 15.5.x

Updated to versions that are compatible with React 15.
There is a newer major version of react-router, but the compatible
react-router-redux for that is still in beta.

* chore(ZNTA-1922): upgrade react-redux to latest

Major version upgrade but they assert it is API compatible.

* chore(ZNTA-1922): fix frontend routing with simplistic fix

This does a quick-fix using locationBeforeTransitions, which may just
be the same as the old state.routing.location but with a more meaningful
name, but that is not clear and this may need further work.
The react-router-redux middleware may be a good fit.

* chore(ZNTA-1922): fix editor routing

* chore(ZNTA-1922): upgrade react-intl to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-bootstrap and react-overlays to be compatible with react at 15.5.x

Were causing deprecation warnings for React 15.5

* chore(ZNTA-1922): use prop-types in EditableText

Changed most of them earlier, but missed this one.

* chore(ZNTA-1922): upgrade react-textarea-autosize to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-loading to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-select to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-split-pane to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-sidebar to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-helmet to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-list to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-autosuggest to be compatible with react at 15.5

* chore(ZNTA-1922): upgrade react-date-range to be compatible with react at 15.5.x

* chore(ZNTA-1922): upgrade react-chartjs to be compatible with react at 15.5.x

Note that this is not an official release. The official release seems
stagnant and has not been updated to work without errors in react 15.5.
This points to a commit based on the most recent release but with
a minimal change that fixes the warnings.
I will likely change to use react-chartjs-v2 since it is better maintained,
but this may require some changes to the structure of the chart data so I
will defer it for now.

* fix(ZNTA-1922): correct typo in prop name

Was bStyle instead of bsStyle. Also fixes some jsx sections that were
not wrapped to expand variables.

* fix(ZNTA-1922): remove unrecognized tag left over from different element type

* fix(ZNTA-1922): use correct link type in language teaser

* fix(ZNTA-1922): remove and replace unknown props

These look like they are generally from changing component type and
not checking that the props still make sense. We need a test suite that
exercises all the components to catch this type of error when devs
miss it.

* fix(ZNTA-1922): correct elements that were improperly migrated from <Flex>

These look like improperly migrated <Flex> elements.

* fix(ZNTA-1922): stop incorrect use of some react-bootstrap components

* fix(ZNTA-1922): use debounce correctly for search on language page

It was never invoking the search, and was not persisting the debounced
callback so even if it were called it would not debounce properly.
This gist shows what was wrong and how the fix works:
https://gist.github.com/davidmason/2ad6fc4b35209a4fb6778cf3deeaead7

* fix(ZNTA-1922): focus language id search input when it is clicked

Clicking on the right of the field was not focusing the input field
properly. This ensures the input element is the full width so it will
focus with a click anywhere in the field.

* fix(ZNTA-1922): stop changing between controlled and uncontrolled components

This was happening when component state was reset to be undefined, which
was passed as the input value. An undefined input value defines an input
as uncontrolled.

* fix(ZNTA-1922): remove attribute accidentally copied over from angular code

This happened quite some time ago, but I was able to trace it back
to the source. I do not think it has ever worked in the React app
so there is no harm in removing it.

* fix(ZNTA-1922): avoid extra padding between content and sidebar

This was introduced by a change in react-sidebar:
https://github.com/balloob/react-sidebar/commit/8f2e24092ba70625af6901cf14074869e3daef63

* refactor: minor whitespace changes

* chore(ZNTA-1922): replace react-chartjs with react-chartjs-2

* chore(ZNTA-1922): return contribution chart to its former glory

It is not identical, but as close as the new version of the charting library
seems to be capable of.

* fix(ZNTA-1922): fix invalid table structure in glossary view

This was probably caused by an update to react-bootstrap.

* fix(contribution chart): lock chart scale between 0 and 10 when contributions are low

This prevents showing negative numbers on the scale when contributions are all 0, and
ensures that very low contribution numbers will show as a low graph.

* fix(console warning): prevent warning for missing callback

The componnet does not always need it, but marks it as .isRequired.
The proper fix here will be to split the component into 2 components
since they need a very different set of props input.




More information about the zanata-commits mailing list