Commit Graph

1065 Commits

Author SHA1 Message Date
Rishabh
7a65caa806 Updated fixtures for products
refs https://github.com/TryGhost/Team/issues/718

- updates `products` fixture to match API and include monthly/yearly price
2021-06-11 12:39:00 +05:30
Rishabh
5ebfbb79a7 Fixed multiple products check helper method
no refs

- fixes incorrect condition in helper that determines if Portal has multiple products or single from site
2021-06-11 12:38:02 +05:30
Rishabh
8d51bc20f0 Fixed tests
no refs
2021-06-11 12:33:45 +05:30
Peter Zimon
5516e348af Alpha version of multiple products
- added Products grid component to signup page with static data
- separate signup design between single vs. multiple products
- alpha!
2021-06-10 17:26:10 +02:00
Rishabh
859043e22e Updated dev mode check with custom site url
no refs

- takes advantage of new dev script by loading Portal in dev mode on ghost site with full features
- restricts some dev mode features only if no custom site url is passed, which is expected with fixture development
2021-06-10 15:26:32 +05:30
Rishabh
f0ba337659 Cleaned dev mode script
no refs

Cleans up dev mode script for lint errors
2021-06-10 15:05:33 +05:30
Rishabh
47c6509bea Added experimental start mode script for local development
no refs

Adds a new `yarn start:dev` command to start portal in development mode that allows development script to be used directly on Ghost site without needing a build for each change. Allows faster development on Portal locally.
2021-06-10 15:05:08 +05:30
Rishabh
a73a04034b Added logic for introducing multiple products
refs https://github.com/TryGhost/Team/issues/767

- Adds new helper to switch UI for multiple products
- Cleans up fixtures
2021-06-09 20:51:18 +05:30
Rishabh
f59711ab1b v1.5.3 2021-06-09 09:22:44 +05:30
Rishabh
c1df8366fb Filtered empty prices from list
no refs

Handles empty price objects in the API and ignores them from UI
2021-06-09 09:21:52 +05:30
Rishabh
928122a8f7 v1.5.2 2021-06-08 18:11:19 +05:30
Peter Zimon
d4c648d79c Fixed signup page pricing responsive layout bug 2021-06-08 14:39:22 +02:00
Rishabh
c45b1abede Added source map explorer for analyzing builds
no refs

`yarn analyze` now launches source map explorer which analyzes the local bundle, helping in keeping Portal size as small as possible.
2021-06-07 15:32:55 +05:30
Rishabh
0b2af14567 Added dev script for Portal development
no refs

The new dev script allows running `yarn dev` on the Portal code to make Portal development easier as well as integrate more easily with Ghost config. The script runs a local development server that serves portal bundle, which allows for static `portal` config to be used in Ghost for pointing to Portal script. It also watches the files for any changes, and auto re-builds and bundles latest Portal code.
2021-06-07 14:22:31 +05:30
Renovate Bot
3240f2670d Update dependency @testing-library/jest-dom to v5.13.0 2021-06-07 01:53:00 +00:00
Rishabh
cf710eb9c2 v1.5.1 2021-06-04 18:30:45 +05:30
Rishabh
d383723f21 Updated available prices for Portal to use multiple products
refs https://github.com/TryGhost/Team/issues/718

Instead of using default prices, Portal goes through active prices of all available products to use for query in data attributes
2021-06-04 18:23:26 +05:30
Rishabh
f3fd043580 Fixed non-default product prices not working
refs https://github.com/TryGhost/Team/issues/718

We passthrough any unknown price ids directly to checkout session as it currently Portal cannot verify prices across all products
2021-06-04 18:09:58 +05:30
Rishabh
82f7d69d8d v1.5.0 2021-06-04 17:09:54 +05:30
Rishabh
ee136bc918 Fixed lint 2021-06-04 14:12:56 +05:30
Rishabh
0f4be436be Handled named plan values in portal_plans setting
refs https://github.com/TryGhost/Team/issues/753

