Commit Graph

158 Commits

Author SHA1 Message Date
Rish
7cc028ba0d Added default plan for paid member
no issue

- Selects member's current plan by default on plan selection page
2020-05-22 15:41:58 +05:30
Rish
11e1b84298 Refactored account home page to dynamically load for free/paid
no issue

- Updates style based on context
- Combines account home page for free/paid members to load based on member status
2020-05-22 15:41:27 +05:30
Rish
f94f16a90d Combined account home pages in single file
no issue

- Cleanup: Combines home page for both free and paid member in single file for cleaner split
2020-05-22 12:38:06 +05:30
Rish
d8072971b5 Updated newsletter subscription label
no issue

- Updates newsletter subscription label based on current state on profile page
2020-05-22 12:36:38 +05:30
Rish
1049955007 Removed env variable for default page
no issue

- Removes env variable which could be previously set for local development in favor of `process.env.NODE_ENV` check for development version
2020-05-22 12:35:33 +05:30
Rish
08a4611ee3 Fixed page switch message UI margin
no issue

- Adds margin for page switch message between signup/signin at bottom
2020-05-22 12:34:21 +05:30
Rish
9432e4f166 Fixed Switch element tests
no issue

- Updated attaching onToggle to correct element on switch test
2020-05-21 12:02:41 +05:30
Rish
ca0bdab60b Hooked newsletter subscription toggle to API
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
2020-05-21 11:54:44 +05:30
Rish
a859da1aa4 Updated magic link api to send member name
refs https://github.com/TryGhost/members.js/issues/26

- Includes member name in the magic link creation API which can be later read from token and stored on signup.
2020-05-21 09:05:41 +05:30
Rish
680572f499 Added profile update action from profile page
refs https://github.com/TryGhost/members.js/issues/20

- Updates profile update action name in Profile Page
- Adds new action to update member info from profile page if member is logged in
2020-05-20 00:14:22 +05:30
Rish
197be15e63 Renamed plan -> planName for update subscription api call
refs https://github.com/TryGhost/members.js/issues/20

- API uses planName for update subscription api call
2020-05-20 00:14:22 +05:30
Rish
2b34ee5c28 Updated paid signup action of member to include name
refs https://github.com/TryGhost/members.js/issues/29

- Uses updated API endpoint for checkout to pass member name in stripe checkout session metadata
2020-05-20 00:14:21 +05:30
Rish
43106c037e Added api to update member's profile info
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
2020-05-20 00:14:21 +05:30
Rish
f257a35dce Updated checkout plan api to include member name in metadata
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
2020-05-20 00:14:21 +05:30
Rish
b865d002a9 Added update subscription API
refs https://github.com/TryGhost/members.js/issues/20

- Adds update subscription api for member
- API allows updating plan for a particular subscription for logged-in member
2020-05-20 00:14:21 +05:30
Renovate Bot
f59d8213f6 Update dependency eslint-plugin-ghost to v1.4.1 2020-05-11 10:15:34 +00:00
Rish
748f56ee47 Added update plan setup for paid members
refs https://github.com/TryGhost/members.js/issues/20

- Adds update plan action for paid members to allow switching plans
2020-05-08 23:00:32 +05:30
Rish
3f738b1088 Added edit billing flow to paid account home
refs https://github.com/TryGhost/members.js/issues/20

- Opens stripe checkout update session from paid account area for a member
- Allows paid member to update their stripe billing info
2020-05-08 18:33:36 +05:30
Rish
e185c1ee47 Added edit stripe billing api method
refs https://github.com/TryGhost/members.js/issues/20

- Adds new editBilling method for stripe update billing info checkout flow
2020-05-08 18:32:22 +05:30
Rish
5a1fa6fdf4 Added edit profile page UI for paid member
refs https://github.com/TryGhost/members.js/issues/20

- Connects account profile page to edit button for paid member's account home area
2020-05-07 21:11:17 +05:30
Rish
694ec683fe Added free account home to use account profile
refs https://github.com/TryGhost/members.js/issues/20

- Clicking settings on free member's account home now takes them to profile page
2020-05-07 21:04:31 +05:30
Rish
fe1cb02203 Removed default margin style for Button component
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
2020-05-07 21:03:08 +05:30
Rish
12ac303fb2 Added profile page UI
refs https://github.com/TryGhost/members.js/issues/20

- Adds v1 for account profile page for both free and paid members
2020-05-07 18:06:29 +05:30
Renovate Bot
4078483bb7 Update dependency eslint-plugin-ghost to v1.4.0 2020-05-06 18:15:04 +00:00
Rish
8c42813666 v0.3.3 2020-05-01 23:20:53 +05:30
Rish
e8b25fc6e4 Fixed plan value in paid account home
no issue

- The plan value we get from API for a member is in cents and needs to be converted to dollars before showing.
2020-05-01 23:20:12 +05:30
Rish
21661e8eb8 v0.3.2 2020-05-01 22:24:44 +05:30
Rish
614c3f02fc Added fixture for paid member
no issue

- Adds fixture for paid member for local development
2020-05-01 22:23:37 +05:30
Rish
7abeb0a247 Updated local env file example to use default page
no issue

- Updates local env file to specify a default page for local UI development
2020-05-01 22:21:44 +05:30
Rish
eac5035451 Updated default page handling for paid member
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
2020-05-01 22:21:16 +05:30
Rish
094d32a88d Added new paid account home area
refs https://github.com/TryGhost/members.js/issues/20

- Adds new page for home account area of paid member
- Updates popup modal to add paid account home page in list
2020-05-01 22:20:18 +05:30
Rish
26e1fd9dd3 Updated custom trigger button popup state classes
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
2020-05-01 21:26:19 +05:30
Rish
2789ea3a10 v0.3.1 2020-05-01 20:58:55 +05:30
Rish
a61ce9c690 Fixed lint 2020-05-01 20:58:29 +05:30
Rish
216d8b1a14 Added subscribe navigation to account home
refs https://github.com/TryGhost/members.js/issues/20

- Adds navigation and last page setup for account home -> account plan chooser
2020-05-01 20:56:46 +05:30
Rish
767fbc1112 Cleaned up checkoutPlan action
no issue

- Removed checkoutUrls as we use default value for now
2020-05-01 20:55:20 +05:30
Rish
7dd4282520 Added back action to action list
no issue

- Adds back action to action list to allow pages to navigate back to last page
2020-05-01 20:54:48 +05:30
Rish
ec407eae5f Added new account plan page to popup modal flow
no issue

- Adds modal style and page value for new account plan page to modal
2020-05-01 20:53:48 +05:30
Rish
c6cf81664c Added new accountPlan page
no issue

- Adds new page for choosing a plan for logged in member
2020-05-01 20:52:56 +05:30
Rish
859b5502eb Refactored swtichPage action call syntax
no issue

Updates switchPage syntax to pass object so we can pass `lastPage` value as well for back button
2020-05-01 20:52:18 +05:30
Rish
4931ea68bd Updated plans section component plans prop
no issue

- Updates plans section component to take simpler plans array as prop for rendering plans
2020-05-01 20:49:35 +05:30
Rish
9cc5badd2f Added new switch component for toggle UI
no issue

- Mimics behavior and UI of toggle button in Ghost Admin
2020-05-01 20:12:13 +05:30
Rish
ee1dfbc0af v0.3.0 2020-05-01 17:18:54 +05:30
Rish
dae6d75f17 Fixed lint 2020-05-01 17:17:09 +05:30
Rish
98354e9de0 Updated script usage in readme to remove explicit init and adminUrl
refs https://github.com/TryGhost/members.js/issues/25

- No dependency on adminUrl anymore as endpoints exist on site url
- Members.js script is auto initialized, no need for explicit init in themes anymore
- No local .env values need to be set for development as script loads data from fixtures directly
2020-05-01 17:10:17 +05:30
Rish
2aef0d57f8 Refactored app initialization to remove admin url dependency
closes https://github.com/TryGhost/members.js/issues/25

- Remove dependency on admin url for initialization as member endpoints now exist on site directly
- Auto initializes the script on load as need not wait on any external dependency
- API fetch cleanup in parent container
- Updates tests
2020-05-01 17:06:58 +05:30
Rish
e291e7075b Updated api endpoints to use new member endpoints on site
refs https://github.com/TryGhost/members.js/issues/25

- Members endpoints were refactored in core to exist directly on site as `<SITE>/members/api/<RESOURCE>`
- All endpoints needed are now directly on SITE and removes the need for AdminURL
- Init method is updated to read site data from fixtures for local development, as no admin endpoint exists now

Core Refs:
0cba02b370
fa4dfa1b21
c70c49258e
2020-05-01 17:00:52 +05:30
Rish
a373239fcb Added small style hack to insert css inside iframe components
no issue

-  By default, CRA's webpack bundle combines and appends the main css at root level, so they are not applied inside any iframe.
- JSX Styles don't work for `:hover` and other similar selectors which is needed to style certain components like checkboxes
- This uses a hack where we append `<style> </style>` tag with all CSS inside the head of iframe dynamically as string
- We can create separate variables to keep styles grouped logically, and export them as one appended style string to apply styles in iframe.
2020-05-01 16:03:07 +05:30
Rish
d4f604d091 v0.2.4 2020-05-01 13:05:23 +05:30
Rish
29c4b6be0f Updated yarn ship script
no issue

- Updates `yarn script` to use same consistent format we use across org
- Removes use of `npm` in publish
- Adds `preship` to run lint - ideally should run tests but react tests run in interactive mode and are very slow atm, need to sort that out first.
2020-05-01 13:02:27 +05:30