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

35 Коммитов

Автор SHA1 Сообщение Дата
Reino Muhl 407c7e3cdb
Merge pull request #16586 from mozilla/fxa-8821-l10n-bundle-load
feat(l10n): add localizer class for payments next
2024-03-22 09:25:27 -04:00
Reino Muhl 695d791b15
feat(l10n): add localizer class for payments next
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
2024-03-22 08:58:53 -04:00
Lisa Chan ee8a93f92f
Merge pull request #16605 from mozilla/FXA-8820
feat(l10n): Add localization scripts/targets to payments-next
2024-03-21 21:10:51 -04:00
Lisa Chan ad714efd00
feat(l10n): Add localization scripts/targets to payments-next 2024-03-21 20:42:55 -04:00
Lisa Chan 25bcf355ed
feat(shared-assets): Create library for shared assets 2024-03-20 18:54:49 -04:00
Reino Muhl f80ba7ff45
feat(l10n): update l10n ftl scripts for nx apps v2
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
2024-03-14 10:41:02 -04:00
Reino Muhl a11256cb50
feat(next): add l10n grunt scripts
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
2024-03-08 10:53:25 -05:00
dependabot[bot] 2eb94047e7
chore(deps): bump next from 14.0.2 to 14.1.0
Bumps [next](https://github.com/vercel/next.js) from 14.0.2 to 14.1.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.0.2...v14.1.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 09:34:08 -05:00
Reino Muhl 275ecdb0b8
feat(next): reorg checkout pages
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
2024-02-22 13:06:09 -05:00
Reino Muhl 36230779b6
Merge pull request #16449 from mozilla/fxa-7522-next-auth-setup
feat(next): add NextAuth
2024-02-22 10:26:43 -05:00
Reino Muhl 3ab897e629
feat(next): add NextAuth
Because:

* Need to be able to authenticate with FxA

This commit:

* Add NextAuth to facilitate promp and no prompt signin with FxA.

Closes #FXA-7522
2024-02-21 16:59:05 -05:00
Reino Muhl 7ebc865705
feat(auth): allow prompt=none without hint
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
2024-02-15 13:28:09 -05:00
Lisa Chan de80c7f1bc
Merge pull request #16271 from mozilla/hackathon_bonus
chore(next): Hackathon bonus tasks
2024-02-12 14:06:24 -05:00
Reino Muhl 2df7ca494a
chore(nx): upgrade to nx 18
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
2024-02-12 09:01:00 -05:00
Lisa Chan c830f10f0e
chore(next): Bonus tasks - update Error page to include error mapping, update pages to include l10n 2024-02-08 10:23:54 -05:00
Meghan Sardesai 317f5eb7fc
feat(next): Hackathon error page
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.
2024-01-24 00:39:31 -05:00
Lisa Chan cd5bac1a35
chore(payments): Success Page 2024-01-19 11:18:03 -05:00
Meghan Sardesai 5b1862ef2d
chore(payments-next): reference Mozilla logo in `fxa-react`
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
2023-12-04 11:28:52 -05:00
dependabot[bot] 3f5950ce1f
chore(deps): bump next from 13.4.1 to 13.5.0 in /apps/payments/next
Bumps [next](https://github.com/vercel/next.js) from 13.4.1 to 13.5.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v13.4.1...v13.5.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-25 18:52:40 +00:00
dschom 761bcbb980
task(payments): Activate mozilla brand l10n strings
Because:
- We want to use the Mozilla branding

This Commit:
- Activates the l10n strings for Mozilla branding

Note, the previous l10n ids are still present, and need to be so until branding has gone live and baked. Removing these strings too soon could result in issues if we have to rollback a change set.
2023-10-17 18:27:36 -07:00
Lisa Chan 71662e6824
fix(libs): Revise Common Content to include newsletter metadata fields 2023-10-17 08:59:41 -04:00
dschom 155f8d389d
task(many): Update favicons
Because:
- We want to use the 'm' as the favicon
2023-10-13 17:27:14 -07:00
Reino Muhl b3a81a4870
feat(payments): rework nest config loader
Because:

* Nest app config loader needs to support uppercase env vars

This commit:

* Adds support for uppercase env vars to Nest app config loader
* Update MySQLConfig to handle normalization
* Fixes issue loading l10n ftl files

Closes #

Co-authored-by: Ben Bangert <ben@groovie.org>
2023-10-11 09:47:27 -04:00
Reino Muhl 9a4a92aa9a
fix(payments): config file missing in build
Because:

* payments-next heartbeat api returns 500 due to missing config file.

This commit:

* Reorders nest-typed-config loaders so that fileLoader is first, which
  results in an empty .env.json file to be included in the
  payments-next build.
* Adds normalization step to config loader, for non-string values.

Closes #
2023-10-10 11:03:13 -04:00
Reino Muhl 63e5ab95fd
feat(libs): move fxa-shared/l10n to libs/shared/l10n
Because:

* We want to use functions from fxa-shared/l10n in new libs/* libraries
  including libs/shared/contentful.

This commit:

* Moves fxa-shared/l10n to libs/shared/l10n
* Updates all references in packages/*

Closes #FXA-8228
2023-10-04 16:08:01 -04:00
Ben Bangert 27baba65a6
chore: update next to 13.5 and polish heartbeat return
Because:

* We want to use the newer Next.js.
* We want to use proper Next.js JSON return handling.

This commit:

* Updates to Next.js 13.5.1.
* Updates the heartbeat routes to use the new JSON return handling.
2023-09-19 11:18:09 -07:00
Reino Muhl 534ca6cc8b
Merge pull request #15795 from mozilla/initial-work-polish
feat(next): adjust component styles and polish checkout page
2023-09-15 17:55:07 -04:00
Reino Muhl 8fa9dd70f1
feat(next): adjust component styles
Because:

* With components split into libraries, we don't want to include styles
  in components that are defined/provided by the application consuming
  the components
* Split common JSX into smaller components where it makes sense
* Continue down the div reduction path

This commit:

* Removes non-global CSS files
* Where applicable, replace divs with landmarks that add more value
  for example lists and sections.
* Added <ListLabelItem> to PurchaseDetails component
* Remove unused styles
* Replace non-reused tailwind utility classes with inline declerations

Closes #
2023-09-15 17:38:01 -04:00
Ben Bangert 551ab6f906
feat(payments): add initial NestJS service load on heartbeat
Because:

* We want to load/cache the NestJS services on the first request to the
  app, so that the first request is not slow.
* We should use proper NextJS project organization.

This commit:

* Adds a new route to the app that the loadbalancers utilize, to ensure
  that the NestJS services are loaded before the first request to the
  app.
* Moves internal implementation that shouldn't be routed to, behind the
  underscore directory prefix.
2023-09-15 12:20:11 -07:00
Ben Bangert e97fd383b8
feat: add nestJS service loading to payments-next
Because:

* We want to be able to call server-side logic with our business classes
  directly from the nextJS app before rendering on the server.

This pull request:

* Adds a NestJS application context to the NextJS app that can be used
  to load services and call methods on them.
2023-09-14 09:45:37 -07:00
Reino Muhl 3894a65527
feat(next): payments-next initial work
Because:

* Create the initial work for the Checkout page as a starting point and
  example for the rest of the SP3 components and pages.

This commit:

* Adds the payments/next/ui Next.js library.
* Move Header JSX into layout.tsx and remove ExampleHeader component.
* Add RSC PurchaseDetails, using JSX from SP2.5 PlanDetails component.
* Add RSC TermsAndPrivacy component
* Add various stubs functions for illustration purposes. These will be
  replaced with actual implementations in future tickets.
  * Cart fetch
  * Contentful fetch
  * Translation using @fluent/bundle

Closes FXA-8133
2023-09-12 14:24:39 -04:00
Meghan Sardesai a999afd748
chore(next): add Storybook to NextJS setup
Because:

* We want to include Storybook in 3.0.

This commit:

* Ensures Storybook component loads as expected.
* Ensures shared Tailwind styles can be used in payments-next and works with hot-reloading.
* Ensures the build script executes without any errors.

Closes FXA-7503
2023-09-11 17:26:30 -04:00
dschom d96797ae6a
task(CI): Improve nx caching for CI pipelines
Because:
- Not all CI operations where taking advantage of NX caches

This Commit:
- Adjusts nx.json config to ensure correct caching behavior
- Adjusts nx.json config to ensure proper target chains. ie build is dependent on pre-build
- Uses nx to directly run integration tests
- Uses nx to directly run unit tests
- Phases out dependency on generated .list files
- Ensures 'start up' for services for functional tests is done with nx and uses nx caches.
- Creates nx tags to facilitate test commands
- Fixes linter errors encountered
- Updates docker images to nx for builds
- Updates nx ignore files
2023-08-29 11:19:54 -07:00
dschom 535498214a
task(many): Switch nx test target to be test-unit
Because:
- The CI already targets test-unit
- We want to draw a distinction between unit and integration tests.

This Commit:
- Renames "test" to "test-unit" in lib packages.
- Sets up CI to run integration tests on 'libs' folder packages
- Adds tags to nx projects in libs folder
2023-08-03 15:38:16 -07:00
Lisa Chan d4bf24117c
chore(next): Add Next.js to fxa and initial setup 2023-07-19 14:57:15 -04:00