Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My changes replace the current dom creation with an njk template. This should make it easier to add new features, especially to the display of tasks. The significant new feature I added is to allow the user to determine which columns are displayed and in what order just by listing the columns in the "DisplayOrder" config option.
Some things could be removed because their features are in the template:
-removed table-building methods (table-building is done by the template)
-converted addDueDateCell method to addDueDate method, which keeps the internationalization but strips out the table building parts (and uses specific CSS classes)
-removed javascript calculation of word width and text wrapping (these features are handled in the CSS with ch units)
Additions necessary to use the template include:
-adding javascript to MMM-Todoist.js to convert some of each task's information into a template-ready format
-adding "colorMap" to map colors represented in the API as text or as numbers into hex codes
New features using the new template include:
-adding colored flags to the priority column (set by priorityColors option in config)
-adding an additional column displaying the number of days until the task is due
-adding "displayOrder" config option to display which columns and in which order
-adding "displayProjectAs" config option to display project name, project color, or both
-adding "displayColumnHeadings" config option to display table headers as text or as icons (to save space)
-adding labels displayed in translucent bubbles
-adding Todoist URL to hotlink avatars
If I were a more experienced coder, I would have probably found ways to restrain the number of changes necessary to implement the template. But, alas, there were plenty of things I did not foresee and changes piled up in the debugging. So this merge is not going to be an easy one--and may not be interesting enough to you to invest the time needed to do the merge. I'd be happy to help or talk more about the pull request.