Skip to content

Commit

Permalink
chore: Update documentation
Browse files Browse the repository at this point in the history
-Update documentation with new feature lazy and theme_color parameters
  • Loading branch information
SkyZeroZx committed Oct 30, 2023
1 parent dbcf293 commit 87df70f
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 523 deletions.
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
Angular component for Facebook Messenger Plugin

Ngx Facebook Messenger offers a lightweight alternative, optimizing user experiences by significantly reducing the initial load size, ensuring smoother page performance, and enhancing overall website efficiency

Currently Facebook Messenger Plugin **killed** the core web vitals when load


**Before** of implementation of plugin

![Sample Before](/docs/sample_before.jpg)

**After**
**After**

![Sample After](/docs/sample_after.jpg)

Expand Down Expand Up @@ -64,7 +63,7 @@ Example of position left in the plugin with botton 36px , and custom background

```scss
#ngx-facebook-messenger {
background: #8278ff;
background: #8278ff;
}
```

Expand All @@ -87,7 +86,7 @@ Example of position left in the plugin with bottom 36px , and custom background
}
```

Note : This SCSS code is valid when applied in style base of all proyect , when applied directly in component use !important
Note : This SCSS code is valid when applied in style base of all proyect , when applied directly in component use !important

# API

Expand Down Expand Up @@ -127,6 +126,12 @@ export interface NgxFacebookMessengerOptions {
* Init Plugin Options
*/
initPluginOptions?: {
/**
* Init plugin by default Facebook Messenger Oficial lazy ( when click in the fake button )
* when is false init eager ( killed your web vitals )
* @default true
*/
lazy?: boolean;
/**
* If required showDialog
* @default true
Expand All @@ -138,6 +143,13 @@ export interface NgxFacebookMessengerOptions {
* @default 600
*/
debounceTime?: number;
/**
* Property of attribute for theme_color color in oficial Facebook Plugin Messenger
* Default take your configuration setting in Facebook Account
* If not it's configure take blue default color
* @default null
*/
theme_color?: string;
/**
* When the user is logged with your account show a greeting text in the Facebook Plugin Messenger
* @default 'Hello, how can we help you?'
Expand Down Expand Up @@ -215,14 +227,14 @@ export enum SIZE_BUTTON_DESKTOP {

# Outputs

| Output | Description |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| xfbmlRender | Emitted when xfmblRender in the DOM |
| customerChatShow | Emitted when the customer Chat Show ( Oficial PLugin Facebook ) |
| Output | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| xfbmlRender | Emitted when xfmblRender in the DOM |
| customerChatShow | Emitted when the customer Chat Show ( Oficial PLugin Facebook ) |
| customerChatLoad | Emitted when the customer Load , At this point, the plugin is not necessarily mounted in the DOM( Oficial PLugin Facebook ) , This output is replace for own implementation of mutation observer detect the Chat Plugin is load and mounted in the DOM |
| customerChatHide | Emitted when the customer chat Hide ( Oficial Plugin Facebook ) |
| dialogShow | Emitted when the customer chat show Dialog ( Oficial Plugin Facebook ) |
| dialogHide | Emitted when the customer chat hide Dialog ( Oficial Plugin Facebook ) |
| customerChatHide | Emitted when the customer chat Hide ( Oficial Plugin Facebook ) |
| dialogShow | Emitted when the customer chat show Dialog ( Oficial Plugin Facebook ) |
| dialogHide | Emitted when the customer chat hide Dialog ( Oficial Plugin Facebook ) |

# Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ <h1 class="text-2xl font-bold mb-4">Inputs</h1>
* Init Plugin Options
*/
initPluginOptions?: &#123;
/**
* Init plugin by default Facebook Messenger Oficial lazy ( when click in the fake button )
* when is false init eager ( possible killed your web vitals )
* @default true
*/
lazy?: boolean;
/**
* If required showDialog
* @default true
Expand All @@ -51,6 +57,13 @@ <h1 class="text-2xl font-bold mb-4">Inputs</h1>
*/
debounceTime?: number;
/**
* Property of attribute for theme_color color in oficial Facebook Plugin Messenger
* Default take your configuration setting in Facebook Account
* If not it's configure take blue default color
* @default null
*/
theme_color?: string;
/**
* When the user is logged with your account show
* a greeting text in the Facebook Plugin Messenger
* @default 'Hello, how can we help you?'
Expand Down
36 changes: 24 additions & 12 deletions libs/ngx-facebook-messenger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
Angular component for Facebook Messenger Plugin

Ngx Facebook Messenger offers a lightweight alternative, optimizing user experiences by significantly reducing the initial load size, ensuring smoother page performance, and enhancing overall website efficiency

Currently Facebook Messenger Plugin **killed** the core web vitals when load


**Before** of implementation of plugin

![Sample Before](/docs/sample_before.jpg)

**After**
**After**

![Sample After](/docs/sample_after.jpg)

Expand Down Expand Up @@ -64,7 +63,7 @@ Example of position left in the plugin with botton 36px , and custom background

```scss
#ngx-facebook-messenger {
background: #8278ff;
background: #8278ff;
}
```

Expand All @@ -87,7 +86,7 @@ Example of position left in the plugin with bottom 36px , and custom background
}
```

Note : This SCSS code is valid when applied in style base of all proyect , when applied directly in component use !important
Note : This SCSS code is valid when applied in style base of all proyect , when applied directly in component use !important

# API

Expand Down Expand Up @@ -127,6 +126,12 @@ export interface NgxFacebookMessengerOptions {
* Init Plugin Options
*/
initPluginOptions?: {
/**
* Init plugin by default Facebook Messenger Oficial lazy ( when click in the fake button )
* when is false init eager ( killed your web vitals )
* @default true
*/
lazy?: boolean;
/**
* If required showDialog
* @default true
Expand All @@ -138,6 +143,13 @@ export interface NgxFacebookMessengerOptions {
* @default 600
*/
debounceTime?: number;
/**
* Property of attribute for theme_color color in oficial Facebook Plugin Messenger
* Default take your configuration setting in Facebook Account
* If not it's configure take blue default color
* @default null
*/
theme_color?: string;
/**
* When the user is logged with your account show a greeting text in the Facebook Plugin Messenger
* @default 'Hello, how can we help you?'
Expand Down Expand Up @@ -215,14 +227,14 @@ export enum SIZE_BUTTON_DESKTOP {

# Outputs

| Output | Description |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| xfbmlRender | Emitted when xfmblRender in the DOM |
| customerChatShow | Emitted when the customer Chat Show ( Oficial PLugin Facebook ) |
| Output | Description |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| xfbmlRender | Emitted when xfmblRender in the DOM |
| customerChatShow | Emitted when the customer Chat Show ( Oficial PLugin Facebook ) |
| customerChatLoad | Emitted when the customer Load , At this point, the plugin is not necessarily mounted in the DOM( Oficial PLugin Facebook ) , This output is replace for own implementation of mutation observer detect the Chat Plugin is load and mounted in the DOM |
| customerChatHide | Emitted when the customer chat Hide ( Oficial Plugin Facebook ) |
| dialogShow | Emitted when the customer chat show Dialog ( Oficial Plugin Facebook ) |
| dialogHide | Emitted when the customer chat hide Dialog ( Oficial Plugin Facebook ) |
| customerChatHide | Emitted when the customer chat Hide ( Oficial Plugin Facebook ) |
| dialogShow | Emitted when the customer chat show Dialog ( Oficial Plugin Facebook ) |
| dialogHide | Emitted when the customer chat hide Dialog ( Oficial Plugin Facebook ) |

# Methods

Expand Down
Loading

0 comments on commit 87df70f

Please sign in to comment.