WildcatIP / other.js

The Chatternet feature platform
GNU Affero General Public License v3.0
7 stars 1 forks source link

command composability #30

Open aza opened 8 years ago

aza commented 8 years ago

EXPLORATION AND IDEA FUZZING

This pseudo spec is an exploration of @tonygentilcore's insight that /album #foo can create an album container whose contents are back by channel #foo. It's a vein that goes deep. This is meant to be interpreted as a sketch/brainstorm .

Background: #20, #17

In particular, this explores what happens when (1) you can create a container that embeds (part) of another channel, and (2) you can compose commands.

/channel

Syntax is super strawman and is [|....]. Maybe we can borrow from CSS selectors? Not sure what an interface for selecting a message, or message range would look like.

It seems that being able to reference messages and (parts) of channels is a fundamental building block of many of our actions.

Rechat, for example, can be though of as a styled /channel #fromchannel:message followed by an appropriate /caption.

composability

A natural extension of commands is to let them be composable. Why not plug the output of one into the input of another?

With composability, it makes it fast to define new containers/behaviors... without leaving the iOS client!

For example (very pseudo):

Now imagine this:

Uses calculator (#29)

You can imagine how this can be extended to creating buttons/polls/voting:

// SUPER PSEUDO
var msg = new Message('/h2 Do you like #bb?')
msg.add('/button{label="Yes"} /button{label="Extra Yes"}')
msg.find('.button').on('click', function( evt ){ ... })
client.channel.post( msg )

/fullscreen

maybe /app? what if there are multiple messages in the same channel with /fullscreen?

aza commented 8 years ago

Quoting @mtkurlowski:

tonygentilcore commented 8 years ago

Love this. Seems super powerful.

tonygentilcore commented 8 years ago

This issue was moved to other-xyz/time-cone#80