-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an API for registering and replacing React components (#2536)
* create API for registering and replacing React components * register most components in ui plugin * register all button variants separately * delete empty file * cleanup and register checkout components * load registered components in router startup * register/cleanup NavBar components and add to CoreLayout * start on register/cleanup of Tag components * set default value to Array for hoc arg * register/cleanup Notification components * clean up and register accounts components * move all registered component usage inside of render methods * register CartPanel container * mapProps -> withProps * use registeredf components in NavBar * register TagNav * fixing loading issues with navbar * changed to exports * export tag nav components and container * export all ui components Simply import component for tag item in tag list component * Fix broken account dropdown * fix icon button props * fix cart panel, drawer, icon * Fix broken product detail page * export popover and popover content * refactor NavBar container * refactor and register CoreLayout * set default value for hocs in replaceComponent * set the display name on all registered components * fix reactive updates in MainDropdown * fix reactivity issue with currentRoute on logout * add Link, NavLink, Prompt, withRouter to reaction-router plugin * fix CartSubtotal component name * cart components cleanup * remove unused layout * fix navbar reactivity * Brand component cleanup * remove unnecessary Tracker wrapper * revert SortableTable components * register all TagNav components * don’t register DragDropProvider * move babel config to babelrc * clean up and register all email settings components * set default Loading component for composeWithTracker * fix export typos * cleanup and register Auth and MainDropdown components * register SMS plugin components * update all composeWithTracker instances to use default Loading component * make sure SMS package uses registered components * refactor/register Alerts component * start making components pure where possible * refactor Divider component * remove react-simple-di * update React packages * temporarily disable Jest tests * make notifications components pure * fix handlers in notification components * register ProductAdmin components * register MediaGallery with its container * register PDP components * fix textfield prop * revert Select component to Component class because refs are being used * add Reaction(ComponentName) display name identifier to all registered components * register all product-variant components * move components API to a plugin, add composeWithTracker to it * add HOC’s for injecting currentUser, isAdmin, or isOwner into components * remove unnecessary import * sort modules * remove plugin package.json for now * separate components/containers by creating wrapComponent HOC * add withCurrentAccount HOC and use in MainDropdown * lint * remove accidental commit of development experiment * goodbye react-komposer * fix import order * package updates * allow composeWithTracker to accept options or to disable the Loading component * jsdoc update * fix sortable MediaItem * clean up composer * turn SortableItem into a factory function so it can be used as a HOC * separate ProductGridItems from its container * revert babelrc * depurify the translations component * depurify Currency component * thank you, magic Meteor imports folder * separate out the Radium HOC from ReactionLayout and depurify it * fix email settings components * bump to 1.5.0 * fix npm sources
- Loading branch information
Showing
254 changed files
with
4,916 additions
and
5,476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
client/modules/accounts/components/helpers/loginFormMessages.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
export { SignIn, SignUp, LoginButtons } from "./auth"; | ||
export { Forgot, UpdatePasswordOverlay } from "./passwordReset"; | ||
export { LoginFormMessages } from "./helpers"; | ||
export { default as ForgotPassword } from "./forgotPassword"; | ||
export { default as Login } from "./login"; | ||
export { default as LoginButtons } from "./loginButtons"; | ||
export { default as LoginFormMessages } from "./loginFormMessages"; | ||
export { default as MainDropdown } from "./mainDropdown"; | ||
export { default as SignIn } from "./signIn"; | ||
export { default as SignUp } from "./signUp"; | ||
export { default as UpdatePasswordOverlay } from "./updatePasswordOverlay"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
|
||
const LoginFormMessages = (props) => { | ||
if (props.loginFormMessages) { | ||
if (props.formMessages.info) { | ||
return ( | ||
<div className="alert alert-info"> | ||
<p> | ||
{props.loginFormMessages()} | ||
</p> | ||
</div> | ||
); | ||
} else if (props.formMessages.alerts) { | ||
return ( | ||
<div className="alert alert-danger"> | ||
<p> | ||
{props.loginFormMessages()} | ||
</p> | ||
</div> | ||
); | ||
} | ||
} | ||
return null; | ||
}; | ||
|
||
LoginFormMessages.propTypes = { | ||
formMessages: PropTypes.object, | ||
loginFormMessages: PropTypes.func | ||
}; | ||
|
||
export default LoginFormMessages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.