line-wrap recipes

This is a partial solution to #48, and way better than nothing.
However, it's a bit difficult to read the wrapped recipes; ideally the
continuation lines would be indented, so it would be easy to tell
visually where a new recipe starts. But it doesn't seem possible
to do this given the current `brick` API.  I've created an upstream
issue for it here: https://github.com/jtdaugherty/word-wrap/issues/8
This commit is contained in:
Brent Yorgey 2021-09-24 10:04:07 -05:00
parent ac16448485
commit cdaef2decc

View File

@ -246,7 +246,7 @@ explainFocusedItem s = case mItem of
mItem = mList >>= BL.listSelectedElement >>= (Just . snd)
explainRecipes :: Entity -> [Widget Name]
explainRecipes = map (txt . prettyRecipe) . recipesWith
explainRecipes = map (txtWrap . prettyRecipe) . recipesWith
recipesWith :: Entity -> [Recipe Entity]
recipesWith e = S.toList . S.fromList $