WildcatIP / other.js

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

command composability #160

Closed tonygentilcore closed 7 years ago

tonygentilcore commented 7 years ago

From @tonygentilcore on August 24, 2016 21:21

From @aza on August 11, 2016 23:51

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?

Copied from original issue: other-xyz/other.js#30

Copied from original issue: other-xyz/time-cone#80

tonygentilcore commented 7 years ago

From @aza on August 12, 2016 1:28

Quoting @mtkurlowski:

tonygentilcore commented 7 years ago

Love this. Seems super powerful.

tonygentilcore commented 7 years ago

Dupe against original #30