Improve workflow for theming
See original GitHub issueI’m trying to build a custom theme (templates+css) for Conversejs, that will use Bootstrap and Fontawesome, and even after reading the documentation for theming here I don’t really understand how I’m supposed to work, and what is the workflow for creating a new theme. Here are a couple of issues I noticed:
- The mockups are fairly useless when modifying the templates, mainly because they are completely static. Is there a way to generate mockups files from the templates files (e.g. a script that concatenates all the files into one static html)? Or better, is there a way to make the mockups files more dynamic (e.g. make them render the javascript templates with placeholder values)?
- There is no
make templates
in the Makefile. The only way is tomake build
which also triggersjsmin
, which takes forever. I have found that I can run./node_modules/.bin/grunt jst
to rebuild thetemplates.js
, but this isn’t documented anywhere. Awatch
task (similar tocompass watch
) to rebuildtemplates.js
everytime a file is changed could be very useful here. - Some things are hardcoded in
converse.js
file. For example, I am trying to use a Bootstrap nav for the controlbox tabs, but it needs a class named “active” on theli
element, whereas Conversejs uses a class named “current” on thea
element. - I am a bit concerned as to the maintenance of the theme. As the moment, the only way I can think of is to maintain my own github fork, make my own custom build, and tell Bower to install Conversejs from my fork. I will have to rebase my fork from upstream on a regular basis to stay up-to-date. I don’t see how custom themes can be easily distributed with this workflow. So is this the right way? Couldn’t the themes be separated from the main build (e.g. with two files:
converse.js
andconverse-theme-X.js
that contains the templates, and possibly custom js for the theme)? - This last point isn’t strictly about theming, but I think it’s related to the general workflow: it’s quite difficult to remove unwanted locales, and redundant dependencies (such as
typeahead.js
, already included in my site), without modifying some core files (namelymain.js
and some others), which again makes maintenance more difficult (this is related to #82).
So what is the correct workflow for creating and maintaining a custom theme? If I’m doing something wrong, please feel free to point me to the right direction. I’m also willing to help if needed, but I’m not a JS dev so I’ll need some directions.
List of template-related things hardcoded in the JS
- Tabs (don’t know yet how to fix this)
-
pure-button
inrenderConfigurationForm
andrenderRegistrationForm
. Could be replaced by a template (like the form_* templates) -
display:none
form the roster filter form. It would be nice to have a class instead, so I can customize the appearance (e.g. instead of hiding it completely, I would like to dim it)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
<bountysource-plugin>Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 8 years ago
- Comments:19 (18 by maintainers)
Top Results From Across the Web
13 Ways to Improve Your Office Workflow - Business.com
Below are 13 ways you can improve your workflow and watch your office productivity grow. 1. Clearly communicate tasks and processes. Communication is...
Read more >How To Use Day Theming For Productivity (With Examples)
No matter the type of work you do, setting daily themes can help you increase productivity and focus on the things that matter....
Read more >The Step-By-Step Guide to Improving Workflow Efficiency
Measuring a workflow is one of the most important steps to improving its efficiency. It allows you to define quantifiable metrics and establish ......
Read more >How To Improve And Refine Your WordPress Theme ...
Take advantage of the hierarchy.. Keep code simple and manageable by moving repeated sections of code to their own template files. For example, ......
Read more >Speed up Your Workflow When Building WordPress Themes
Suggestion 1 – Prepare a Starter Theme · Suggestion 2 – Maintain the Same Coding Style and Approaches · Suggestion 3 – Improve...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You make some good points and suggestions. I’d be keen to improve things further, but currently all work on this have to be done in my free time, unless people contract me to do something.
I’m seriously considering making a proprietary, paid-for add-on for converse.js which might help me fund more development on this project.
Yes, I think in light of that, this ticket can be closed.
Tabs are no longer there, the contact add form is in a modal and the
pure-button
class is no longer used.