no issue
- Previously, the settings used for customization were `show_beacon`, `show_signup_name` and `allowed_plans`
- These settings were renamed to `portal_button`, `portal_name` and `portal_plans` respectively
- Updates usage of settings to new names
no issue
- Uses `show_beacon` setting to show/hide the default beacon
- Uses `show_signup_name` setting to show/hide the signup name
- Uses `allowed_plans` to show/hide the plans
no issue
- So far, we had to specify fixed height to iframe based on content of page, but this was not dynamic
- Calculates height of popup dynamically with refs and assigns to iframe to allow dynamic updates as content changes
- Allows configuration and different case handling for popup without worrying about proper height
closes https://github.com/TryGhost/members.js/issues/39
- Script needs correct ghost site url to initialize correct API endpoints for fetching site/members data
- `window.location.origin` won't work as correct ghost site url in all cases, specially for sites using subdirectory setup
- New meta tag `ghost:site` is inserted on themes with correct `siteUrl`, which is used to initialize api
no issue
- Moved `ParentContainer.js` to redundant empty top level `App.js` to remove extra nesting and improved naming
- Renamed `ParentContext` to `AppContext` and exported as default
- Fixed imports in all the components and test-utils with new structure
- Passed `siteUrl` to api setup from main App to allow easier configuration
- Updated App tests
closes https://github.com/TryGhost/members.js/issues/45
- Allows multiple trigger buttons on the page with data attribute `data-members-trigger-button`
- Allows passing page value to custom trigger button to show the popup on specified page, like signup
- Removes event handlers on unmount
closes https://github.com/TryGhost/members.js/issues/43
- Handle plans/payment flow based on new `isStripeConfigured` flag in members site data - Added in 82cf095600
- Hides plan update/subscribe/paid-signup flows if stripe is not setup
closes https://github.com/TryGhost/members.js/issues/38
- Added error state to signup action button in case of action failure like checkout session rejection
- Checkout session rejection was previously incorrectly timing out and returning 200
closes https://github.com/TryGhost/members.js/issues/34
- Updates save state handling for button to show intermediary Saved state before resetting
- Updates labels based on action running state
no issue
- This was disabled before last release to not overlap with existing member's script in latest version
- Enabled again to handle data attributes in a theme same as existing script
no issue
- Disables data attribute handling(existing members.js functionality) as it can attach handlers twice if loaded together with existing members.js
- Can be easily enabled once the new script is loaded from core
no issue
- Extract root div id so its easy to change it in one place in future
- Add stripe load method
- Extract all initial non-ui handling to setup method
no issue
- Load Stripe script if not already loaded on page
- Many members.js features rely on Stripe script to be loaded on the page to allow checkout/billing updates etc.
refs https://github.com/TryGhost/members.js/issues/32
- Inits data attribute handling from the copied over members.js file from core
- Uses `window.location.origin` as site url for api calls in data attribute handling
refs https://github.com/TryGhost/members.js/issues/32
- Copies over existing members.js script from core
- Handles members functionality in a theme using data-attributes assinged
- Only modification is tto use `siteUrl` value passed to the function for API calls
no issue
- Renames update plan action to update subscription as it can be also used to cancel current subscription
- Pass cancelAtPeriodEnd option to update subscription API call
no issue
- Updates profile page for free/paid member to render newsletter based on context
- Disable editing email field till we have the full flow for it
refs https://github.com/TryGhost/members.js/issues/20
- Allows paid/free member to update their newsletter subscription status
- Newsletter subscription status is immediately updated on toggle
refs https://github.com/TryGhost/members.js/issues/20
- Uses new member update endpoint to update logged-in member's profile info
- Member can update their name, email and newsletter subscription status
refs https://github.com/TryGhost/members.js/issues/29
- Create stripe checkout session in Ghost now supports passing metadata for custom info like name
- This allows storing member name post-signup after payment through stripe checkout is completed
no issue
- Adding default margin for action button can cause unwanted behavior where margin needs to be avoided.
- Allow higher level components to directly add margin if needed
refs https://github.com/TryGhost/members.js/issues/20
- Adds default page handling for paid member to open paid account area
- Refactors dev mode default page to be picked from env file if available
no issue
- Fixes custom trigger button not getting close class through any other way other than trigger
- Updates class name for open and close state by adding `gh-members-` namespace