bharbron / hexbook-semantic

An Electron-React-Redux-Semantic-UI application for automatically generating a hexcrawl campaign notebook from random tables.
5 stars 3 forks source link

Spike: Figure out how to create an auto-suggestion popup for CODEs and tags #29

Open bharbron opened 6 years ago

bharbron commented 6 years ago

When inputting result text for table entries, the expectation is that users will type things like:

There is a [[LANDMARK]] on the horizon

A [[RANDOM_ENCOUNTER:+night,-day]] is hidden in the darkness

Where [[LANDMARK]] means that the token will be replaced with the result of a random roll on the LANDMARK table. And +night,-day means that the night tag will be added to the filter chain and the day tag will be removed from the filter tag.

It would be really nice if we provided a list of auto-suggestions to users as they type.

e.g. They type A [[RAN, and we display a popup with all tables whose CODEs start with RAN. Or they've typed [[LANDMARK:+ni and we display a popup with all tags whose names start with ni. The user would be able to click on a suggestion to auto-complete the text.

As a reference, think how suggestions for emojis works in Slack.