refs https://github.com/TryGhost/members.js/issues/5
Switched to using absolute path for default test-utils setup file as relative imports become too messy when we keep tests for a component next to it. This setup allows using absolute path for common test-utils file which is used in almost all tests for initial setup.
refs https://github.com/TryGhost/members.js/issues/5
- We want to allow .env in source control mainly to use react-testing-library's recommended setup for common test-utils. It uses .env file to define NODE_PATH, which helps in avoiding relative imports in tests as we keep test files next to UI components.
- CRA also by default suggests committing .env files to source control
refs https://github.com/TryGhost/members.js/issues/5
- Streamlined data init flow
- Streamlined development mode initialization
- Moved fixtures to utils
- Removed unused or redundant methods
ref https://github.com/TryGhost/members.js/issues/5
React context allows us cleaner setup in codebase with shared data and methods across components at different nesting levels. This should allow faster iteration and easier development going forward.
- Uses Parent context for shared data and methods across different components instead of passed down props
- Uses new `init` method in API for data initialization
- Removes `PopupMenu` component in favor of `PopupModal`
- Adds new test util for custom render for easier base setup - https://testing-library.com/docs/react-testing-library/setup#custom-render
- Updates tests to use new test util for easier test setup
refs https://github.com/TryGhost/members.js/issues/5
- Adds new parent context with default values for all common context data we want to pass through
This adds base for using contexts (https://reactjs.org/docs/context.html) in our application as that allows easier overall base data and method sharing between different components instead of passing them down
refs https://github.com/TryGhost/members.js/issues/5
- renamed default function name
- Adds `init` method to api for fetching site data and member session data together
- Update site url from site data to remove window.location.origin dependency in case of iframe
no issue
- Updates Signin page to use common ActionButton and Input component
- Updates Signup page to use common ActionButton and Input component
- Updates MagicLink page to use common ActionButton component
closes https://github.com/TryGhost/members.js/issues/16
This fix sends magic link to member when they choose free plan to signup using name and email.
Note: We are not storing `name` atm in magic link, so it gets ignored in actual member data on signup atm.
closes https://github.com/TryGhost/members.js/issues/14
This adds handling of url update when signing-in with magic link by removing the token query param, which can cause accidental re-login on refresh.
Unpkg recommends tagging exact version in the url to avoid redirects and faster load times. Also ensures the init script is in sync with the unpkg version being picked up in case of any changes.
refs https://github.com/TryGhost/members.js/issues/10
- Added `/page` in components to structure all UI page flows for the app
- Renamed components to highlight just actual purpose/utility
- Cleaned up data loading flow
no issue
Firefox doesn't allow adding content to iframe body without passing `srcDoc={`<!DOCTYPE html>` to the iframe, this allows iframe to load properly
no issue
Previously, we expected theme to include an empty div with id as `root` where we loaded our widget. This change automatically adds a root div to the document and renders widget inside it.
refs https://github.com/TryGhost/members.js/issues/12
- Updates package name and add umd/unpkg setup in `package.json`
- Updated webpack config to publish minified bundle at `umd/memebrs.min.js`
- Updated .gitignore to remove build folders