artasparks / glift

Go Lightweight Frontend
MIT License
115 stars 33 forks source link

Add support for displaying a bounded sequence #120

Closed dormerod closed 8 years ago

dormerod commented 9 years ago

Glift currently provides the EXAMPLE and GAME_VIEWER widgets (among others), which are both useful for making lessons.

The EXAMPLE widget is nice because it simplifies the interface and removes distracting/confusing tools, and feels more like a book. The downside is that with very long numbered sequences, it can be hard for a user to interpret and visualize the sequence in their head, unless they're used to reading books and are already reasonably experienced with Go. Since examples aren't interactive, we quickly hit the limits of complexity in what can be displayed.

The GAME_VIEWER is nice because it lets the user step through a sequence move by move, making the content more accessible. The downside is that if there are many variations (assuming we have more than one variation in a single file), those will also be marked on the board and, regardless, the GAME_VIEWER widget displays more tools and has/will have more features than we might want in this scenario.

It would be very helpful to be able to display a bounded and unbranched sequence without having to create a new file for each one, with something like:

{
  "url": "/example.sgf",
  "initialPosition": "0.3",
  "finalPosition": "0.3.0.1.0.0",
  "widgetType": "SEQUENCE"
}

The idea is that this would display a single line of play (probably starting at the end, or maybe that needs to be specified) and let the user move back and forth through the sequence as they wish without being exposed to unnecessary controls or variations.

This might be best as a separate widget type.