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

Remove server-side infrastructure so developers can bring their own #24

Merged
merged 14 commits into from
Nov 20, 2024

Conversation

bgastelo
Copy link
Contributor

@bgastelo bgastelo commented Nov 11, 2024

https://www.pivotaltracker.com/story/show/188540638

This library contains phlex components and closely related JS/CSS.

  • Remove "server-side infrastructure" (WS, rack, etc.)
  • Refactor some components to expect inheritance for usage (instead of assuming usage of WS/rack server)
    • These Phlex components should provide more of an "Abstract" Chat interface, but the developer is expected to actually wire everything up in the back-end. I.e. Hook up the form, stream data to browser, etc.
    • Rename "Source" to "Modal::Reference"
    • Source a concept of our chatbot, whereas a Modal Link is something anyone could use.
  • Add entrypoint "phlex/chatbot/rails" so that we can easily configure assets in a Rails environment.
    • This is entirely optional. If you use Sinatra or another framework, you can still use the Phlex components and CSS/JS.
  • Rewrite some stimulus controllers to simplify their behavior

TODO:

  • Refactor components to use inheritance and Phlex slots for customization
    • The Message should really just be an empty card and the slots header body footer
    • For Example, in our chatbot implementation we can add the "Copy" and "Regenerate" links
  • Fix hotkeys for form submission (needs to also work w/ turbo if we are using it)
  • Rename project to phlex-chat
  • Add nice documentation and maybe link to example Rails repo

@bgastelo bgastelo marked this pull request as ready for review November 13, 2024 00:16
@bgastelo bgastelo changed the title Replace wsc Remove server-side infrastructure so developers can bring their own Nov 13, 2024
@bgastelo bgastelo marked this pull request as draft November 14, 2024 22:58
@bgastelo bgastelo marked this pull request as ready for review November 19, 2024 20:17
lib/phlex/chatbot/rails.rb Show resolved Hide resolved
@hedgeye-cchang hedgeye-cchang merged commit ac72183 into master Nov 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants