Because:
- Starting and restarting payments-next takes a long time due to always
building the app first, which isn't necessary during development.
- When changes are made to NestApp or its dependencies, these are not
hot reloaded by Next.js, requiring a full Next.js restart.
This commit:
- Adopt Nx plugin for Next.js which more closely aligns with Next.js
standard dev commands.
- Retained Nx Next.js executors for build, since it more closely fits
into the current FxA build and deploy CI logic.
- Added a watcher to NestApp which calls a NestApp restart api, only
available in development, to restart the NestApp on any changes.
- Adds a function to get the NestApp, instead of a const, thus ensuring,
in dev mode, the latest NestApp is always returned.
Closes #FXA-9706
Because:
- During development it could be useful to start only parts of the stack
needed for development on specific domains.
This commit:
- Provides additional stack startup options to only start specific parts
of the stack, by using nx projects and tags.
Closes #FXA-9771
Because:
* Populate the customer display name from the Payments Next frontend
* Temporarily provide a way to easily set email on the cart
* Subscription creation on Payments Next was failing due to missing
priceId.
This commit:
* Includes displayName in stripe checkout server action
* Adds temporary input and server action to update cart.email
* Adds the missing priceId to subscription creation
Closes #
Because:
* Fluent LocalizationProvider is currently initialized on the client
causing noticable load times for client components.
This commit:
* Initialize ReactLocalization on the server
* Wrap near root layout with LocalizationProvider as suggested by
Nextjs docs.
Closes #
Because:
* We want to validate cart and customer have matching credentials.
This commit:
* Completes the TODO list:
* Validates stripeCustomerId on the cart.
* Revalidates total amount against upcoming invoice.
* Validates customer eligibility for target plan.
* Validates customer address, tax eligibility, and promo code (if applicable).
* Cancels incomplete subscriptions.
* Updates tests where applicable.
Closes FXA-8951
Because:
* During development some console errors and warnings were introduced
* Improve developer experience and code quality of payments next
This commit:
* Update imports in Payments Next from root project directory
* Resolve browser console errors
* Added missing CSP content items
* Removed Layout image width to remove next/image warning
* Resolved server console error related to nest-typed-config
* Extract CheckoutForm button into PrimaryButton component
* Added Stripe Public API key config variable
* Updated checkout page headings
* Updated Stripe Payment Element to use accordion
* Added ConfigProvider for client components
Closes #FXA-9625
Because:
* Add consent checkbox, reminder error tooltip and payment section with
default disabled state.
This commit:
* Adds a new client component for the consent checkbox and implements
a Radix holdover component for the error tooltip.
* Adds PaymentSection client component.
Closes: #FXA-7806
Because:
* Add the Stripe Payment Element to the checkout page
* Be able to checkout and successfully add a new payment method and
new subscription.
This commit:
* Adds the PaymentElement to the StripeWrapper
* Adds the Subscribe Now button
* Adds the Full Name field
* Updates the NestApp with Firestore and StatsD provider factories
Closes #FXA-8850 and #FXA-7810
Because:
* Stay up to date with latest next-auth/authjs beta releases
This commit:
* Updates to latest beta version
* Removes env vars no longer needed
Closes #FXA-9543
Because:
* Attempt to perform a no prompt authentication request to FxA when
customer is first navigated to Payment Next
This commit:
* Adds a landing route to initiate the no prompt signin
* If user is authenticated, add FxA uid to cart
* Add signin error page to handle FxA error for unauthenticated users
* Add placeholder generic error page.
Closes #FXA-7523
Because:
* We want to start adding Stripe client elements to the checkout page.
This commit:
* Adds Stripe SDK to a client component, which is added to Checkout.
* Adds middleware to add CSP to page requests.
Closes #FXA-8847
Because:
* We want a service to manage checkout behaviors
This commit:
* Adds a checkout service
Closes FXA-9020
Closes FXA-8943
Closes FXA-9022
Closes FXA-8941
Because:
* Pages were still calling mock get cart
This commit:
* Adds getCartOrRedirect to all pages
* Redirects to appropriate page if cart.state does not much current page
Closes #FXA-9039
Because:
* Use Next.js standard environment variable procedure
* Provide typed config to be used throughout Payments Next.
This commit:
* Refactor config to use Next.js native environment loaders
* Remove .env.json and .env.production.json
* Add validator and transformer functions to provide
validated and typesafe config.
Closes #FXA-9436
Because:
* Need a server action to handle errors returned from Stripe elements
submit function.
This commit:
* Creates handleStripeError action and related Nextjs Action Service
* Adds checkoutErrorCart to Cart Service
* Add cart.utils
* Add tests for cart.utils and checkoutErrorCart
Closes #FXA-8851
Because:
* Call CartService.setupCart from payments-next via server action.
This commit:
* Extracts fxa-geodb into libs/* library
* Updates CartService to include GeodbManager
* Call setupCart from payments-next
Closes #FXA-8892
Because:
* Want to use Next.js instrumentation featuer to start NestApp on
Next.js server startup.
This commit:
* Upgrades Next.js to version 14.2 which includes intrumentation fixes.
* Adds instrumentation logic.
Closes #
Co-authored-by: Ben Bangert <100193+bbangert@users.noreply.github.com>
Because:
* Ensure all localization strings can be localized in React Server
Components.
This commit:
* Removes LocalizerServer
* Adds LocalizerRSC to serve as a wrapper for ReactLocalization that can
be used by React Server Components, as well as a few other utility
methods.
* Adds LocalizerRscFactory that instantiates LocalizerRSC only with
bundles for a provided acceptLanguage string.
* Adds LocalizerRscFactoryProvider to be used with the NestApp to
instantiate and then intialize the LocalizerRscFactory. Initalization
will fetch all messages from disk and populate the bundles.
* Reorganize shared/l10n library to match Node style guide
* Removes demo l10n code
* Update purchase-details, terms-and-service components, and success and
error pages to use new LocalizerRSC class for localization.
* Adds temporary l10n-convert script to provide translation for existing
ftl strings.
Closes #FXA-8822
Because:
* Create a localizer class that can be used by payments next react
server components.
* Only generate fluent bundles once on startup.
This commit:
* Moves logic from Localizer class, defined in
`fxa-auth-server/lib/l10n/index.ts`, to a LocalizerBase class.
* Adds LocalizerServer class to be used by payments next.
* Moves nestapp from payments-next app to a library
Closes #FXA-8821
Because:
* Fluent ftl files need to be added to apps in the nx apps/ directory.
This commit:
* Updates bundle and prime scripts to support the apps/ directory, without affecting existing packages apps.
Closes #FXA-8823
Because:
* Add grunt script used to manage and update l10n ftl files used by
payments next
This commit:
* Adds grunt scripts copy:branding-ftl, concat:ftl and watch:ftl
Closes #FXA-8819
Because:
* Reorganize checkout pages to include intent and cartId in path, and
allow for landing page.
This commit:
* Reorganizes checkout pages
* Add checkout landing page
* Add getLocaleFromRequest and update l10n locale logic
Closes #FXA-7804
Because:
* Allow prompt=none signin even if login_hint or id_token_hint is not
provided, as the current spec has these as optional parameters.
This commit:
* For prompt=none signin, if login_hint or id_token_hint is not provided
it allows successful signin.
* For prompt=none signin, if login_hint or id_token_hint are provided
it keeps the current checks as is.
Closes #FXA-9035
Because:
* Want to migrate Nx to latest
This commit:
* Migrate nx to 18 using nx cli migrate latest
* Readd a few dev dependancies back into packages/**/package.json
* Behavior of `npx nx...` commands seems to have changed, resulting in
multiple "command not found: <library>" errors, where <library>
refers to libaries used in packages/**/package.json scripts, such as
tailwindcss, tsc-alias, nx, etc.
* Updates nx cache location for Circle CI
Closes #FXA-8880
Because:
* We want to start building out pages in preparation for M3.
This commit:
* Introduces a fully accessible desktop version for the error page.
* Hackathon demo.
Because:
* `payments-server` and `payments-next` can reference the svg in
`fxa-react` and remove image duplication.
This commit:
* References Mozilla logo in `fxa-react`.
* Removes duplicate media.
* Removes legacy code.
Closes FXA-6309