Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+7 votes
in Q2A Core by
There are a lot of great plugins for Q2A that add extra functionality. But from what I have gathered, some ideas have been restricted to plugins as opposed to a proper integration into the program for years. Given the wide helpfulness that features like comment voting provide, I don't quite understand why they have not become a part of the core project. (Or am I mistaken in this case?)

Is there a distinction for when features will be added in a formal Q2A release instead of distributed via plugin? What kinds of new "features" might be considered for the main project instead of being developed as plugins?

1 Answer

+8 votes
selected by
Best answer

TL; DR: strictly answering the question in the title, I'd say: based on what makes more sense.

First of all, comment voting will be part of Q2A 1.8. Maybe you didn't know that but let's assume from now on that it won't be (as you could have given other examples too).

IMO, there are three issues that result in features not being in the core:

The "someone else will do it" issue

I do not decide what will or what will not be part of the core but, the same as you, I can create pull requests with new features to add to the core. I haven't created any pull request with this feature in the past, and you haven't either. Scott has been working on other features and it is my understanding that he has been prioritizing his personal/work life, and I absolutely support that, as he also needs money to live :) So if Scott, you or me don't write the code then it won't be part of the core ever. You could assume "someone else will do it" but most likely "someone else" will assume you will do it.

The "this plugin is so useful that it must be distributed with the core" issue

You could be thinking now that the "someone else will do it" issue does not apply to the comment voting feature because it is already here. However, it is still valid, as you can't just use the same code of the plugin and put it in the core. It needs to be adapted. You could, however, request the plugin to be added to the core as one of the plugins that gets distributed with it, such as the Event Logger plugin. However, doing that would mean also adding a lot of other plugins that might be unnecessary for most sites. A clear example of this is that very very few sites actually use the current comment voting plugin.

Also bear in mind that the more plugins that are distributed with the core, the more time they will take from Scott as he would be the one who will maintain them. Note even if you think it's the plugin developer's responsibility, to maintain the plugin, it is still Scott responsibility to check the code and decide whether to merge it or (or even adapt it). A clear example of this is Jatin's FlatBox theme and SnowFlat.

The "code standards" issue

Every project has its own rules, either explicit in a wiki or readme file or even implicit in the code itself. So there are some things that are acceptable and there are some other things that are not. Being able to understand them requires not only technical skills but also a lot of time taking a look at Q2A's code and, most likely, getting some pull requests rejected (and understanding the reason why that happened). If code does not meet those standards it is perfectly fine for it not to be there. Nobody would like to have a feature that performs low quality database queries and makes a page load to take 2 extra seconds.

These 3 issues should give you the background to answer most of your concerns. Regarding your last 2 questions, and assuming no feature is blocked by any of the previous issues, as I said before: what makes more sense. IMO, it makes more sense to have a minimalist core that doesn't exactly focus on providing features (except for the essential ones such as asking, answering, voting, etc) but rather on providing a rich API for plugin developers. That way any site owner will be able to adapt Q2A according to their needs, enabling the plugins they want, and plugin developers will be motivated to create new plugins because a good API would make things easy for them.

Awesome, thanks very much for the detail in this answer. The take away I'm getting is that if a pull request is made and is completely in keeping with Q2A's code writing conventions, and adds a feature that wouldn't be considered too "niche", then it might be considered for the core.  Would that be an accurate description? I guess that where the line is drawn for this is something that can be found with experience, regardless.
Good to hear that a comment voting feature will be in Q2A 1.8. Thanks for bearing with me on that, as you can probably tell I'm not overly familiar with plans for the upcoming release at this point. I'm curious: is the feature an adaption of the original plugin from years ago or is it something that has been written from scratch?
It is an accurate description. I'd add to that it doesn't have to black or white regarding code standards, but the closer to the core's style, the better.

Regarding the comment voting feature, it has been written from scratch. You can test it here: http://meta.question2answer.info
Good answer. I'll add that if you want to implement a new feature, it's best to post it here in the Q2A forum first so we can discuss it. A lot of people make suggestions that are better suited to a plugin. I wouldn't want anyone to spend hours adding code to Q2A just for it to be rejected.
I nodded so hard and frequently, not in tl;dr-induced sleep, but in absolute consension.
edited by
Just my 2 cents: 1. Comment voting is not needed IMO, probably interesting for some communities, but definitely not core and does not bring too much extra value. Fine for plugin! 2.  When reading about the theme, I just was remembered that q2a needs another theme engine, as the recent one is just too complicated for most :) 3. Over all, great job from all participants. 4. I'd like to see the on-site-notifications here in this forum to finally get notices about what is going on... Thanks mates! :)