[zanata/zanata-platform] 496213: Prep for React upgrade - remove createClass (ZNTA-...
GitHub
noreply at github.com
Fri May 26 02:30:15 UTC 2017
Branch: refs/heads/master
Home: https://github.com/zanata/zanata-platform
Commit: 4962138dcd21898be84fb019d6c57d6ecfc5f67c
https://github.com/zanata/zanata-platform/commit/4962138dcd21898be84fb019d6c57d6ecfc5f67c
Author: David Mason <drdmason at gmail.com>
Date: 2017-05-26 (Fri, 26 May 2017)
Changed paths:
M server/zanata-frontend/src/frontend/app/components/EditableText/index.js
M server/zanata-frontend/src/frontend/app/components/LogoLoader/index.js
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/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/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/ContributionChart.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/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/index.js
M server/zanata-frontend/src/frontend/app/editor/components/EditorSearchInput/EditorSearchInput.story.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/index.js
M server/zanata-frontend/src/frontend/app/editor/components/IconButtonToggle/index.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/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/index.js
M server/zanata-frontend/src/frontend/app/editor/components/TransUnit/index.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/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/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/package.json
M server/zanata-frontend/src/frontend/yarn.lock
Log Message:
-----------
Prep for React upgrade - remove createClass (ZNTA-1953) (#328)
* refactor(frontend): convert frontend components to use classes
This is preparation to update React to v15
* fix(frontend): upgrade react-chartjs to remove a deprecation warning
* fix(ZNTA-1935): remove warnings and prevent React swallowing props.key
React silently consumes props.key and it is not defined in the component
this.props. The workaround is to use a different name (e.g. id). We
should look at adding a linting rule to make using 'key' as a prop
name in propTypes an error.
* refactor(frontend): stop using manual binding on React component methods
Using arrow functions when defining a custom method on a component
allows the method to be passed as a callback without the need to
manually bind it. Custom methods are any that are not React lifecycle
methods.
* refactor(ZNTA-1953): use static field for component propTypes and arrow functions for custom methods
This is to make all class-based components consistent in how they
specify propTypes and non-lifecycle methods.
* fix: minor linting errors
* fix(glossary): defactor glossary to use binding inline in JSX to satisfy react-list
The old version of react-list we are using seems to break unless we bind the
update function inline - worst-practice but it just does not work when binding
in the constructor or let React bind it by using an arrow function.
The render function does not appear to be part of the newer API for react-list,
it takes a child component as a template instead. Updating to the new version
may help bring us in line with good practice.
More information about the zanata-commits
mailing list