Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting to Template #116

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

mossglenn
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant