Commit Graph

762 Commits

Author SHA1 Message Date
Rish
d26fad1ef2 Updated portal direct checkout links to use path
refs https://github.com/TryGhost/Ghost/issues/12365

Last commit added Portal checkout links using query param on signup link - `signup?plan=monthly/yearly`, this updates the checkout links to use path instead of params on links and data attributes instead.

Portal link for monthly plan checkout - `#/portal/signup/monthly`
Portal data attribute for monthly plan checkout - `data-portal=signup/monthly`

Portal link for yearly plan checkout - `#/portal/signup/yearly`
Portal data attribute for monthly plan checkout - `data-portal=signup/yearly`
2020-11-17 21:15:20 +05:30
Rish
bbea4f7ec5 Added direct links for monthly/yearly checkout
refs https://github.com/TryGhost/Ghost/issues/12365

Currently, while its possible to open Stripe checkout directly on a monthly/yearly plan, Portal links don't allow similar feature. This change allows opening a site on a specific Portal link that can directly open Stripe checkout for monthly/yearly plan, if the plan is allowed.

- Adds handling for new portal signup link for monthly plan - `/#/portal/signup?plan=monthly`
- Adds handling for new portal signup link for yearly plan - `/#/portal/signup?plan=yearly`
2020-11-17 19:06:41 +05:30
Peter Zimon
a665ca5923 Added user select style to plan container
no refs.
- added user-select: none to plan containers to make it feel more like UI and less web content
2020-11-17 09:56:21 +01:00
Peter Zimon
32d4949e1d Refined copy
no refs.
2020-11-10 16:39:37 +01:00
Peter Zimon
6587eca37d Account home page refinements
no refs.
- copy refinements
- added renewal date to paid members' account home
2020-11-10 16:15:27 +01:00
Peter Zimon
23c75e3acc Notification refinements
no refs.
- refined notification styles for single and double lines
- refined copy
2020-11-10 16:00:50 +01:00
Peter Zimon
7220049830 Added name to welcome notification
no refs.
2020-11-10 15:49:52 +01:00
Peter Zimon
d1c091584f Refined notification
no refs.
- added top/bottom padding to notifications
- refined line height
- added line break to welcome notification
2020-11-10 15:44:08 +01:00
Rish
1716771c6a v0.10.17 2020-11-07 01:22:31 +05:30
Rish
f4f037452d Fixed popup close on clicking outside content
no refs

- Popup was not closing when clicked outside in the empty area as listener was firing on wrong element
2020-11-07 01:21:47 +05:30
Rish
2ed016f7d8 v0.10.16 2020-11-06 19:36:08 +05:30
Rish
b3d063b836 Updated request src for signup with stripe checkout
no refs

- Custom requestSrc was not passed when a plan was checkout during signup, which didn't trigger the custom portal action param
2020-11-06 19:35:25 +05:30
Rish
fb698ad972 v0.10.15 2020-10-30 23:27:29 +05:30
Rish
b5277ad1c5 🐛 Fixed billling info update failing
no refs

- Invalid success/cancel URL for billing API due to empty parameter caused failure in opening Stripe
2020-10-30 23:26:49 +05:30
Rish
6163083df8 v0.10.14 2020-10-29 14:02:31 +05:30
Rish
2454e76c04 Fixed incorrect usage of tabindex
no issue

React JSX expects tabindex html property to be camel case - tabIndex
2020-10-29 14:01:24 +05:30
Rish
b590a1fa90 Added upgrade checkout metadata for stripe
no issue

Ghost sends email on successful signup to a paid plan via Stripe checkout, but couldn't differentiate between a Stripe checkout as new member or as an upgrade previously. This led to an extra second email with magic link on upgrading to paid plan while logged in.

Passing `checkoutType` metadata to Stripe checkout allows webhook to ignore second email in case of an upgrade scenario.
2020-10-29 13:59:19 +05:30
Rish
168fb204eb Redirected to home page on signout
no issue

Handles Portal or theme to redirect to home page for a site when signing out
2020-10-29 13:57:25 +05:30
Rish
41f171838a Handled notifications for new custom action param
refs https://github.com/TryGhost/Ghost/issues/12253

