Expanded the state to take account of the ListState item the LayoutDirection and the AppMode
Created two enum that takes account of the possible mode and orientation of the UI. That enum takes into account the possibility to expand to different app layout and modes.
The chunks function that return the layout must take in account the state of the application, so now has another parameter that takes in account the state of the app
Introduced a pattern for match the different layout_orientation and mode in order to draw the UI
As the task title could be larger than the menu I've made a helper function, namely ellipse_if_too_long that checks if the title is greater than the space in the list, if it does cut the displayed title and draw an ellipsis .... This doesn't modify the task title but only displays it in the UI. The MAX_CHARSconst takes in account this value and is based on the MENU_WIDTH constant. The last one provides the number of columns that the vertical menu spans. In the config yaml file you could see that i put a long entry in the tab list just for showing the desired effect
I've also introduced the two keybindings for layout switching Tab and for the mode change m (for menu).
For the Tabs horizontal layout I've seen there is an issue related with the scrolling (the highlighted tab doesn't get visualized in the UI), but I suppose that someone else it's working on that.
Waiting for review.
ListState
item theLayoutDirection
and theAppMode
enum
that takes account of the possible mode and orientation of the UI. Thatenum
takes into account the possibility to expand to different app layout and modes.chunks
function that return the layout must take in account the state of the application, so now has another parameter that takes in account the state of the applayout_orientation
andmode
in order to draw the UIellipse_if_too_long
that checks if the title is greater than the space in the list, if it does cut the displayed title and draw an ellipsis...
. This doesn't modify the task title but only displays it in the UI. TheMAX_CHARS
const
takes in account this value and is based on theMENU_WIDTH
constant. The last one provides the number of columns that the vertical menu spans. In the config yaml file you could see that i put a long entry in the tab list just for showing the desired effectTab
and for the mode changem
(for menu).Tabs
horizontal layout I've seen there is an issue related with the scrolling (the highlighted tab doesn't get visualized in the UI), but I suppose that someone else it's working on that. Waiting for review.