#143: Forums New Thread Styling and Functionality Discussion

(Updated on )

Don’t be mad, but I had to jump ahead a little bit because there was some grueling long boring work of overriding different views by putting the right files in the right places in our Vanilla forums themes. We’ve gone over this a few times so it was nothing new.

This time, we start the way again, finding a particular view that needs some design attention, finding the correct view, and overriding it in our own theme. This time, the screen for creating a New Discussion. We find it quickly by doing some “Find in Project” stuff for a string of text we know exists in that view. Then we test out our override by putting the word “fart” in the view and seeing if it shows up. Classy, right?

One thing we do right away is strip out some stuff. For example, we remove the “Announce” checkbox since that’s an annoying feature we don’t want anyone using anyway. We remove the “cancel” link because it doesn’t do anything more than just navigating away from the page does.

Then we fiddle around with a bunch of spacing. The spacing itself is easy. The hard part is deciding exactly which class to use, if we should add a new class, and how those classes might affect things elsewhere in the forums, and if that is a good or bad thing. Essentially, the classic struggles of a CSS developer!

Then we run into a bummer problem. When we click into the textarea to write the body of a new forum thread, the textarea collapses down very short. This is definitely some JavaScript getting involved. It probably did (or tried to do) something smart in the past, but something has changed so that now it’s worse than doing nothing. Who knows what changed. Some CSS that is now gone perhaps, maybe a different version of jQuery, maybe a missing ID, who knows. Point is, we have the power to figure it out and fix it. There is also another bug where deleting a post seems to work great, then refreshes the page when it doesn’t need to.

We end the screencast talking about WYSIWYG text editors. We’ll definitely need one of those on the textarea to make crafting a post easier. I’ve had luck with Mark It Up! So we’ll likely go that route. Technically, not a WYSIWYG editor, but nothing really is on the web.