Skip to content

Add Interactive#867

Merged
clone1018 merged 24 commits intoGlimesh:devfrom
aMytho:feature/interactive
Mar 2, 2023
Merged

Add Interactive#867
clone1018 merged 24 commits intoGlimesh:devfrom
aMytho:feature/interactive

Conversation

@aMytho
Copy link
Contributor

@aMytho aMytho commented Sep 29, 2022

Adds Interactive to Glimesh
See building Glimesh post for more info.

Current Status

Currently, the zip files are stored with waffle. The extracted files (what are served to the user) are stored and served locally. This will need to be changed in production. A few other changes will need to be made but I wanted to get some of this reviewed before going any further.

Other Changes

  • New scope interactive
  • New channel/db fields interactive_enabled and interactive_project
  • New /interactive route
  • Channels now have an interactive toggle next to the follow button
  • New API fields
    • Mutation: sendInteractiveMessage Sends an interactive message to a project
    • Subscription: interactive Listens for interactive events

Run the example project

An example project is attached. You will need to unzip it and make the following changes.
exampleProjectConfetti.zip

  • Update client ID in public/script.js
  • Change the import SRC of the JS script to your channel ID. (1 is the default ID)
  • Re-zip the project. Make sure to zip the files, not the folder.

Now to enable it -
Channel settings -> Interactive

  • Enable interactive
  • Upload the zip
  • Save

Go to your channel and press the interactive button. It should display the project.

Click to show confetti. Alternativly, send the mutation over the API as shown in the js file.
You don't need the interactive scope but you will need the ID of your channel (sessionID)!

@aMytho aMytho marked this pull request as draft September 29, 2022 04:33
@aMytho
Copy link
Contributor Author

aMytho commented Dec 20, 2022

Updated to no longer use zip files. Using a waffle_ecto PR, we are able to upload arrays instead of just single items. Interactive projects are now an array of files.

A default project will be loaded if the user has it enabled, but no project has been uploaded. The Interactive button will not be shown if the user doesn't have it enabled.

The last thing to do is to ensure old files are being removed from storage (see discord conversation)

@aMytho aMytho marked this pull request as ready for review December 20, 2022 21:56
@clone1018 clone1018 merged commit 10e9e37 into Glimesh:dev Mar 2, 2023
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.

2 participants