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

Full stack/refactor internal session vars - adapt frontend code to botState data model #1967

Conversation

vanbasten17
Copy link
Contributor

@vanbasten17 vanbasten17 commented Oct 19, 2021

Description

Adapt frontend code to work with BotState internals instead of Session. Handoff features has been changed partially as they are not totally implemented nor production ready

Context

Part of splitting botonic data models into User, Session and BotState.

Approach taken / Explain the design

To document / Usage example

Testing

The pull request...

  • has unit tests
  • has integration tests
  • doesn't need tests because... [provide a description]

@vanbasten17 vanbasten17 changed the title chore(react): changes in webchat regarding move to botState model Full stack/refactor internal session vars - adapt frontend code to botState data model Oct 19, 2021
@vanbasten17 vanbasten17 marked this pull request as ready for review October 20, 2021 10:02
Copy link
Contributor

@asastre asastre left a comment

Choose a reason for hiding this comment

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

LGTM!! Just 2 small comments.

packages/botonic-react/src/experimental/webchat-app.jsx Outdated Show resolved Hide resolved
updateSession(merge(initialSession, session))
}
if (initialBotState) {
updateBotState({ ...initialBotState, ...botState })
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not doing a merge here?

@vanbasten17 vanbasten17 force-pushed the full-stack/refactor-internal-session-vars-backend branch from a295c73 to ee9657a Compare October 29, 2021 15:07
@vanbasten17 vanbasten17 force-pushed the full-stack/refactor-internal-session-vars-frontend branch from 9ff6e5d to dde5fa6 Compare October 29, 2021 15:14
@github-actions
Copy link

github-actions bot commented Oct 29, 2021

Unit Test Results

  1 files  ±0    7 suites  ±0   3m 28s ⏱️ ±0s
32 tests ±0  32 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit dde5fa6. ± Comparison against base commit ee9657a.

♻️ This comment has been updated with latest results.

@vanbasten17 vanbasten17 changed the base branch from full-stack/refactor-internal-session-vars-backend to master October 29, 2021 15:17
@vanbasten17 vanbasten17 changed the base branch from master to full-stack/refactor-internal-session-vars-backend October 29, 2021 15:17
@vanbasten17 vanbasten17 merged commit e85f900 into full-stack/refactor-internal-session-vars-backend Oct 29, 2021
@vanbasten17 vanbasten17 deleted the full-stack/refactor-internal-session-vars-frontend branch October 29, 2021 15:19
vanbasten17 added a commit that referenced this pull request Oct 29, 2021
…State data model (#1966)

* chore(dev-template): remove warnings in Actions and sort imports

* chore(dev-template): project changes regarding botState data model

* chore(core): split data models into User, Session and BotState

* chore(api): changes regarding botState in botonic/api

* chore(core): core-bot and router logic to work with botState

* chore(core): adapt tests to work with botState model, disabling handoff tests for 1.0

* Full stack/refactor internal session vars - adapt frontend code to botState data model (#1967)

* chore(react): changes in webchat regarding move to botState model

* refactor(core/api/dev-template): remove initial locale and minor fixes

* refactor(react): remove locale from initial session and make use of merge func
vanbasten17 added a commit that referenced this pull request Oct 29, 2021
…o be changed into experimental (#1948)

* chore(react): move necessary files to be changed into experimental and update imports

* chore: add more necessary files to be changed

* Full stack/refactor internal session vars - adapt backend code to botState data model (#1966)

* chore(dev-template): remove warnings in Actions and sort imports

* chore(dev-template): project changes regarding botState data model

* chore(core): split data models into User, Session and BotState

* chore(api): changes regarding botState in botonic/api

* chore(core): core-bot and router logic to work with botState

* chore(core): adapt tests to work with botState model, disabling handoff tests for 1.0

* Full stack/refactor internal session vars - adapt frontend code to botState data model (#1967)

* chore(react): changes in webchat regarding move to botState model

* refactor(core/api/dev-template): remove initial locale and minor fixes

* refactor(react): remove locale from initial session and make use of merge func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants