Commit graph

47 commits

Author SHA1 Message Date
Antoine Clausse
b2ef7a935f [web] Use localized number formatting for currencies (#17622)
* Add a unit test on `SubscriptionFormatters.formatPrice`

* Add JSDoc to `formatPrice`

Also: Name the functions before exporting:
This fixes my IDE (WebStorm) navigation

* Make `'USD'` the default param instead of reassigning

* Create `formatCurrency` function

* Use `formatCurrency` in SubscriptionFormatters

* Use an `isNoCentsCurrency` logic for `CLP` `JPY` `KRW` `VND`

And remove custom `CLP` logic and locale

* Add `locale` param to `formatPrice`

* Generate `groups.json` and `localizedPlanPricing.json`

```
bin/exec web node ./scripts/recurly/recurly_prices.js --download -o prices.json
bin/exec web node ./scripts/plan-prices/plans.js -f ../../prices.json -o dir
```

* Update scripts/plan-prices/plans.js to generate numbers instead of localized amounts

* Generate `groups.json` and `localizedPlanPricing.json`

```
bin/exec web node ./scripts/recurly/recurly_prices.js --download -o prices.json
bin/exec web node ./scripts/plan-prices/plans.js -f ../../prices.json -o dir
```

* Remove generation of `plans.json`

As /services/web/frontend/js/main/plans.js was removed in https://github.com/overleaf/internal/pull/12593

* Sort currencies in alphabetical order in scripts/plan-prices/plans.js

* Generate `groups.json` and `localizedPlanPricing.json`

```
bin/exec web node ./scripts/recurly/recurly_prices.js --download -o prices.json
bin/exec web node ./scripts/plan-prices/plans.js -f ../../prices.json -o dir
```

* Use `formatCurrency` in price-summary.tsx

* Use `formatCurrency` in Subscription Pug files

* Fix unit tests SubscriptionHelperTests.js

* Remove unused `currencySymbol`

* Change to `formatCurrency` in other React components

* Add `CurrencyCode` JSDoc types

* Duplicate `formatCurrency` into services/web/app/src/util

* Wrap tests in a top-level describe block

* Use `narrowSymbol`

* Fix tests with `narrowSymbol` expects

* Revert deletion of old `formatPrice` in SubscriptionFormatters.js

* Rename `formatCurrency` -> `formatCurrencyLocalized`

* Revert deletion of `CurrencySymbol`

* Add split-test in SubscriptionController.js

* Add split-test in SubscriptionViewModelBuilder.js

* Add split-test in plans

* Add split-test in subscription-dashboard-context.tsx

* Add split-test in 4 more components

* Update tests

* Show currency and payment methods in interstitial page

* Fix `–` being printed. Use `–` instead

* Fix test with NOK

* Storybook: Fix missing `SplitTestProvider`

* Storybook: Revert "Remove unused `currencySymbol`"

This reverts commit e55387d4753f97bbf8e39e0fdc3ad17312122aaa.

* Replace `getSplitTestVariant` by `useSplitTestContext`

* Use parameterize currencyFormat in `generateInitialLocalizedGroupPrice`

* Fixup import paths of `formatCurrencyLocalized`

* Replace `% 1 === 0` by `Number.isInteger`

* Add comment explaining that any combinations of languages/currencies could happen

* Fixup after rebase: import `useSplitTestContext`

* Revert "Remove SplitTestProvider from subscription root"

This reverts commit be9f378fda715b86589ab0759737581c72321d87.

* Revert "Remove split test provider from some tests"

This reverts commit 985522932b550cfd38fa6a4f4c3d2ebaee6ff7df.

GitOrigin-RevId: 59a83cbbe0f7cc7e45f189c654e23fcf9bfa37af
2024-04-19 08:03:54 +00:00
M Fahru
9b8d0ac122 Merge pull request #17664 from overleaf/dp-plans-page-anchor-tags
Allow for direct linking to monthly plans

GitOrigin-RevId: 842d88eac84eaf94ec486b213ec4a0b13cf70ad6
2024-03-29 09:04:34 +00:00
M Fahru
5a8a0fb268 Tear down annual-trials split test:
- Use the `default` variant as the winner
- Remove all `annual-trials`-related code

GitOrigin-RevId: 3956f256157f3e86c99e41eec54ef6fd0da39bc3
2024-03-01 09:03:24 +00:00
Alf Eaton
7b93640b96 Remove CDN load test (#17308)
GitOrigin-RevId: 6f8f840bb8a3db0944179c7c25b89f1793f033bc
2024-02-27 17:01:56 +00:00
Rebeka Dekany
140b312eca Merge pull request #14799 from overleaf/rd-report-tablist-plan
Accessibility - help the user to navigate through the tabs on the plans page

GitOrigin-RevId: 93822277edd3a44eaf8e1219a4902e28d31e198a
2024-01-26 09:03:36 +00:00
M Fahru
0639f266d8 Merge pull request #14756 from overleaf/mf-group-invite-new-user-redirection
[web] Redirect to invite screen if new user register with a pending group invitations

GitOrigin-RevId: 39aeffd65b9d793c87e53398a700ad140794594e
2023-11-10 09:04:23 +00:00
Mathias Jakobsen
c1a9085a11 Merge pull request #15314 from overleaf/mj-email-captcha
[web] Use recaptcha.net for captcha when adding email

GitOrigin-RevId: 51e7a4792414ca9c8c3f167a359b6e637230991d
2023-10-19 08:03:09 +00:00
Thomas
70e824e41a Merge pull request #15065 from overleaf/tm-fix-jsx-new-subscription
Fix jsx in non-jsx file

GitOrigin-RevId: c66dbbfdb5d874dfd5096b204198c2f24304d784
2023-10-03 08:04:40 +00:00
Jakob Ackermann
9daa8f5d98 Merge pull request #15040 from overleaf/jpa-js-to-jsx
[web] rename all the JSX files to .jsx/.tsx

GitOrigin-RevId: 82056ae47e017523722cf258dcc83c8a925a28f7
2023-09-29 08:04:29 +00:00
Alexandre Bourdin
a4a5a08c31 Merge pull request #14256 from overleaf/ab-unmanaged-remove-from-group-dropdown-action
[web] Add Remove from group action in dropdown for unmanaged/pending users

GitOrigin-RevId: daa66598e42befa2f8430bdf118e907a8758d60e
2023-08-23 08:05:10 +00:00
Rebeka
34aec8f8be update the view based on the variants
GitOrigin-RevId: 8aa833bb8d7faeabc25e2497821d5b74c16d3c2a
2023-08-10 08:04:51 +00:00
Jakob Ackermann
d212be408f Merge pull request #13337 from overleaf/jpa-translate-plans-page
[web] translate all the things on the plans page (to German)

GitOrigin-RevId: cbd812a4eca41573986c2d9e4f5e37b3d5a49e4f
2023-07-19 08:03:57 +00:00
June Kelly
4f8852feaa Merge pull request #13850 from overleaf/ab-invite-enrollment
[web] Managed users - combined invite/surrender flow

GitOrigin-RevId: 70cb0d81e0019eac69a4a565377447bb6d1a1823
2023-07-17 11:10:37 +00:00
Mathias Jakobsen
af76768eb7 Merge pull request #13372 from overleaf/mj-captcha-add-email
[web] Add recaptcha to add-email

GitOrigin-RevId: 0540e0dbc3103dcaac87dd7fabeedbc5892c371c
2023-07-17 10:40:08 +00:00
M Fahru
8120d52de1 Fix "For students" link in footer isn't working properly (#13296)
* Fix "For student" link in footer isn't working because of hash being placed before querystring

* add scroll to top behaviour if "For students" link is accessed on the plans page

* Add an extra delay to make sure computation is finished before performing scroll to top behaviour

GitOrigin-RevId: 46b906271223267bc47ffcd781c25dc03f23a8e7
2023-07-17 10:27:02 +00:00
June Kelly
f5740e6b17 Merge pull request #12593 from overleaf/jk-remove-plans-split-test
[web] Remove 'plans-page-layout-v3' split test

GitOrigin-RevId: 91e0d3d8bc40632df630131b2e872fa824015da5
2023-04-26 08:04:21 +00:00
Jessica Lawshe
5ae4e68380 Merge pull request #12185 from overleaf/jpa-fix-segmentation
[web] old plans page: fix event segmentation for plans-page-click

GitOrigin-RevId: 9be23a9cf9d92b88d6fbe8c6e2b941cf3ac63344
2023-03-17 09:06:08 +00:00
Jakob Ackermann
7ae5a9f060 Merge pull request #12160 from overleaf/mf-old-plans-page-annual-button
Fix annual buy button in old plans page is linked to the free trial check out page

GitOrigin-RevId: 7157b354a21e46f4eb194ae1ef741e90790b6071
2023-03-13 09:04:23 +00:00
Alexandre Bourdin
ed40a87cdc [web] Migrate group management to React (#11293)
* Rename manage group entry point

* Migrate group management root page to React

* Add cypress tests for the group management react page

* Fix linting

* Add checkbox labels for screen-readers + remove unused classes

* Await on add/remove members calls

* Display the export CSV link for a full group

* Display error message when group is full

* Sort locales

* Handle the managers management page in React version

* Fix missing type in GroupMemberRow

* Split members and managers React pages

* Build API paths on frontend side + add cypress tests for each page

* Fix linting

* Update unit tests

* Review improvements

* Type API errors

GitOrigin-RevId: d124a9d24cbf33de8aacc5d69e9d46e7bcda93c5
2023-02-07 09:04:18 +00:00
M Fahru
781c1c97c7 Implement new three-way split test for the plans page (#11493)
* Update split test config and infrastructure for plans-page-layout-v3

* Implement view for `old-plans-page-annual` variant of the new split test:
    - Make `annual` the default view for all elements on the old plans page
    - Change the tooltip background to green for monthly/student view

* Implement a new design for the new plans page:
    - switch annual and monthly locations (annual on the left now)
    - change the tooltip background to green color for all choice
    - make the monthly-annual switch has green background if annual is chosen

* Fix mobile view plans page header style

GitOrigin-RevId: b2b3c6ac6adbe26bf6def7e072493f503793cfcb
2023-01-30 09:02:45 +00:00
ilkin-overleaf
7e68b4f0d5 Merge pull request #11147 from overleaf/ii-subscriptions-pages-react-split-test
[web] React subscription split test

GitOrigin-RevId: 6656b3895030bc677483a3e30d5e998f5f7d1458
2023-01-13 09:04:52 +00:00
Davinder Singh
e7e1fcef3b Merge pull request #10796 from overleaf/ds-plans-page-btn-tag
Replaced the a tag with button tag for plans page plans options

GitOrigin-RevId: 4717067ce0fc9209a65c0d323602d834a90951fc
2022-12-19 09:04:10 +00:00
Miguel Serrano
c30f887727 Merge pull request #9936 from overleaf/msm-itm-referrer
`itm_referrer` for subscription attribution

GitOrigin-RevId: 2787b55e8b7e9e415e66abef8deb669f3adf0f0d
2022-10-26 08:03:52 +00:00
M Fahru
1549bac91a Fix event segmentations for some of the plans-page-click events on the new plans page (#9781)
* change event segmentation to plans-page-layout-v2-annual

* update some new plans page event to have new event key

* add location segmentation key for some of the group plans events

GitOrigin-RevId: 99d8258112d9661955a196e57ca05a017afba0f4
2022-09-30 08:04:43 +00:00
Thomas Mees
a0c87b2ae1 Rename plans-page-layout-v2 to plans-page-layout-v2-annual
GitOrigin-RevId: deeec6bde44d8d99e241d54b02248fe6299af4df
2022-09-28 08:08:13 +00:00
M Fahru
8c792dd63e Make annual value is the default when opening new plans page with hashchange event
GitOrigin-RevId: b2525c314f06a990492112a7280e921987205169
2022-09-28 08:08:02 +00:00
M Fahru
4dbabe3a8d Only show university info box on new plans page student tab (#8823)
GitOrigin-RevId: 057baae295443d9a924b4b0754cdb12ebe330976
2022-07-13 08:05:54 +00:00
M Fahru
3b4968e263 Change number of users in group plan to have a dynamic value in the new plans page (#8592)
GitOrigin-RevId: 008c0a1120e5b99945f18f0b4eee60bfcb08a331
2022-07-13 08:05:33 +00:00
M Fahru
e97c56b105 Fix group plan localized pricing and force 2 decimal number for non-integer currency value (#8576)
GitOrigin-RevId: d6dedf7af04c79cef6b9cd39f5496610ffc52938
2022-07-13 08:05:20 +00:00
M Fahru
f3118771fe Add new limited discount information on personal plan in the new plans page (#8715)
GitOrigin-RevId: 7f4e91179ba767ff8b88df7787eaf9d4fe6a5f05
2022-07-13 08:05:06 +00:00
Thomas Mees
b3d5a2c7f0 Port ability to set plans page tab view with URL hash
GitOrigin-RevId: 367829b46a1e984f19a131999938c554a960eccf
2022-07-13 08:04:56 +00:00
M Fahru
ac1f72263c Fix switch tooltip not showing the proper text on new plans page (#8608)
GitOrigin-RevId: efb49c7a6045b6a5b26a0b0d84a24d151f76f192
2022-06-29 08:05:07 +00:00
M Fahru
d00d40464f Implement interstitial payment page analytics (#8512)
GitOrigin-RevId: 927e85df0a933d3da2378443c38d852e1970b574
2022-06-29 08:05:01 +00:00
M Fahru
d5bc7c450c Implement interstitial payment page for free trial button on project page with split test (#8311)
GitOrigin-RevId: b24b4f91d281c2756aed68ec176d138fcdd52e54
2022-06-29 08:04:55 +00:00
M Fahru
361f6f245a Refactor new plans page (#8493)
* [web] hide the monthly/annual switch for small screens via css

Co-Authored-By: Jakob Ackermann <jakob.ackermann@overleaf.com>

* [web] merge logic for hiding elements shown in a subset of view

Co-Authored-By: M Fahru <m.fahru@overleaf.com>

* [web] hide the monthly/annual switch for small screens via css

Co-Authored-By: M Fahru <m.fahru@overleaf.com>

* [web] merge logic for hiding elements shown in a subset of view

Co-Authored-By: M Fahru <m.fahru@overleaf.com>

* fix inverted logic on monthly annual checking

* delete some duplicated logic and refactor

* merge switch functions

* move global variable into the main module

* simplify the enable and disable switch

* remove unused parseFloat

* simplify group plan pricing calculation

* simplify discount group plan logic

* simplify sticky header logic

* merge view and period switching

* fix underlining of switch text

* simplify class list toggling

* merging two function of the group plan

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 5e51690514bbf1dee2639011748c6a8470e1c19a
2022-06-23 08:02:56 +00:00
M Fahru
03e875ffa3 Remove duplicated event listener on new plans page group plan modal (#8085)
GitOrigin-RevId: 7445c3b93bc54285f5ade6ce8b32b13be9281dc5
2022-05-25 08:10:15 +00:00
M Fahru
487ff4f505 Improvement on form data sync between group plan modal and new plan page (#8003)
GitOrigin-RevId: 66a0a423fe48a8a8a7ddd292ba218cd5038dfdb1
2022-05-20 08:03:44 +00:00
M Fahru
1b2cefa63e Add new analytics events in the new plans page and update analytics event in the current plans page (#7639)
GitOrigin-RevId: 71a4e7b0b041bbe7ea6df11cad28857978c77e4e
2022-05-20 08:03:21 +00:00
M Fahru
dceb6910c9 New plans page: Show initial price value upon first render for group price data (#7974)
* New plans page: Show initial price value upon first render

* fix wrong test on SubscriptionController and add new tests on SubscriptionHelper

GitOrigin-RevId: a339a97cff2df0728ba35885af8953c8a0e0b7c8
2022-05-20 08:03:16 +00:00
M Fahru
4d25132a5f new plans page: refactor custom tooltip to bootstrap tooltip (#7972)
GitOrigin-RevId: d3552867a9e9176288803cadffacb5f3dab24895
2022-05-18 08:04:06 +00:00
M Fahru
8157616f85 [web] New Plans Page for A/B Test (#7330)
GitOrigin-RevId: 4e4629583c6e86bd2bc6165d123224734c133df7
2022-05-13 08:03:30 +00:00
M Fahru
cf0b46ecf2 Add annual saving tooltip & add a striked-through text on the annual price to current plans page
Co-authored-by: Thomas Mees <thomas.mees@overleaf.com>
GitOrigin-RevId: 25a9b7b12ddd00588a8e4c43b55f2d7c57048818
2022-05-12 10:41:11 +00:00
Timothée Alby
cf2dfc6bf1 Merge pull request #7593 from overleaf/ta-settings-migration
[SettingsPage] Integration Branch

GitOrigin-RevId: 5a3c26b2a02d716c4ae3981e3f08b811ae307725
2022-04-25 08:05:12 +00:00
Alf Eaton
4610734f07 Add new fat footer (#6260)
GitOrigin-RevId: 64c50caac2ec8d56b3f49d6f97c8a1c4d4b3a496
2022-03-02 09:02:45 +00:00
Thomas
1777c075ea Merge pull request #6423 from overleaf/tm-plans-new-events
Add new analytics events to plans page/subscription flow

GitOrigin-RevId: 7b70ee30749ebc671cf2445f3cbdae91a7278b01
2022-02-02 09:03:07 +00:00
June Kelly
5900dc3b4a Merge pull request #5223 from overleaf/jpa-fix-annual-plan-codes
[web] de-ng plans page: fix plan codes for annual plans

GitOrigin-RevId: f8d94e8c495d9917267adf73e4d75bbd4f5264b2
2021-09-27 08:03:04 +00:00
Jakob Ackermann
59d83c4b88 Merge pull request #5117 from overleaf/jpa-plans-de-ng
[web] de-ng plans page

GitOrigin-RevId: b902b10b45ab3fd46e71545c94f65e8f079c4564
2021-09-23 08:03:23 +00:00