-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from morganstanley/gatsby-theme
Gatsby theme migration
- Loading branch information
Showing
76 changed files
with
8,590 additions
and
15,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: GH Page Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
working-directory: ./site | ||
|
||
permissions: | ||
contents: write | ||
packages: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@morganstanley' | ||
- run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: npm run build | ||
- name: Deploy | ||
uses: crazy-max/ghaction-github-pages@fbf0a4fa4e00f45accd6cf3232368436ec06ed59 # v4.1.0 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: docs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: GH Page PR Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
working-directory: ./site | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@morganstanley' | ||
- run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: npm run build |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
order: 1 | ||
title: Documentation | ||
--- | ||
|
||
<Hero title="Message Broker"> | ||
The Message Broker is a Typescript library which aims to provide asynchronous | ||
communication between typescript components. It leverages the RxJS library to | ||
facilitate a pub/sub pattern and accepts user-defined contracts to ensure type | ||
safety across messages. | ||
</Hero> | ||
|
||
<Toc /> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
order: 1 | ||
title: Homepage | ||
--- | ||
|
||
import GettingStarted from './getting-started.mdx'; | ||
|
||
<Hero title="Message Broker"> | ||
The Message Broker is a Typescript library which aims to provide asynchronous | ||
communication between typescript components. It leverages the RxJS library to | ||
facilitate a pub/sub pattern and accepts user-defined contracts to ensure type | ||
safety across messages. | ||
</Hero> | ||
|
||
<section className="content"> | ||
<Article title="Background"> | ||
This project was written at Morgan Stanley to provide an internal messaging system for large scale UI systems. | ||
The project was later Open Sourced so others could benefit from it. | ||
</Article> | ||
<Article title="Use cases"> | ||
Here is an example of a usecase in which the Message Broker could be useful. | ||
|
||
#### Notification system | ||
|
||
Let's say you have some document uploading functionality in your UI. | ||
The uploading may take up to a minute and you don't want the user to have to wait, so once the upload is complete you want to have a pop-up notification appear which tells the user that their upload was successful. | ||
|
||
The code for your pop-up notification can live anywhere in your codebase, and can "listen" for a "document_uploaded" message using the MessageBroker. | ||
Now all that needs to happen is for the document upload service to publish that message when the upload completes. | ||
|
||
**Note:** that with this model, our document uploading service doesn't even have to know about the existence of the notification service, so everything is nice and decoupled. | ||
|
||
#### Mediator Pattern | ||
|
||
More generically, the Message Broker essentially acts as a [Mediator](https://refactoring.guru/design-patterns/mediator) for your components. | ||
Any time you would apply the Mediator pattern, the Message Broker is the perfect solution to avoid you some boilerplate coding. | ||
|
||
</Article> | ||
<Article title="Alternatives"> | ||
List of alternatives to the Message Broker. | ||
|
||
- [BullMQ](https://docs.bullmq.io) | ||
- Relies on Redis | ||
- [@node-ts/bus](https://bus.node-ts.com) | ||
|
||
Both of these alternatives lack the same level of type safety that the Message Broker provides. | ||
</Article> | ||
<Article title="Getting Started"> | ||
<GettingStarted /> | ||
</Article> | ||
|
||
</section> |
Oops, something went wrong.