Граф коммитов

37 Коммитов

Автор SHA1 Сообщение Дата
Julian Poyourow 46654a60cb
feat(all): react 18
Because:

* We need to upgrade to react 18

This commit:

* Upgrades all frontend packages to react 18

Closes: FXA-7932
Closes: FXA-3587
Closes: FXA-4353
Closes: FXA-5081
Closes: FXA-5136
Closes: FXA-5140
Closes: FXA-5142
Closes: FXA-5143
2023-07-18 22:26:06 -07:00
Barry Chen a0b2cda909
chore(deps): upgrade react-scripts and webpack to v5
Because:
 - we want to upgrade our React/CRA packages to react-scripts and
   webpack v5

This commit:
 - upgrades react-scripts and webpack to v5 for Settings, Payments, and
   Admin Panel
   - upgrades other dependencies in order to make the react-scripts and
     webpack upgrades work
 - hybridizes fxa-auth-client and fxa-shared into dual module format
   packages
2023-07-11 13:32:40 -05:00
dschom 1d709000fe
task(many): Only clone l10n once and combine ftl files.
Because:
- We want to avoid redundant git clone operations
- We want to reduce the number of ftl bundles requested on the client side.

This Commit:
- Adds _scripts/l10n/*.sh for conducting l10n build operations
- Bundles ftl files together into ftl main
- Removes bundle prop on AppLocalizer, so that it uses the default, [main.ftl]
- Replace - with _ in locale names when resolving ftl files
- Removes clone-l10n.sh
2023-03-15 11:30:44 -07:00
Reino Muhl 50087fd712
fix(Subscriptions): add tax to sub management
Because:

* For exclusive tax, display the tax amount in subscription management

This commit:

* Adds a new component, PriceDetails, that can be used to display the
  price with/out tax, and price intervals with/out tax.
* Adds PriceDetails component to Subscription Management, and updates
  the copy used.
* Preview invoice for each subscription to get the current tax amount
* Update preview invoice and subsequent invoices endpoints to return
  total and subtotal *_excluding_tax amounts.

Closes #FXA-6187
2022-12-16 17:42:53 -05:00
Valerie Pomerleau 499a41a410
refactor(l10n): Ensure shared FTL strings not duplicated on Pontoon
Because:

- Concatenating shared FTL strings into multiple packages before sending for localization created duplication of localization work, and we want each string to only be translated once.

This commit:

- Remove concatenation of shared files (branding.ftl, fxa-react ftl files) from grunttasks
- Add grunttasks in fxa-react to concatenate fxa-react FTL files into one react.ftl file
- Add grunt to fxa-react dev dependencies
- Update fxa-react scripts to run l10n and ftl tasks
- Update clone-l10n script to distribute react.ftl to packages
- Bundle branding and shared into AppLocalizationProvider

Closes #FXA-6388
2022-12-08 15:45:34 -08:00
Valerie Pomerleau d79c30d50a
feat(l10n): Split payments-server single FTL file into per-component files
Because

* Organizing l10n strings in per-component files aligns payments-server with the setup used for auth-server and settings. Splitting the FTL files also improves maintability by more tightling coupling the strings with the components where the strings are used.

This commit

* Create a temporary branding file in fxa-payments-server/src
* Create a gruntfile with tasks for FTL concatenation and watching
* Rename the destination file from main.ftl to payments.ftl
* Switch payments-server's default locale from en-US to en and update all references of en-US to en
* Create individual FTL files per component and move messages to their respective component FTL file
* Add a l10n entry in the package readme
* Update clone-l10n.sh to copy 'payments' ftl files instead of 'main'
* Update AppLocalizationProvider to use 'payments' bundles
* Replace setupFluentLocalizationTest with getFtlBundle/getFtlFromPackage from fxa-react
* Remove setupFluentLocalizationTest function (no longer used in fxa-settings)
* Add merge-ftl:test task to package.json start and test:frontend scripts
* Remove legacy strings from FTL files
* Update currency and date formats to use 'en' as default locale
* Remove legacy paths from .gitignore files in payments-server
* Move remaining paths to global .gitignore
* Delete .gitignore files in payments-server

Closes #FXA-5996 and #FXA-6255
2022-11-09 13:26:40 -08:00
Reino Muhl 61289c6da9
refactor(payments): convert class main-content
Because:

- We want to convert the main-content class to using Tailwind.

This commit:

- Creates a custom class and converts main-content to using Tailwind.

Closes #FXA-5628

Minor review edits
2022-11-07 15:07:50 -05:00
Lauren Zugai d866a06d76
chore(deps): Upgrade tailwindcss (v1.9 to v3), autoprefixer, & all SB deps, replace postcss deps, remove other deps
Because:
*We want to upgrade to Tailwind v3 and update other related outdated dependencies

This commit:
*Upgrades storybook packages across the board, upgrades autoprefixer, removes postcss-7 compatibility package and postcss-cli, installs postcss per Tailwind requirement
*Upgrades fxa-admin-panel to Tailwind v3
*Upgrades fxa-react to Tailwind v3, changing Portal from SCSS to CSS to remove a build step
*Upgrades fxa-settings to Tailwind v3, first transforming our SCSS to CSS before it’s sent to PostCSS. There will be a follow up to change our SCSS files to CSS and use PostCSS plugins instead
*Upgrades fxa-payments-server to Tailwind v3, decoupling SCSS from the Tailwind out file since payments will be using Tailwind exclusively in the next few months. Makes Storybook more consistent with other packages
2022-06-30 16:51:57 -05:00
Ivo Plamenac 02aeb5165b
feat(payments): remove Coupons Feature Flag (#11576)
Because:

* We no longer need the ability to hide coupons

This commit:

* Removes the feature flag that hides the coupon feature

Closes #10853
2022-02-09 11:35:44 -08:00
Lauren Zugai 24bf98e990
refactor(admin-panel, payments): Upgrade to react-router v6 (#11463)
* refactor(admin-panel): upgrade to react-router v6

* refactor(payments-server): Upgrade to react-router v6

Co-authored-by: Lauren Zugai <lauren@zugai.com>

* Fix yarn.lock conflicts/deps, fix test, mock storybook router

Co-authored-by: Jody Heavener <j.heavener@gmail.com>
Co-authored-by: fxa-bananafox[bot] <70546514+fxa-bananafox[bot]@users.noreply.github.com>
2022-01-04 10:10:56 -06:00
Ivo Plamenac 37b539a64f
feat(payments): Add feature flag for Coupons (#11048)
* chore(payments): add subscriptionCoupons feature flag
Because:

* We want to have a feature flag for the coupons UI

This commit:

* Adds a feature flag called subscriptionCoupons

Closes # (GH issue linked to epic so i dont want to put anything here that will close that ticket)
2021-11-19 14:05:59 -08:00
Ivo Plamenac ad741e723d
chore(payments): remove usePaypalUIByDefault feature flag (#10563)
Because:

* This UI is enabled by default for all environments, it is no longer necessary for local/dev.

This commit:

* Removes the feature flag, removes references to it, and updates the README

Closes #10531
2021-09-30 12:48:12 -07:00
Barry Chen 2a61e4e866
fix(storybook): add access token to app context in Payments storybook
Because:
 - some routes in Payments need an access token

This commit:
 - prevent a redirect to sign in Storybook by adding an access token in
   the mocked app context
2021-08-13 10:56:26 -05:00
Dave Justice fa35127618
refactor(fxa-payments-server): Create PaymentConsentCheckbox component
- refs #9361
- was able to componentize the checkbox from the payment form
- consolidated tests to PaymentConsentCheckbox/index.test.jsx
2021-08-02 15:15:10 +00:00
Bianca Danforth 2c03f3342f
feat(payments): Gate SubscriptionCreate screen based on new/returning PayPal customers.
Also simplify PaymentLegalBlurb component on Checkout screens.
2021-03-05 12:02:08 -06:00
Bianca Danforth de83db0e33
feat(payments): Add PayPal button to Subscribe page 2021-01-26 15:29:51 -05:00
Vijay Budhram c95ee6f8a9
feat(l10n): Add initial fluent l10n for settings v2 2021-01-15 13:01:16 -05:00
Les Orchard 306846f0ae
fix(storybook): delete commits and pulls over 3 weeks old on every build
Ugly hack, but it munges git log output to find commit and pull directories to
delete old builds.
2020-08-13 19:29:20 -04:00
Les Orchard 05c0a47a77
feat(payments): New PaymentFormV2 component with Stripe upgrades
- new PaymentFormV2 component using new Stripe components, based on
  PaymentForm with tweaks for all-in-one card widget and shifts
  responsibility for card processing onto parent component

- plumbing in AppContext for new method for loading Stripe API

- add @stripe/react-stripe-js and @stripe/stripe-js dependencies

- switch to explicit tooltip parent wrapper for Stripe elements

- tweak functional test subscribeToTestProduct helper to more robustly
  target Stripe elements

fixes #4294
2020-07-07 18:40:12 -04:00
Les Orchard 6d41b566d6
feat(payments): Add legal doc links to payment confirmation checkbox label
- replace "according to payment term" in all FTL strings with
  "according to <termsOfServiceLink>Terms of Service</termsOfServiceLink>
  and <privacyNoticeLink>Privacy Notice</privacyNoticeLink>"

- supply legal doc URLs to localized rendering of confirmation checkbox
  label from Stripe metadata product details

- enable storybook MockApp to accept a locale to exercise localized
  content

fixes #5584
2020-06-23 12:48:07 -04:00
Jody Heavener 7cd796a3f4
feat(admin-panel+settings+react): set up storybook and tailwind for admin-panel, share tailwind config across all projects, config movement
compile tailwind for use in fxa-react, fxa-settings, and fxa-admin-panel

add script to tailwind configs to only apply postcss output to fxa-react components being used in a given project
2020-06-03 15:46:09 -04:00
Les Orchard a71aa0cb74
feat(storybooks): build storybooks for CI and deploy to mozilla-fxa/storybooks
- post a comment on PRs for storybook deploy when relevant

- tweaks to CircleCi config to build & deploy storybooks for pull
  requests and master merges

- try to avoid building storybooks if the packages are not in
  packages/test.list generated by base-install

- updates for yarn

- tweaks to use github personal access token

- refactor storybook webpack customizations to use shared function in
  fxa-react, along with fixes to module resolution

- add fxa-content-server as dependency for fxa-react, since it seems to
  reuse content server styles that, in turn, need photon-colors

issue #5385
2020-05-26 16:27:29 -04:00
Les Orchard acf5c00bab
feat(storybook): build static gh-pages site from storybook builds
issue #4823
2020-05-20 19:48:00 -04:00
Les Orchard 7506b86429
fix(payments): bugfix for creating default mock stubs for stripe JS API
Create a new object based on Stripe API to avoid modifying actual API
2020-04-15 20:16:35 -04:00
Dave Justice 33e59c64d4
feat(payment-server): mobile payments flow for fpn
- fixes #4145

task(payments-server): add details component for new payment
 flow

- fixes #4142

task(payment-server): add payment confirmation component

- added cc brand to customer object in auth server
- added latest_invoice to subscription object in auth
- fixes #4143

task(payments-server): update payment form for new mobile flow

- fixes #4144

task(auth-server): remove lingering subhub references

task(payment-server): add payment confirmation component

- added cc brand to customer object in auth server
- added latest_invoice to subscription object in auth
- fixes #4143

task(payments-server): new subscription create page

- refs #3929

task(payment-server): adding payment confirmation page

- refs #3929

fix(payments-server): fix failing product route tests

- refs #3929
- refs #4311

task(123done): update links to stripe products

task(payments-server): listen for resize in product/index

task(payment-server): final cleanups for confirmation flow

feat(auth-server + payments-server): add billing_name to customer response

- updated the getCustomer response to include the billing_name
- updated tests and validators

fixes #4612

updated broken tests

task(payment-server): adding payment confirmation page

- refs #3929

fix(payments-server): fix failing product route tests

- refs #3929
- refs #4311

task(payments-server): payment and confirmation view follow ups

- fixes #4529
- fixes FXA-1382

task(payments-server): attempt at fix for confirm view height on tablet

task(payments-server): attempt at fix for confirm view height on tablet

task(payments-server): add interval_count to confirmation story

task(auth-server): add app links to download email

- fixes #3872

fix(styles): Minor FPN mobile enhancements tweaks

task(payments-server): svgo and l10n fallback tweak
2020-04-09 20:30:21 +00:00
Les Orchard 8058b26d20
fix(payments): ensure correct product name used in reactivation confirm dialog
- also get l10n working under Storybook, which made reproducing the
  issue easier

fixes #3819
fixes #4026
2020-02-04 14:26:37 -05:00
Les Orchard 3c6b13caea
chore(payments-server): fix Storybook build for missing App.scss
issue #3789
2020-01-06 20:12:27 -05:00
Lauren Zugai 1e035bc72a
refactor(payments) fix #1591,#1079,#2745: Better organize Redux modules and API calls, remove cruft, fix console warnings
Fix missed parameter

Remove comments

Move urls to and add more specific methods to apiClient

Refactor apiClient to exported functions to prevent passing instance around

Upgrade react-stripe-element package to get rid of console warning

Begin to fix tests, add apiClient.test.ts

Export actions from ./actions.ts (#1079), WIP

Init actions refactor

Continue moving actions into actions.ts

Add 'simple' actions from store to actions

Move selectors into selectors.ts

Move reducers into reducers.ts

Move thunks into thunks.ts

Export thunks and selectors individually

Fix selector imports, better typing

Fix failed api call tests

Remove unused code

selectors.ts 100% line coverage - remove LoadingOverlay selector (not used), remove ternary return

Thunks test coverage - display dialogue error if subscription cancellation fails

Remove unused cruft

Remove commented out code left from rebase

Fix #2745 - React Hook dependency warning
2019-10-04 15:22:40 -05:00
Les Orchard f5446b404a
fix(payments): fix storybook rendering since adding matchMedia to app context 2019-09-20 14:06:49 -04:00
Les Orchard 2fb2f24f67
fix(payments): ensure storybook gets a properly mocked-out app config
fixes #2098
2019-08-06 14:59:30 -07:00
Les Orchard 93eddbaac8
feat(payments): implement initial product page error states
fixes #1365
2019-06-13 17:50:30 -04:00
Les Orchard 39cc2feed0
feat(payments): move source for Tooltip screen info into AppContext
Also provides ScreenInfo from src/index.tsx
2019-06-13 12:26:18 -04:00
Les Orchard f87daacc0e
feat(payments): initial styles for Product sign-up page 2019-06-11 20:50:19 -04:00
Les Orchard aaa1815be4
feat(payments): shared route props in AppContext, mock Stripe in stories
issue #1365
2019-06-07 14:13:31 -04:00
Ian Bicking 1c54e449a0
feat(payments): fix #1280, consume configuration in payments frontend
This also changes the config naming on the frontend to match the server configuration.
2019-06-06 17:54:21 -05:00
Les Orchard 9f1ed3428e
feat(payments): initial work toward reusing content-server style layouts
issue #1101
2019-06-04 17:37:42 -04:00
Les Orchard d808cacdab
feat(payments): add storybook for UI work 2019-06-03 17:44:11 -04:00