Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat / Injectable component wrappers #598

Merged

Conversation

royschut
Copy link
Collaborator

@royschut royschut commented Aug 21, 2024

Injectable component wrappers

In #450, we introduced the Injectable components feature. This PR builds onto this and prepares the most common UI components. It will now be possible to implement a custom Card, Button, etc from the top-level (using Inversify), without having to replace the whole component tree. This should make it much easier to customize while keeping the source code sync, or build new platforms based on the same UI.

The process of implementing a custom component is described in the code comments of web/src/modules/register.

Steps completed:

According to our definition of done, I have completed the following steps:

  • Acceptance criteria met
  • Unit tests added
  • Docs updated (including config and env variables)
  • Translations added
  • UX tested
  • Browsers / platforms tested
  • Rebased & ready to merge without conflicts
  • Reviewed own code

@royschut royschut added the JWP Audit This PR needs a review from an JWP employee label Aug 21, 2024
@royschut
Copy link
Collaborator Author

I see that some e2e tests are broken. Although they are not caused by this PR, I spent a moment to research them:

  • I can see payment types - Cleeng: It seems that the Cleeng Adyen configuration is broken (config ozylzc5m). The /setup call fails.
  • I can finish my subscription with credit card - JW Player: It seems that the JWP configuration is broken as well (config a2kbjdv0). I can perform the payment, the access call succeeds, but the /subscription call returns a 500 server error:
    The API was not able to process this operation..

I suspect that the cancelation and invoices tests also fail because of this. @AntonLantukh or @dbudzins, perhaps you could check the configurations when you have a moment?

For now, I hope we can proceed with this PR.

* ```
*/

// Override ui-react component
// uiComponentContainer.bind<React.FC<TagProps>>(TAG_IDENTIFIER).toConstantValue(Tag);
// uiComponentContainer.bind<React.FC<CardProps>>(CardIdentifier).toConstantValue(CustomCard);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we already used this example right above.

@AntonLantukh AntonLantukh merged commit a6ad0d8 into jwplayer:develop Sep 4, 2024
7 of 9 checks passed
@royschut royschut deleted the feat/injectable-component-wrappers branch September 5, 2024 10:28
kiremitrov123 added a commit that referenced this pull request Sep 23, 2024
* feat(project): access bridge initial structure

* feat(project): yarn

* feat(project): add lint-staged

* feat(project): error for unused imports

* feat(project): remove not needed ls-lint

* feat(project): add access tests

* feat(project): rename error message

* feat(project): readme and docs

* chore: rename project in package

* feat(project): include SIMS authorization

* chore: replace jw/fet with standard prettier config

* chore: access-bridge changes to not trigger e2e tests

* chore: revert web env

* feat(project): add stripe products endpoint

* chore: yarn update

* feat(project): move types in common package

* feat(project): update allowed methods

* chore: rename stripe service fnc name

* feat(project): make authorization optional

* feat(project): redefine functions with obj params

* chore: consistent naming convention

* feat(project): add test fixtures

* feat(project): add tests for stripe

* feat(project): fine-tune error descriptions

* feat(project): add stripe checkout

* chore: move types in common

* chore: move types in common

* feat(project): add tests for stripe checkout

* feat(project): add more tests for checkout

* chore: stripe checkout params

* feat(project): add test mocks class

* feat(project): add metadata in stripe checkout

* feat(project): add viewer from auth token, handle plan external providers

* feat(project): add viewer from auth token, handle plan external providers

* chore: update readme

* feat(project): update docs

* feat(project): add account service

* chore: remove unused util fnc

* feat(project): add sentry

* feat(project): replace node with vite

* feat(project): refactor server to use express, refactor error handling as well as tests

* feat(project): add types for express

* chore: add .test in the test naimings

* fix: vite version mismatch

* feat(project): update docs

* chore: add dummy env variables in the test-unit-snapshot workflow

* feat(project): refactor services, decouple plans method

* feat(project): add sentry source mapping

* feat(project): add sentry version and environment

* chore: remove debug sentry

* feat(project): additional test build for not source mapping on test

* feat(project): add stripe billing portal endpoint

* chore: update readme

* chore: add stripe dummy secret on test-unit workflow

* chore: update checkout params

* feat(project): add cors middleware

* feat(project): add cors middleware

* feat(project): add site_id in the route

* feat(project): update port it can match google cloud run reqs

* feat(project): use newer version of node to make happy sentry

* feat(project): move error handling to the middleware

* feat(project): add refresh passport

* feat(project): simplify jw error usage

* feat(project): refactor routes and middlewares

* feat(project): refactor structure and namings

* feat(project): add missing case for refresh passport test

* feat(project): load envs at runtime

* fix(search): override search query cache (#594)

Co-authored-by: Mike van Veenhuijzen <mike@videodock.com>

* feat(project): app metadata insertion

* chore(project): add apple smart banner tag via env var
* chore(project): add android native banner data via env var
* refactor(project): make code more readable
* refactor(project): add itunes related application metadata
* refactor(project): function rename

* feat(project): add injectable wrapper to common components (#598)

* refactor(project): update services members visibility and explicit inject (#590)

* feat(project): remove free and productIds from content-types.json (#605)

* fix(e2e): fix tests after cleeng api update (#606)

* chore(release): v6.6.0

* feat(project): refactor routes and middlewares

* feat(project): rebase and stuff

* feat(project): add generic payment service that other services will implement

* feat(project): update products to use our own types

* chore: add site_id in .env.example

* feat(project): add stripe error handler in middleware

* chore: update readme

* chore: update comments on stripe payment service

* chore: remove unused type

* feat(project): update sentry and logger

* chore: node-version

* chore: revert node version

* chore: update comment on checkout controller

* chore: revert node version

* chore: revert env to default

* feat(project): modify types for products and prices

* feat(project): add deployment file and docs

* chore: update readme paths

* feat(project): remove mode from checkout params

* feat(project): remove stripe type

* chore: remove vite build file

---------

Co-authored-by: langemike <mikevv@gmail.com>
Co-authored-by: Mike van Veenhuijzen <mike@videodock.com>
Co-authored-by: Roy Schut <roy@videodock.com>
Co-authored-by: Christiaan Scheermeijer <christiaan@videodock.com>
Co-authored-by: Carina Dragan <92930790+CarinaDraganJW@users.noreply.github.com>
Co-authored-by: Anton Lantukh <alantukh@jwplayer.com>
Co-authored-by: Conventional Changelog Action <conventional.changelog.action@github.com>
This was referenced Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JWP Audit This PR needs a review from an JWP employee
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants