-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chat-headless: remove session storage support in favor of local storage
Removes all references and usages of session storage in favor of local storage. This means that conversation state will now persist across pages as well as refreshes, so long as all pages are on the same hostname. TEST=manual,auto Updated unit tests, saw them pass. Ran local test page and refreshed, closed tabs, reopened. State persisted always.
- Loading branch information
Showing
17 changed files
with
79 additions
and
79 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
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ https://www.npmjs.com/package/generate-license-file | |
|
||
The following npm package may be included in this product: | ||
|
||
- @babel/[email protected].5 | ||
- @babel/[email protected].6 | ||
|
||
This package contains the following license and notice below: | ||
|
||
|
21 changes: 21 additions & 0 deletions
21
packages/chat-headless/docs/chat-headless.chatheadless.initlocalstorage.md
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,21 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/chat-headless](./chat-headless.md) > [ChatHeadless](./chat-headless.chatheadless.md) > [initLocalStorage](./chat-headless.chatheadless.initlocalstorage.md) | ||
|
||
## ChatHeadless.initLocalStorage() method | ||
|
||
Loads the [ConversationState](./chat-headless.conversationstate.md) from local storage, if present, and adds a listener to keep the conversation state in sync with the stored state | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
initLocalStorage(): void; | ||
``` | ||
**Returns:** | ||
|
||
void | ||
|
||
## Remarks | ||
|
||
This is called by default if [HeadlessConfig.saveToLocalStorage](./chat-headless.headlessconfig.savetolocalstorage.md) is true. | ||
|
21 changes: 0 additions & 21 deletions
21
packages/chat-headless/docs/chat-headless.chatheadless.initsessionstorage.md
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
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
8 changes: 4 additions & 4 deletions
8
...ss.headlessconfig.savetosessionstorage.md → ...less.headlessconfig.savetolocalstorage.md
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/chat-headless](./chat-headless.md) > [HeadlessConfig](./chat-headless.headlessconfig.md) > [saveToSessionStorage](./chat-headless.headlessconfig.savetosessionstorage.md) | ||
[Home](./index.md) > [@yext/chat-headless](./chat-headless.md) > [HeadlessConfig](./chat-headless.headlessconfig.md) > [saveToLocalStorage](./chat-headless.headlessconfig.savetolocalstorage.md) | ||
|
||
## HeadlessConfig.saveToSessionStorage property | ||
## HeadlessConfig.saveToLocalStorage property | ||
|
||
Whether to save the instance's [ConversationState](./chat-headless.conversationstate.md) to session storage. Defaults to true. | ||
Whether to save the instance's [ConversationState](./chat-headless.conversationstate.md) to local storage. Defaults to true. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
saveToSessionStorage?: boolean; | ||
saveToLocalStorage?: boolean; | ||
``` |
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
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
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
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
Oops, something went wrong.