We reverted back to using named plan values - `monthly`, `yearly` - in `portal_plans` setting to allow us to easily handle active prices for a product. This change handles the updated values in `portal_plans` to use new values.
2021-06-04 13:29:22 +05:30
Rishabh
f790cb47ef v1.4.7 2021-06-01 14:37:31 +05:30
Kevin
701ca69053 🐛 Fixed toggle newsletter subscription (#146)
closes https://github.com/TryGhost/Ghost/issues/12996
2021-06-01 14:27:41 +05:30
Renovate Bot
97dd3a0470 Update dependency @testing-library/react to v11.2.7 2021-05-27 13:55:49 +00:00
Rishabh
28de418d9e v1.4.6 2021-05-27 17:53:42 +05:30
Rishabh
07f1d6d3a5 Fixed tests
no refs
2021-05-27 17:52:32 +05:30
Rishabh
6f88adf4b4 Renamed master to main for test workflow and readme
no refs

The master -> main rename was missed for test workflows as well as Readme badge, which caused the error reporting to incorrectly report passing tests on `master` while they were failing on `main`
2021-05-27 17:52:32 +05:30
Rishabh
0bac70c326 💡 Added resize listener for portal container height change
no refs

We need the Portal preview container on Admin to re-adjust based on height of Portal container. This change adds a resizeObserver for portal container and fires a postMessage with height for Admin to listen and update the iframe height based on height of portal container

Updated resize observer to fire on update

Cleanup
2021-05-27 17:52:32 +05:30
Rishabh
817d6650b2 v1.4.5 2021-05-27 13:40:07 +05:30
Rishabh
0f31838b35 Updated target origin to all for portal ready event
no refs

The purpose of broadcasting portal-ready event is it allows Preview in Admin to have better UX with showing Portal when its ready than show the site while its loading. Having a strict target origin like site url won't work when sites have custom domains as it browser security will block the event due to origin mismatch.

Since `portal-ready` is just an event message and doesn't contain any sensitive data that needs to be restricted to origin, this bumps it to `*` which allows any site listening to be able to read the message.
2021-05-27 13:39:23 +05:30
Rishabh
e4cd0034ad v1.4.4 2021-05-24 19:23:02 +05:30
Rishabh
08d740133f Updated site and member data to load in parallel
This reverts commit 841793e4d3.
2021-05-24 19:22:07 +05:30
Rishabh
674f6f8e1e Added firing of portal-ready post message for preview""
This reverts commit 5650b8d716.
2021-05-24 19:20:32 +05:30
Rishabh
9129fa7cf9 v1.4.3 2021-05-24 19:14:23 +05:30
Rishabh
841793e4d3 Revert "Updated site and member data to load in parallel"
This reverts commit 8ac6364d3a.
2021-05-24 19:13:55 +05:30
Rishabh
5650b8d716 Revert " Added firing of portal-ready post message for preview"
This reverts commit 347805d4d0.
2021-05-24 19:13:37 +05:30
Rishabh
edba56fbfb v1.4.2 2021-05-24 18:32:42 +05:30
Rishabh
347805d4d0 Added firing of portal-ready post message for preview
no refs

This adds a way for top level site/admin to detect when Portal is loaded on the site and is ready to render, which allows dynamic UI handling specially in Preview mode in Admin.
2021-05-24 18:12:08 +05:30
Rishabh
8ac6364d3a Updated site and member data to load in parallel
no refs

Previously, the site and member data needed by Portal were loaded sequentially, which delayed the first load slightly as both the requests can be instead made in parallel. This change updates the API init to load both requests in parallel.
2021-05-24 18:10:48 +05:30
Rishabh
9472a29568 v1.4.1 2021-05-19 00:27:11 +05:30
Peter Zimon
97fdd037ca Design refinements + fixes
- replaced invite only default icon
- removed unused function include
- reseted fixtures
2021-05-18 16:54:39 +02:00
Peter Zimon
afb3e9ad64 UI refinements
- removed cadence indicator from prices
- refined spacings for prices
2021-05-18 16:43:30 +02:00
Peter Zimon
ef10fce723 Setting site title as default title 2021-05-18 16:36:48 +02:00
Rishabh
d4fe243d43 Added signup access setting to preview
no refs

Allows Portal preview to use `members_signup_access` setting from the URL instead of relying on saved setting to change the preview without saving on Admin.
2021-05-18 17:43:18 +05:30
Rishabh
8044dc836a v1.4.0 2021-05-18 14:57:42 +05:30
Rishabh
370f721deb 🐛 Fixed falsy value not used in preview
no refs

For some boolean preview keys like `allowSelfSignup` and `disableBackground`, we ignored setting the falsy value which is incorrect and doesnt' load the expected Portal preview
2021-05-18 14:55:37 +05:30
Rishabh
fd6fee4c9d 🐛 Fixed extra email sent for logged in members on upgrade
refs https://github.com/TryGhost/Team/issues/695
refs 212be5fb02 (Patch)

Currently when we have a successful Stripe checkout session, we will always send the member an email confirming their signup when using data-members-* attributes.

This is considered a bug for members who have signed up as a free member first, meaning they have already received this email. This change passes a `checkoutType` metadata same as Portal to not send the email when member is already logged in.
2021-05-18 09:19:00 +05:30
Rishabh
4e14d811bf 💡 Handled updated API response for logged out member
refs https://github.com/TryGhost/Team/issues/560
refs 196cdafe6b

The endpoint `/members/api/member/` is used by Portal for fetching member details on site load to setup different flows. The response from this endpoint for logged out member has now changed from 401 Unauthorized to 204 No Content. This updates the API handling in Portal for updated response status.

This change also handles the visible error messages on console for Portal when it first loads and tries to establish member logged-in status, and instead handles it now behind the scenes. This also makes Portal functioning more transparent on the site.
2021-05-13 15:32:32 +05:30
Rishabh
9fcad8e31d Updated default currency for free price
no refs

Since custom prices now allow prices with multiple currencies to exist, till we have a default currency for a site, we use the currency for first paid price on the list as default currency for a free price visually on Portal UI
2021-05-13 15:28:52 +05:30
Rishabh
66cbbce917 v1.3.1 2021-05-12 17:13:16 +05:30