Alright, I’ll bite…
Part of the beauty of an open-source system is that we have developers of all skill levels contributing en masse to help make the world a better place. Everybody is at a different level of programming competence, and it’s not really fair to call someone a noob purely on the grounds that they used a coding convention that you would deem inappropriate, whether it is correct or not. I might even go so far as to say that such remarks are irrelevant and counter-productive – this is a support queue, not a complaints line, and YOU are the one asking for a favor.
After all, if you can do it better… why don’t you? A simple answer might be because it takes time, probably time that you don’t have. So instead of making off-topic remarks, let’s focus on the core issue and be appreciative of the time it took to create this plugin. Talking down to people makes you come across as having an inflated ego and that sets others up to discriminate against you.
That said, your tone comes across well and is generally supportive, so thank you on that front! It is way too easy to come across as a jerk when one might simply trying to provide constructive feedback.
In the spirit of providing constructive criticism and working towards a solution, let’s see if we can turn this around!
< /hypocritical off-topic rant >
I’m starting to dig into this plugin as well and having difficulty applying some custom scripting to the plugin filters. Having all of these elements set to IDs instead of classes makes it challenging to write efficient Javascript selectors!
It also seems that some of the HTML structure forces the display of some elements in ways that work against established styles.
- Would it be possible to convert the ID items to classes?
- Could we add extra classes to aid in addressing items?
- Some of the wrapper attributes are counter-intuitive, could these be grouped more appropriately?
- Would it be a better idea to let themes style list items instead of forcing
<br />
tags into the page structure?
As an example, the id bug-library-filter-currentproduct
appears twice in the filters list. While this is technically invalid HTML since ID attributes should be unique, it would be totally valid as a class! It looks like there are some even-odd attributes set as IDs as well that could benefit from a class conversion.
Sometimes it can be tough for developers to work around forced line breaks. I’m currently styling the filters and attempting to create a more horizontal layout, and having breaks at the end of each line makes it hard to accomplish. I could use CSS to display:none
the <br />
elements, but then what if those elements were needed for a single section? Perhaps it is easier to let themes decide how to display elements… and that means less work for the plugin developer as well! As an alternative, elements can be styled for block or inline display to produce desired results.
A very minor adjustment might be to move the bug-library-currentfilters
div into the bug-library-filters
div to provide structure consistency. This is a totally cosmetic change though and is subjective to the author.
Here’s a proposed update to the bug-library.php file: https://pastebin.com/s2BXaAia. This file cleans up some of the filter HTML – it doesn’t touch the rest of the code, but it might serve as an example for how classes could work just as well (if not better) than IDs.
I do see that there are more areas in this file with numerous
characters that could probably have some restructuring applied as well, but… I don’t have time right now ??
@yannick – thanks for your hard work on this plugin!
@cory – thanks for opening this topic! I’m Eric, and I live in Victoria BC, nice to meet you ??