StateVoicesNational / Spoke

mass-contact text/SMS distribution tool
Other
463 stars 405 forks source link

Feature Request: Animated Gif sidebox on send completion #1644

Closed schuyler1d closed 4 years ago

schuyler1d commented 4 years ago

Problem Let's celebrate texters finishing their message sends!

Solution Create a TEXTER_SIDEBOX implementation that upon getting to the end of sends shows a configurable (animated) gif.

Context

  1. There is a new TEXTER_SIDEBOX extension framework where you can add a directory here: https://github.com/MoveOnOrg/Spoke/tree/main/src/integrations/texter-sideboxes (maybe celebrate-finish or something in this case) --
  2. make a file in that dir called react-component.js
  3. Use one of the existing sideboxes as an example: https://github.com/MoveOnOrg/Spoke/blob/main/src/integrations/texter-sideboxes/contact-reference/react-component.js
  4. The admin component should have a text field with a url for an animated gif
  5. showSidebox function should use navigationToolbarChildren variable properties to test whether it's at the end of texting (see https://github.com/MoveOnOrg/Spoke/blob/main/src/components/AssignmentTexter/Toolbar.jsx for properties of that object)
  6. Maybe use /demo/text for testing, but change https://github.com/MoveOnOrg/Spoke/blob/main/src/components/AssignmentTexter/Demo.jsx#L27 total to the same as currentIndex -- at least for testing to see if it's shown when it's equal and hidden when it's not.

in your .env file (once you get some basic functions implemented), make sure to add e.g. TEXTER_SIDEBOX=celebrate-finish for development. Create

ibrand commented 4 years ago

This was already completed