- Handles custom action param for requests from Portal by listening on `portal-action` instead of `action` and `portal-stripe` instead of `stripe` in query params for magic link and stripe checkout changes
- Allows theme to continue using the old params so in future Portal doesn't interfere with theme notifications
2020-10-29 13:56:33 +05:30
Peter Zimon
e97e7964ba Added "Publish with Ghost" badge (#106)
added "Publish with Ghost" badge to the bottom left corner of the screen when the portal popup is open
2020-10-19 18:45:14 +02:00
Rish
0b32646944 v0.10.13 2020-10-17 18:31:02 +05:30
Rish
4e39684c43 Updated change email notification message
no refs

- Notification message was missing for change email success/failure
2020-10-17 18:30:11 +05:30
Peter Zimon
59e729e7bd Refined invite-only signup page
no refs.
- added default invitation icon for sites without icon
- refined copy and position of invite only notification
2020-10-16 16:42:46 +02:00
Rish
46366d5066 Fixed popup close in preview mode with Esc
no refs

- Popup shouldn't close with Esc in preview mode on Ghost Admin
2020-10-16 15:07:04 +05:30
Rish
ae2023999a Replaced signup with invite-only screen for no plans
no issue
- If the site owner has no active plan enabled for signup in settings, it implies an invite-only site usecase which needs to be highlighted to he user
- Shows the invite only message along with option to login when SIgnup screen is opened in such scenario
2020-10-16 14:46:19 +05:30
Peter Zimon
510dfd75d9 Removed notifications when cancelling Stripe flows
no refs.
- removed notifications when clicking on the back button Stripe checkout either in update plan or in sign up flows
2020-10-14 16:18:09 +02:00
Peter Zimon
5ec1bdb05e Refined billing update loader icon 2020-10-14 15:13:30 +02:00
Peter Zimon
4d172a6645 Fixed one line notification style 2020-10-14 15:08:11 +02:00
Peter Zimon
6cbe8cca36 Added tabindex to signup and signin input fields 2020-10-14 15:05:40 +02:00
Peter Zimon
5c425fec9c Refined input field animation styles 2020-10-14 14:55:02 +02:00
Peter Zimon
548403dc03 Maximised length of portal button text
no refs.
2020-10-14 14:43:48 +02:00
Peter Zimon
5b7b77a855 Refined account plan page footer padding 2020-10-14 11:32:08 +02:00
Rish
aa6bb75e13 Updated readme usage section
no issue

Updates usage section to correctly highlight directly adding script or enabling via Ghost config setups
2020-10-14 14:24:24 +05:30
Rish
e837446063 v0.10.12 2020-10-13 22:46:57 +05:30
Rish
d0c15e30fc Fixed site fixtures for tests
no issue

- Default site fixtures for tests often break them as tests expect all 3 plans to be present at the moment, change here updates the tests to use custom site fixture with all 3 plans to avoid breaking with any changes for dev testing
2020-10-13 22:17:30 +05:30
Peter Zimon
91414f764d Added halo around signed in trigger button
no refs.
- added an outline on the Portal trigger button for logged in state so that it pops out better on any background with Gravatars
2020-10-13 17:19:06 +02:00
Peter Zimon
e0103647e6 Adjusted drop shadow of Portal trigger button
no refs.
- update Portal trigger button's drop shadow so that it stands out a bit more from the background
2020-10-13 17:19:06 +02:00
Rish
e1c99346c7 Added logic for local switch update for visual flow
no issue

- Currently, the newsletter switch works on the value update from the API which can have slight delay causing sluggish feeling on using the switch
- Adds logic to locally update the switch state before resetting to whatever value comes from the update so the behavior feels instant
2020-10-13 18:22:26 +05:30
Rish
ac162cf1ea Added redirect to account home for complimentary member
no issue

- Complimentary members should be redirected to account home when attempted to open the account plan page via portal link
2020-10-13 18:22:26 +05:30
Rish
da7aee7003 Added loader icon for edit billing update
no issue

- Adds loading indicator for Billing update button while it waits to create and load stripe session
2020-10-13 18:22:26 +05:30
Peter Zimon
b037d98fb8 Removed auto-invert color from primary buttons
no refs.
2020-10-13 14:43:22 +02:00
Peter Zimon
b8a57d6ddf Updated animation timings
no refs.
- removed double trigger of in-popup notifications
- adjusted timing and easing for both in-popup and global notifications
2020-10-13 14:22:05 +02:00
Peter Zimon
e5175555b9 Updated dynamic signup and signin popup width
no refs.
- set popupwidth based on available plans inlcuding if self signup and/or stripe is enabled
2020-10-13 13:00:11 +02:00
Rish
e591770e5e Removed validation check on input blur
no issue

- Removes validation check for fields on focus away to make the form behavior more friendly
2020-10-13 11:29:48 +05:30
Rish
ad488d73ed Cleaned up portal link on popup close
no issue

- On closing portal popup, the hash link was not getting reset which then prevented the popup to be opened again
- Clears portal hash link on popup close
2020-10-13 11:26:01 +05:30
Rish
031bca982a v0.10.11 2020-10-02 22:03:43 +05:30
Rish
048cdbd315 Updated discount calculation round-off
no issue

- Updated yearly plan discount calculation based on rounding down to nearest integer
2020-10-02 20:35:00 +05:30
Peter Zimon
e9df5b5584 Updated billing info notification copy 2020-10-02 17:01:02 +02:00
Peter Zimon
71a8e7355b Updated triggerbutton height 2020-10-02 16:59:01 +02:00
Rish
167cbba36d v0.10.10 2020-10-02 20:02:17 +05:30
Rish
d9cb6597c5 Added back button to account plan and profiles for direct links
no issue

- We had previously removed the Back button for account profile/plan pages when opened directly via Portal link
- This updates the behavior to show the back button which takes back to Account Home as the previous behavior seemed incomplete to users
2020-10-02 19:58:51 +05:30
Rish
74a7232d0c Fixed hash change for links
no issue

- Hash handler was not updating Portal state if it pointed to a Portal link, which caused the need for a full refresh to reflect new link triggers
- Updates hash handler to use handle both preview and link states
2020-10-02 19:57:43 +05:30
Rish
bcf2b5872b v0.10.9 2020-10-02 19:37:55 +05:30
Rish
21fc8ab2b4 Updated billing info popup message
no issue

- Updates stripe billing info update/cancel message in popup notification
2020-10-02 19:35:58 +05:30
Peter Zimon
4b3973c105 Updated mobile size inputs and buttons 2020-10-02 15:50:33 +02:00
Peter Zimon
35366964b7 Updated cancel confirmation copy 2020-10-02 15:40:21 +02:00
Peter Zimon
89c7698f79 Added name and email input attributes 2020-10-02 15:35:11 +02:00
Peter Zimon
7721027783 Updated copy for newsletter setting 2020-10-02 15:27:37 +02:00
Peter Zimon
6c1041cedb Fix back button spacing 2020-10-02 15:20:08 +02:00
Peter Zimon
fe79d42239 Updated link color in popup notifications 2020-10-02 15:15:08 +02:00
Peter Zimon
bc17f41860 Updated name error copy 2020-10-02 14:56:14 +02:00
Peter Zimon
231bafb826 Updated email error copy 2020-10-02 14:51:26 +02:00
Rish
57e83ebe6c v0.10.8 2020-10-02 18:17:32 +05:30
Rish
22a1a5a5fd Fixed loader on account profile update
no issue

- Loader was missing because of `isRunning` state not added for profile update action
2020-10-02 18:00:29 +05:30
Rish
c58fd0c8de Fixed back button for plan confirmation page
no issue

- Back button was removed for confirmation page when opened via Portal link, as we checked for `lastPage` available only
2020-10-02 18:00:01 +05:30
Rish
c4b0aa9b12 v0.10.7 2020-10-02 16:41:20 +05:30
Rish
659340ec3e Fixed back button visible on link pages
no issue

- When account plan/profile pages are opened via Portal Link, the back button is non-functional as we don't have a last page to go to, fix hides the back button in such cases
2020-10-02 16:38:11 +05:30
Rish
f9ab9835e8 v0.10.6 2020-10-02 15:58:50 +05:30
Rish
465793a518 Fixed account plan page for logged out state
no issue

- Account plan page did not handle redirect to signup when no member is logged in
2020-10-02 15:57:58 +05:30
Rish
96c72aa3c9 v0.10.5 2020-10-02 15:45:44 +05:30
Rish
f91aeec3c8 Fixed members form missing data-members-name
refs #12249
refs ce14d8113a

This was incorrectly assuming the presence of the data-members-name
element in the document. By guarding against it and defaulting to
undefined, we fallback to the existing behaviour when the element is not
present.
2020-10-01 22:46:45 +05:30
Rish
39a40034ac Fixed tests
no issue

- Added yearly back to fixtures as tests rely on them
- Long term fix is to directly override fixtures with expected value for tests to not rely on value in file
2020-10-01 17:56:15 +05:30
Rish
884c56f793 Added enter to submit on forms
no issue

- Adds enter to submit on Signin/Signup/AccountProfile pages when focused on an input field
2020-10-01 17:54:39 +05:30
Peter Zimon
15d4a83b1e Updated portal title when there's no logo 2020-10-01 14:00:26 +02:00
Peter Zimon
cf4736d2df Portal notifications style (#103)
- Updated notification style for a less opinionated design so that it works better with any accent color
- Changed full width notificaiton style to smaller to avoid covering navigation
2020-10-01 13:59:32 +02:00
Rish
b414e3b7e4 Fixed empty accent color not set in preview mode
no issue

Current logic ignored empty accent color value coming from the preview url which did not unset the accent color when removed from preview. The fix allows for empty accent color in preview so that it can be reset to default.
2020-10-01 12:18:05 +05:30
Rish
9263a84c09 Updated data attributes script to read member name in form
no issue

- We recently updated Ghost to allow theme developers to pass member's name via `data-members-name` attribute
- The script covers the usecase for any themes using the attribute to fill member's name during the signup process
2020-10-01 12:18:05 +05:30
Peter Zimon
686ad537c7 Updated primary button height 2020-09-30 14:36:14 +02:00
Peter Zimon
3e26b63ec9 Updated focused input border color 2020-09-29 17:09:25 +02:00
Rish
dfd034b624 Updated popup notification behavior for profile update
refs https://github.com/TryGhost/Team/issues/393

- Updates behavior of popup notification for account update
- Updates popup notification clear without animation for manual close and retry click
- Adds redirect to home page correctly for popup notification on success
2020-09-29 12:44:01 +05:30
Peter Zimon
266217e109 Added 'Retry' button to account change 2020-09-28 16:06:21 +02:00
Peter Zimon
8222df0e31 Updated in-popup notification copy and behaviors
no refs.
2020-09-28 16:02:59 +02:00
Peter Zimon
3221fae172 Refined primary button height 2020-09-28 15:38:45 +02:00
Peter Zimon
db9a34cef7 Updated background color of retry button 2020-09-28 15:38:11 +02:00
Rish
a247d54dd9 v0.10.4 2020-09-28 12:21:19 +05:30
Rish
09044a5469 Added stripe checkout cancel notification
no issue

- Adds notification for stripe checkout flow notification for free and new members
2020-09-28 12:20:41 +05:30
Rish
16c4f46f9f v0.10.3 2020-09-28 11:49:40 +05:30
Rish
041de9f045 Cleaned up notification flows
no issue

- Adds success and error notification messages for different actions
- Cleans up notification flows and messages
- Adds new helpers for members and site
- Updates actions for email/name update
2020-09-28 11:48:48 +05:30
Peter Zimon
160e5e6e7d Updated mobile styles for plan selection 2020-09-24 12:45:47 +02:00
Rish
a061771138 Added close handling for popup notification with icon
no issue

- Adds close handling for popup notification with close icon
2020-09-24 16:09:16 +05:30
Peter Zimon
9936dd19ae Refined heading position and spacing 2020-09-24 12:33:45 +02:00
Peter Zimon
1b3706fa1e Updated disabled cookie warning
no refs.
- added different disabled cookie warning messages depending on the context
- disabled input fields, checkboxes and buttons globally if cookies are disabled
- refined copy and visuals
2020-09-24 12:26:25 +02:00
Rish
4f00604ed4 Added helpers to generate portal link for pages
no issue

- Adds new helpers to create portal links on existing site url paths
- Updates retry links for signin and signup to use new helpers
- Helps preventing any unwanted bugs with Portal links by providing consistent link creation
2020-09-24 15:45:39 +05:30
Rish
71fcfb4918 Added cookies disabled check
no issue

- Added dummy banner if cookies are disabled
- Adds new helper to check if cookies are disabled
2020-09-24 13:37:49 +05:30
Peter Zimon
2105872859 Updated order of Portal button icons 2020-09-24 09:52:51 +02:00
Peter Zimon
d7dbe06760 Refined copy of popup notifications 2020-09-24 09:39:17 +02:00
Rish
7a4c14eb1a v0.10.2 2020-09-24 12:36:53 +05:30
Rish
f45b2f24e2 Updated git repo on readme
no issue
2020-09-24 12:36:24 +05:30
Rish
01ca6d0ffe v0.10.1 2020-09-24 12:20:46 +05:30
Rish
04cab22a5c Updated readme
no issue

- Updated badge and portal naming
2020-09-24 12:18:26 +05:30
Rish
d50c105000 Updated package name in readme 2020-09-24 12:02:17 +05:30
Rish
7e19264d34 v0.10.0 2020-09-24 11:58:56 +05:30
Rish
8db1b02558 Updated npm/unpkg name to portal
no issue

- Updates npm/unpkg name to portal from members-js
- Updates script name from `members.min.js` -> `portal.min.js`
2020-09-23 23:43:46 +05:30
Rish
8746acd87a Fixed Lint 2020-09-23 23:29:16 +05:30
Rish
965959c964 Cleared timeouts in App on unmount
no issue

- Clears any timeout on unmount in main App and components to avoid unexpected unmount behaviors
2020-09-23 20:49:16 +05:30
Rish
5cb1f02109 Updated notification handling
refs https://github.com/TryGhost/Team/issues/393

- Updated popup notification handling flow for action success and errors
- Updated global notification handling with show popup
- Updated action handler to create popup notifications
- Removed inline newsletter update message
- Generic cleanup of unused code
2020-09-23 20:36:33 +05:30
Peter Zimon
8ea26be5bb Updated notification copy
no refs.
2020-09-23 12:48:33 +02:00
Peter Zimon
8580f2fec1 Hide popup notifications 2020-09-23 11:15:51 +02:00
Rish
8af2340d42 Updated global notification handling flow
refs https://github.com/TryGhost/members.js/issues/92

- Adds new notification parser util
- Handles slideout animation for notification
- Clear search params on notification hide/close
2020-09-23 14:07:11 +05:30
Rish
81823f531b Updated github repo name to Portal
no issue

- Updated readme and package json to point to new repo name
2020-09-23 12:53:10 +05:30
Peter Zimon
f8f5377447 Added notification slide out animation 2020-09-22 17:07:57 +02:00
Peter Zimon
e537d1dd03 Added in-popup notification component
no refs.
2020-09-22 17:00:22 +02:00
Peter Zimon
306e13cf44 Repositioned popup close button
no refs.
- added CloseButton component to be able to use it in multiple pages
- moved close button inside content container so that it scrolls with the page on smaller screen sizes
2020-09-22 16:21:15 +02:00
Renovate Bot
ed25241ede Update dependency @testing-library/user-event to v12.1.5 2020-09-21 02:06:12 +00:00
Renovate Bot
55d50fe055 Update dependency @testing-library/react to v11.0.4 2020-09-21 01:05:04 +00:00
Peter Zimon
1a52840789 Applied success and error states to notifications 2020-09-18 17:12:36 +02:00
Rish
0a40206116 Added v1 notification trigger setup
no issue

- Adds notification flow setup based on query params
- v1 adds notification for successful/failed signin
2020-09-18 18:03:11 +05:30
Peter Zimon
d4b4d869b8 Portal notifications basic structure (#99)
* Added basic files for notifications

* Added basic notification styles
2020-09-18 13:12:34 +02:00
Peter Zimon
0a030b59cd Hide scrollbars in popup 2020-09-18 10:41:16 +02:00
Peter Zimon
b845272d09 Refined change plan flow
no refs.
- removed checkbox from change plan screen to make it less confusing if's a selection/checkbox or a button
2020-09-18 10:27:04 +02:00
Peter Zimon
20007db0c7 Replaced site logo span with img 2020-09-18 09:34:45 +02:00
Rish
e3e79d5c5d v0.9.1 2020-09-17 21:17:43 +05:30
Peter Zimon
4180727d29 Cleanup unnecessary containers
no refs.
- removed unnecessary `<div>`s
2020-09-17 16:19:53 +02:00
Rish
fb13d12015 Fixed stripe checkout not working on plan upgarde
no issue

- Incorrectly passed plan name was causing bad stripe request
2020-09-17 19:25:05 +05:30
Peter Zimon
5caa8433d9 Fixed and cleaned input field style 2020-09-17 15:54:44 +02:00
Peter Zimon
e9a27cdafc Fixed background color of inputs 2020-09-17 15:47:15 +02:00
Peter Zimon
ba7c66cb29 Fixed regression of single plan checkbox 2020-09-16 21:30:20 +02:00
Rish
454c01f2ae v0.9.0 2020-09-16 23:44:18 +05:30
Rish
ef235ad148 Updated plan update start date
no issue

- Updates the new plan's start date based on billing interval change
- If current and new billing interval is same, plan starts at period end, immediately otherwise
2020-09-16 23:43:19 +05:30
Rish
1baa21ddab Removed preceding 0 in date string
no issue

- Removes preceding 0 in `date` section of a date string
For ex. - 05 June -> 5 June
2020-09-16 23:35:13 +05:30
Rish
fa7258b247 Refactored plan upgrade flow for free members
no issue

- Refactors the plan upgrade flow for a free member
- Removes confirmation for free member and brings back checkboxes
- Takes straight to stripe checkout on plan confirmation
2020-09-16 23:03:59 +05:30
Rish
8729740c96 Some refinements 2020-09-16 23:03:59 +05:30
Peter Zimon
26c921d3cd Updated mobile styles for footers
no refs.
- fixed footer for signup and signin page considering various Portal settings
2020-09-16 18:12:59 +02:00
Peter Zimon
ee1d1c80f3 Updated responsive sizes for account home 2020-09-16 17:20:06 +02:00
Peter Zimon
8bbbfd9e49 Updated copy on free account home 2020-09-16 16:04:00 +02:00
Peter Zimon
7985c658fe Refined plan change confirmation
no refs.
- refined copy and design for plan change and confirmation
2020-09-16 16:00:48 +02:00
Rish
a32683fbb0 Updated change Plan UX
no issue

- Updates various flows to update/change plan for a member
- Adds a confirmation step for different change plan actions
- Adds new helpers for plans and members
- Updates Account plan page to use more streamlined components
- Fixed lint
2020-09-16 13:05:24 +05:30
Peter Zimon
fcd266e16a Fixed animation bug for mobile 2020-09-16 07:28:42 +02:00
Peter Zimon
9744b449bb Fixed input border for mobile 2020-09-16 07:21:06 +02:00
Peter Zimon
c4a628ebac Updated cancel confirmation copy 2020-09-15 17:37:38 +02:00
Peter Zimon
2dd9190bf2 Style updates for change plan
no refs.
2020-09-15 17:16:45 +02:00
Peter Zimon
59787099e2 Updated icon 2 2020-09-15 14:49:47 +02:00
Peter Zimon
6c1c2ee0f6 Updated portal icons
no refs.
2020-09-15 14:49:47 +02:00
Rish
51382bbee9 Updated account plan page to include confirmation screen
no issue

Adds confirmation screen on plan change/cancel on the plans screen
2020-09-15 18:17:14 +05:30
Peter Zimon
856f56f04e Added signup spacing logic
no refs.
- added logic to handle spacing on signup screen based on Portal settings
2020-09-15 13:32:44 +02:00
Peter Zimon
533b3fcbbb Added dynamic popup width
no refs.
- set popup width for signup and signin pages based on the number of plans
2020-09-15 12:22:13 +02:00
Peter Zimon
9a233e8210 Mobile size fixes
no refs.
- fixed account home margin
- fixed change plan bottom margin
2020-09-15 11:47:48 +02:00
Peter Zimon
6bf8451231 Removed debugger 2020-09-15 11:40:44 +02:00
Peter Zimon
6d45b0a295 Removed padding on account home + debugger cleanup
no refs.
2020-09-15 11:39:29 +02:00
Rish
3365e513d7 Refactored Account plan page into smaller components
no issue
2020-09-15 15:05:02 +05:30
Peter Zimon
8f9cef5a68 Fixed merge error 2020-09-15 15:05:02 +05:30
Peter Zimon
fab3e3ff3b Added back button and rearranged logout 2020-09-15 15:05:02 +05:30
Peter Zimon
24a29773e2 Removed cancel/confirm button from change plan 2020-09-15 15:05:02 +05:30
Peter Zimon
878bc146c2 Updated placement of continue sub button 2020-09-15 15:05:02 +05:30
Rish
3111ff9dde v0.8.25 2020-09-14 18:19:27 +05:30
Peter Zimon
36135588a6 Added responsive styles to logged out state
no refs.
- changed popup container to cover the whole screen on smaller screen sizes
- updated sizes on signup and signin screen for mobile devices
2020-09-11 18:20:01 +02:00
Peter Zimon
7ff541bf04 Updated z-index of iframes 2020-09-11 17:18:18 +02:00
Peter Zimon
740192f077 Restructure containers for responsive sizes
no refs.
Prepared the container system to responsive sizes.
- added inner scrollable container for all content
- made footer sticky
- set max height for each screen
2020-09-11 16:50:16 +02:00
Peter Zimon
9de17e2e2d Updated site title line height and spacing 2020-09-11 14:15:06 +02:00
Peter Zimon
bd4fc4e867 Updated site title size and alignment 2020-09-11 14:08:24 +02:00
Peter Zimon
47ceb55c5e Updated signup page for single plan case
no refs.

For when a signle plan is enabled in Portal settings:
- removed selected style from the plan on the signup page
- updated the width of the popup
2020-09-10 14:47:13 +02:00
Renovate Bot
9b23da05e2 Update dependency @testing-library/user-event to v12.1.4 2020-09-09 22:03:53 +00:00
Rish
dfa3160b6f v0.8.24 2020-09-08 20:52:40 +05:30
Rish
e3a957deb6 Added members support address from site data
closes https://github.com/TryGhost/members.js/issues/90

- Uses new members support address from site data for "Contact Support" button
2020-09-08 20:51:43 +05:30
Renovate Bot
d32a19f66c Update dependency @testing-library/react to v11 2020-09-08 18:59:36 +05:30
Rish
01cb5567ad Fixed esc not working for newsletter switch
refs https://github.com/TryGhost/members.js/issues/95

- Newsletter switch was taking over the focus and Esc didn't work on click, fixes by preventing the default behavior of switch
2020-09-08 18:52:20 +05:30
Rish
21a7d61c85 Updated newsletter updated messaging
refs https://github.com/TryGhost/members.js/issues/95

- Updates the newsletter status update as part of existing label
2020-09-08 18:43:50 +05:30
Rish
baf15f577c Fixed tests
no issue

- Fixed signup page test using updated label for button
2020-09-08 18:32:42 +05:30
Rish
62d572613f Updated esc key handling on iframe
no issue

- Updates the key event on owner document from the node
2020-09-08 18:29:59 +05:30
Peter Zimon
c90a947d94 Hid free plan if free is the only enabled plan
no refs.
- hides free plan if that's the only enabled plan
- refined copy for sign up button when no plans are available (e.g. Stripe is not set up or free is the only plan)
2020-09-08 14:56:18 +02:00
Rish
593e139860 Refactored site plan handling on plans page
no issue

- Extracts the account plans structure formation to helper from account plans page to make it reusable
2020-09-08 17:55:47 +05:30
Rish
e33c91f638 Added newsletter subscription status update
refs https://github.com/TryGhost/members.js/issues/95

- Adds a small update notification about newsletter subscription status update on toggle
2020-09-08 17:55:47 +05:30
Rish
af160b19f1 Fixed custom trigger button event listener removal
no issue

- Fixes event listeners for custom trigger button not being removed on unmount and initial setup
2020-09-08 17:55:47 +05:30
Rish
2dee51ee80 Handled closing popup with Esc key
refs https://github.com/TryGhost/members.js/issues/95

- Hitting Esc key closes the Portal popup as long is its not inside any `<input>` field for entering data
2020-09-08 17:55:47 +05:30
Rish
cd85e839ef Refactored account home page
no issue

- Cleans up the code structure used to render different sections for paid members on account home
- Adds new member helper method to check if the member is complimentary or not
2020-09-08 17:55:47 +05:30
Peter Zimon
a0fdb1d21f Removed welcome message if Stripe is not set up 2020-09-08 13:51:31 +02:00
Peter Zimon
c28184263d Removed plan and billing for complimentary
no refs.
- removed the ability to change plan and billing info section from account home for members with complimentary plan
- refined copy for plan section
2020-09-07 17:16:17 +02:00
Peter Zimon
7c8e3e6f80 Removed title tag from svgs 2020-09-04 16:47:35 +02:00
Peter Zimon
995bef0f57 Added default text if name is missing 2020-09-04 15:28:22 +02:00
Rish
c94be8cea7 v0.8.23 2020-09-04 17:20:50 +05:30
Rish
db9ca1322e Updated usage script to include site attribute
no issue

- To correctly inject the members.js script to any theme, it needs to know the correct site URL to access Ghost APIs.
- `data-ghost` attribute is needed on the script to define the correct Site url
2020-09-04 17:19:37 +05:30
Rish
1c2890036b Reset any "last page" state on closing popup
no issue

- We don't want to keep any old "last page" state for the popup once its closed, which is used to determine which page to to go back to with "Cancel"
- If no "last page" is found, going back closes the popup instead which is expected behavior
2020-09-04 13:07:08 +05:30
Peter Zimon
fc490f9ae5 Fixed outline for buttons 2020-09-04 08:42:07 +02:00
Rish
7d0f12395a Added UI refinements for free member plan page
no refs

-  Changed title to "Choose your subscription"
- The primary button label changed to "Continue"
2020-09-03 21:07:20 +05:30
Rish
5083094308 Updated cancel button to close modal when no back
no refs

- Cancel button previously was not closing the modal where no last page was found to go back to, fixed
2020-09-03 21:06:21 +05:30
Rish
3a01015618 v0.8.22 2020-09-03 17:15:24 +05:30
Rish
b563ab05a9 Fixed default plan for complimentary members
refs https://github.com/TryGhost/members.js/issues/77

- Fixes members on complimentary plan not having a default plan selected on account plan page
2020-09-03 17:13:38 +05:30
Rish
a8d2c03f9c Fixed class attribute usage
no issue

- React expects class attribute on element to be defined as `className`
2020-09-03 17:11:42 +05:30
Rish
b2dae5fc44 Added fixture for complimentary member
no issue

- Adds a fixture for complimentary member for testing
2020-09-03 17:10:47 +05:30
Rish
4474a21a4d Fixed incorrect usage of class
no refs

- React expects `class` on elements to be defined as `className`
2020-09-03 16:27:35 +05:30
Rish
23e0a76ea3 v0.8.21 2020-09-02 12:26:30 +05:30
Rish
4490586de8 Added new member fixture for preview mode
no issue

- Admin Preview mode has its own member fixture now to represent logged in member behavior
2020-09-02 12:25:36 +05:30
Peter Zimon
f2cc49c00a Updated cancel/continue styles 2020-09-02 08:12:07 +02:00
Peter Zimon
eb5e64ad36 Removed oldschool divider line in header 2020-09-02 07:59:57 +02:00
Renovate Bot
76e6f9f28b Update dependency @testing-library/user-event to v12 2020-09-02 00:15:52 +05:30
Rish
6e2ce8fad3 v0.8.20 2020-09-01 21:01:55 +05:30
Rish
819031e909 Fixed tests
no refs
2020-09-01 21:01:12 +05:30
Rish
8648bf111b Restructured dev mode data to top
no refs

- Updates dev mode data structure to top of the page for easy access and changes
2020-09-01 21:01:12 +05:30
Rish
a39587c495 Updated cancel subscription flow
no refs

- Adds continue subscription option on account home
- Cleans up methods to render cancel continue behavior
2020-09-01 21:01:12 +05:30
Rish
cfc96aa603 Added subscription cancel/continue button
no issue

- Allows member to cancel or continue their subscription at period end
- Updates subscription cancellation setting in stripe
2020-09-01 21:01:12 +05:30
Rish
9b899d4c54 Added subscription cancel action handler
no issue

- Adds cancel/continue action handler for a subscription
2020-09-01 21:01:12 +05:30
Rish
7aa3a448f7 Fixed action reset timeout causing incorrect state
no issue

- Previously, a timeout after 5s for previous action was resetting the action state, but didn't take into account any consecutive action and reset state incorrectly
- Timeout is reset on every action so only the last action outside timelimit causes action state to reset
2020-09-01 21:01:12 +05:30
Renovate Bot
3a5a3527bb Lock file maintenance 2020-09-01 12:48:13 +05:30
Rish
7a73869b75 Fixed tests
no issue
2020-08-27 21:40:43 +05:30
Peter Zimon
97ac0f01ec Refined primary button
no refs.
- increased the default height of primary button
- added loading spinner to sign in and sign up button loading state
2020-08-27 17:58:36 +02:00
Peter Zimon
2e429e8c8c Updated sign up/in button height 2020-08-27 17:08:49 +02:00
Rish
bd844c3568 v0.8.19 2020-08-26 00:52:17 +05:30
Rish
e50576b420 Updated cancel button behavior for account pages
no issue

- By default, Cancel button on Account plan/profile pages goes back to last open page like accountHome
- In case the page is opened directly via custom trigger button, there is no last open page so the popup didn't close
- Closes popup for back actions in case no last page is found
2020-08-26 00:50:55 +05:30
Rish
c721eda332 v0.8.18 2020-08-26 00:34:55 +05:30
Rish
f647f5e3d9 Fixed lint warnings
no issue
2020-08-26 00:34:21 +05:30
Rish
df6448cf84 Fixed flickering for signup/signin button state on success
refs https://github.com/TryGhost/members.js/issues/77

Weird behavior -
(1) enabled "Send login link" -> (2) disabled "Sending" -> (3) enabled "Send login link" -> (4) check your inbox page.

New expected behavior -
 (1) -> (2) -> (4)
2020-08-26 00:31:30 +05:30
Rish
c64e9181c6 Fixed form error handling update
no issue

- Form was not updating the error messages onBlur
- Updates error message handling and form submit
2020-08-26 00:24:34 +05:30
Renovate Bot
7a74ac21a0 Update dependency @testing-library/jest-dom to v5.11.4 2020-08-25 03:05:29 +00:00
Renovate Bot
dda2f84c16 Update dependency @testing-library/react to v10.4.9 2020-08-24 01:05:44 +00:00
Peter Zimon
1ff013d3f5 Refined disabled primary button style 2020-08-19 18:33:04 +02:00
Peter Zimon
3ad708da9d Fixed width of primary button 2020-08-19 18:26:03 +02:00
Peter Zimon
abad1d4e6b Refined subscribe button height 2020-08-19 18:12:02 +02:00
Rish
d863496bbe v0.8.17 2020-08-17 09:51:34 +05:30
Rish
ffb9e95594 Removed Stripe JS script load
no issue

- Stripe JS is enabled as part of members in ghost_head based on stripe connection
- Portal should expect Stripe to be already added to page via Ghost_Head, so removes explicit check and load here
2020-08-17 09:50:51 +05:30
Renovate Bot
040efb77cf Update dependency react-scripts to v3.4.3 2020-08-14 16:04:34 +00:00
Renovate Bot
b7002ef34e Update dependency @testing-library/jest-dom to v5.11.3 2020-08-14 15:06:07 +00:00
Rish
25f5e66268 Removed unused ref and styles
closes https://github.com/TryGhost/members.js/issues/76

- Removes unused ref calculation for height as its moved inline with frame changes
2020-08-13 18:11:01 +05:30
Renovate Bot
790057bfa8 Update dependency react-scripts to v3.4.2 2020-08-12 12:04:49 +00:00
Renovate Bot
90161206e4 Update dependency @testing-library/react to v10.4.8 2020-08-07 17:05:18 +00:00
Rish
ce7cf575ed v0.8.16 2020-08-07 21:51:29 +05:30
Rish
19d39babc8 Fixed lint
no issue
2020-08-05 14:28:20 +05:30
Rish
95ec778920 Fixed tests
no issue

- Updated tests for account plan and profile pages
2020-08-05 13:33:49 +05:30
Rish
1e2fe6be48 Updated default selected plan for paid/free members
refs https://github.com/TryGhost/members.js/issues/77

When changing plan from the account page, there should always be a default selected plan:

- for free members the first plan,
- for paid members the current plan
2020-08-05 13:14:39 +05:30
Rish
e0ac0652db Updated discount value logic for yearly plan
refs https://github.com/TryGhost/members.js/issues/77

- Updated discount value for yearly plan to be only applied if monthly plan is visible
- Doesn't make sense to show discount if no monthly plan is visible
2020-08-05 13:01:01 +05:30
Rish
308297b238 Updated account profile to redirect to home on save
refs https://github.com/TryGhost/members.js/issues/77

When clicking on "Save" on account profile, the user should be redirected to the account home page in case of successful save.
2020-08-05 12:57:58 +05:30
Rish
7de783a252 Updated default page to always open from trigger button
refs https://github.com/TryGhost/members.js/issues/77

- Portal button should always show the Subscribe/Account Home screen based on logged-in status
- Resets state to expected page on every open toggle
2020-08-05 12:56:46 +05:30
Renovate Bot
bb7dba6fea Update dependency @testing-library/jest-dom to v5.11.2 2020-07-31 16:04:55 +00:00
Rish
b33b95c5e7 v0.8.15 2020-07-30 20:35:55 +05:30
Peter Zimon
4f465aa127 Refined error styles 2020-07-30 15:26:32 +02:00
Rish
3249226876 Fixed tests and form validation errors data
refs https://github.com/TryGhost/members.js/issues/78

- Fixed error object post validation to not include keys for fields without error
- Fixed tests for Signup/Signin to use correct member context
2020-07-30 16:20:15 +05:30
Peter Zimon
f356fe621f Updated trigger button position 2020-07-30 12:24:12 +02:00
Peter Zimon
06471449f1 Added transitions to top buttons 2020-07-30 12:24:12 +02:00
Peter Zimon
c99c4da8fd Set button min-width 2020-07-30 12:24:12 +02:00
Rish
290a7493f2 Updated error handling for on blur
refs https://github.com/TryGhost/members.js/issues/78

- Updates error handling to only trigger error for specific field on blur instead of all fields
2020-07-30 15:49:56 +05:30
Peter Zimon
64f80ed1b0 Moved logout to account home page
no refs.
- moved logout back to account home as that's the only place it's used
- removed "Settings" button from tests
2020-07-30 11:20:47 +02:00
Peter Zimon
848c0d8ec7 Moved logout to top left
no refs.
- logout button was too prominent so I moved it to the top left as an icon (todo: show tooptip on hover)
2020-07-29 18:06:48 +02:00
Peter Zimon
2ad2098bba Unify free + paid account home pages
no refs.
- used similar design patterns for free and paid home pages
2020-07-29 16:54:20 +02:00
Peter Zimon
bafdac7bd2 Refined logo position 2020-07-29 16:10:48 +02:00
Peter Zimon
3eaa30e1f3 Refined background color + plan label 2020-07-29 16:04:47 +02:00
Peter Zimon
a37e682f6b Applied custom preview style + fixed account
no refs.
- applied custom style for popup container and background for Admin preview to make the UX more focused
- fixed dummy paid member as the preview content of the account home page
2020-07-29 15:51:55 +02:00
Peter Zimon
9efede024a Added discount to Account/Plan page
no refs.
- moved discount calculation to util
- added discount to account/plan page to make it consistent with signup
2020-07-29 12:35:19 +02:00
Peter Zimon
6af7ab674a Restructured links page layout
no refs.
- used table for link page structur
2020-07-29 12:11:07 +02:00
Peter Zimon
a1a51b5704 Fix trigger icon style bug 2020-07-28 17:15:04 +02:00
Peter Zimon
e877dd5e37 Updated trigger button design
no refs.
- added separate trigger button styles file
- restructured and updated styles
2020-07-28 17:02:17 +02:00
Rish
f47cacd299 Fixed lint
no issue

- Fixed useless-escape in validator email regex
2020-07-28 18:37:06 +05:30