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

React Native: Split bf-wc-component into bf-wc-dom #3316

Closed
1 task done
compulim opened this issue Jul 20, 2020 · 1 comment · Fixed by #3543
Closed
1 task done

React Native: Split bf-wc-component into bf-wc-dom #3316

compulim opened this issue Jul 20, 2020 · 1 comment · Fixed by #3543
Assignees
Labels
area-react-native feature-request Azure report label p1 Painful if we don't fix, won't block releasing
Milestone

Comments

@compulim
Copy link
Contributor

compulim commented Jul 20, 2020

Additional context

Update 1 (2020-09-25)

Instead of creating a new package bf-wc-dom, I think we should refactor the hooks into bf-wc-core.

  • bf-wc-core is cross-platform
    • At some points of time in the future, we want to make Redux less visible by replacing everything with hooks or props
    • Then, we can turn Redux into (another form of) chat adapter
      • If you want to build with your own service, implement our Redux store
      • We should do some experiment here, we already have a pretty good chat adapter
      • Or maybe, we can "clear DLJS responsibilities" using this Redux store
  • bf-wc-component is for HTML
  • bf-wc-native-component is for React Native
  • bf-wc (the entrypoint) will detect/treeshake if it's from HTML or React Native
    • Goals:
      • Clear distinctions between 2 entrypoints
      • Devs won't easily mix up HTML or RN version of components (i.e. won't load HTML side of JS inside RN entrypoints)
    • We might need to work on import 'botframework-webchat/hooks/useStyleSet' and other treeshaking features

To-do

Update 2 (2020-09-25)

I think we should still keep core away from React. So I am thinking this layering:

  • core: internally Redux
    • We want to looks platform agnostic and hide the fact that we are using Redux
    • This is a "bridge to chat adapter", hide all the complexity and weirdness about the chat adapter
  • api: Our API, depends on core
    • Currently React Hooks API
    • Future, if we want to use new API format, we could, import useActivities from 'botframework-webchat-api/hooks/useActivities
  • component: React DOM components, depends on api
    • We can't rename, but the name implies botframework-webchat-react-component
  • react-native-component: React Native components, depends on api
  • bundle: Webpack entrypoint to component and native-component, tree-shakable and good isolation between DOM and RN
@compulim compulim self-assigned this Jul 20, 2020
@compulim compulim added p0 Must Fix. Release-blocker R11 labels Jul 24, 2020
@compulim compulim added this to the R11 milestone Aug 10, 2020
@corinagum corinagum added feature-request Azure report label and removed Enhancement labels Sep 23, 2020
@corinagum corinagum removed the R11 label Sep 30, 2020
@cwhitten cwhitten added p1 Painful if we don't fix, won't block releasing and removed p0 Must Fix. Release-blocker labels Oct 14, 2020
@compulim
Copy link
Contributor Author

Now, the packaging became:

image

@compulim compulim mentioned this issue Oct 29, 2020
48 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-react-native feature-request Azure report label p1 Painful if we don't fix, won't block releasing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants