Things I'm currently working on... (And not making progress on.)

Nao

  • Dadman with a boy
  • Posts: 16,079
As mentioned in another topic... Let's see my uncommitted files one by one.
This topic is mainly to satisfy Pete's curiosity, if it exists. Also evaluate whether we'll have conflicts, and for anyone to give me their opinion on some topic when I'm unsure which way I should fix something...

It may also give you an insight into a genius madman's mind... :lol:

- Class-CSS: just disables can_flex manually... It's a hack. For testing.  I still don't know what's best anyway.

- Class-DB: another file I've had in this state for months... It simply removes the return false on __clone(), and moves __construct() to the getInstance() code. I was planning to modify all files to do simpler things like that, but then I realized I really wasn't the guy to do the proper OO code optimizations, and I left it hanging... I'm guessing I'll leave it that way for another couple of years. Until I'm bored disabling the file's commit status, and remove my code. Maybe you want to do this kind of thing yourself...? Or maybe you think it's pointless..? I just don't think __construct() and getInstance() should both be in a class, as they have the same purpose really.

- Class-Notification: minor and short optimizations... Planning to commit this along with the rest of my notification changes.

- Feed: uhh... Just a spacinazi. But I'm not committing it, as it's a reminder that I should change all <' . '? strings to just have <?, since it's not going to change anything, and only ?> needs to be escaped... (Unless I'm wrong? In which case, there are plenty of files we need to fix!)

- JSEditor: part of my AJAX rewrite (i.e. remove Xml.template.php, and move everything to use returnAjax)

- JSModify: part of my AJAX rewrite

- Notifications: part of my Notifications rewrite

- QuoteFast: part of my AJAX  rewrite

- Subs-Cache: this one has two changes:
   - part of my quote escaping rewrite in JSE (code related to $txt handling inside JS files),
   - and a stand-alone change that optimizes CSS filesize for Chrome and Firefox, by using a magic trick. It's actually been in use at Wedge.org for a few weeks, but I can't decide whether to commit or not, because (1) it's not a free hack, it takes time to run, (2) it only saves about 100 bytes... :(, (3) there's an alternative solution that involves moving my code to CSS files and only have a fallback implemented in Subs-Cache, it'd be more solid, but also more confusing to CSS developers...

- Subs-Template: has three changes...
   - part of my Prism implementation; i.e. better syntax highlighter. Never finished that, as it doesn't play well with... flexbox. Ah.
   - a one-liner that converts underscores to dashes in classes and ID's, at runtime. Only keeping it in there as a reminder that, well... It actually compresses worse :(
   - part of my quote escaping rewrite in JSE (restore quotes after moving inline events.)

- Subs:
    - my returnAjax hacks...
    - my quote escaping rewrite in JSE -- not finishing it yet, because of issues with Wess.

- Suggest: part of my AJAX rewrite

- Home.template: a playground to see how I can easily vertically align embedded icons next to text, instead of having to use vertical-align. Well, although it does work, it also implies a site-wide rewrite, which I'm not excited about... So I'm leaving this as a reminder, again.

- index.template: part of my Notifications rewrite (moved the main skeleton's block there, for logical reasons.)

- ManagePermissions.template: part of my quote escaping rewrite in JSE.

- Notifications.template: part of my Notifications rewrite

- editor.js: I actually got rid of the iframe, in Wysiwyg mode... But couldn't figure out how to fix focus when clicking buttons.

- moved notifications.js to script.js, and heavily rewrote it.

- sbox.js: an IE hack that I never committed, for some reason... Probably because it works without the hack, but 'officially' I should be using the hack, so... This one has been in the file for at least a year. Every time I've committed sbox.js, I've ensured I didn't commit that single line change... I'm silly.

- topic.js: my flexbox fallback. It doesn't work in Firefox, so I'm not committing...

- editor.css: part of the Wysiwyg iframe rewrite. Saves 400 bytes of text, mostly comments...

- index.css: part of my Notifications rewrite

- sections.css: part of my flexbox hack. Uncommittable...

- Wine/extra.css: fixes some issues, but adds more issues in Warm -- and as I can't fix-commit Warm, I'm leaving this here.

- Warm/extra.css: quite a visible overhaul of the Warm skin... Only, I like the current one BETTER. Don't ask me... I should post screenshots, and ask for opinions. Generally speaking anyway, I'm thinking of tearing the skin apart and making it a Web 2.0-style skin.

- Xml.template.php: will eventually go away, part of my AJAX rewrite...

So, there you go. We've got about 4-5 main features I'm working on at the same time, none of which are ready for primetime (except maybe notifications).

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Things I'm currently working on... (And not making progress on.)
« Reply #1, on April 7th, 2013, 09:16 PM »
Quote
Also evaluate whether we'll have conflicts, and for anyone to give me their opinion on some topic when I'm unsure which way I should fix something...
Actually, there wouldn't appear to be any conflicts ;)

My pending:
* update index.english-uk.php to specify the correct locale of en_GB rather than en_UK.
* bug fix for ManageModeration.template.php due to what I'm still convinced is a jQuery bug but one I can't reproduce myself outside of Wedge, nasty fix.
* everything else is related to the warnings replacement, which also strips out the last of the old code related to post moderation permissions (and all the attendant language strings etc.) and replaces it with the new infractions system and post-moderation-from-infractions as well as post-bans that are based on infractions... it's complicated but it hits a *ton* of files. But I think I hit most of the stuff that needed to be done, followed by slowly slogging through replacing the UI that needed to be replaced for the new features. It's slow and thoroughly frustrating :/


Sounds like you got some fun things ahead, all sounds good to me, including the general returnAjax thing you have in mind :)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Oracle

  • Posts: 78

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Things I'm currently working on... (And not making progress on.)
« Reply #3, on April 8th, 2013, 06:51 PM »
Quote from Arantor on April 7th, 2013, 09:16 PM
Actually, there wouldn't appear to be any conflicts ;)
Great :)
Quote
My pending:
* update index.english-uk.php to specify the correct locale of en_GB rather than en_UK.
Yes, good!
It's still saying hreflang="en" in index.template.php, should I update it myself..? Just so I don't forget...
Quote
* bug fix for ManageModeration.template.php due to what I'm still convinced is a jQuery bug but one I can't reproduce myself outside of Wedge, nasty fix.
Ah, these weird bugs eh..?
I've been fighting for half an hour on my local install trying to figure out why my notifications disappeared. Turns out if was because all plugins had been disabled. Then I re-enabled them, played again, and ten minutes later... Bam, they were disabled, once again, all of them! I don't know why... The only thing I did today, was to move my forum to a different folder, and update the database to reflect it. I can understand the first time they got disabled, but not the second...
Quote
* everything else is related to the warnings replacement, which also strips out the last of the old code related to post moderation permissions (and all the attendant language strings etc.) and replaces it with the new infractions system and post-moderation-from-infractions as well as post-bans that are based on infractions... it's complicated but it hits a *ton* of files. But I think I hit most of the stuff that needed to be done, followed by slowly slogging through replacing the UI that needed to be replaced for the new features. It's slow and thoroughly frustrating :/
I'm still not sure what the difference is going to be between warning and infractions, but I trust it'll be better... ;)
Quote
Sounds like you got some fun things ahead, all sounds good to me, including the general returnAjax thing you have in mind :)
Oh, regarding that... I've split it into three different functions, return_raw, return_xml and return_json, which do exactly what they say. It adds about 120 bytes to the source file, but it also has the benefit of variable parameters, so... It's all good I'm guessing. I chose camel_case because, well, redirectexit doesn't say redirectExit, does it..? :^^;: And that's a bit similar to it, I'd say...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Things I'm currently working on... (And not making progress on.)
« Reply #4, on April 8th, 2013, 07:01 PM »
Quote
Yes, good!
It's still saying hreflang="en" in index.template.php, should I update it myself..? Just so I don't forget...
No, you shouldn't. hreflang as far as I can tell is actually supposed to use ISO-630-1 codes, for which en-GB is not valid. In fact, it's two characters only as I documented elsewhere.
Quote
I've been fighting for half an hour on my local install trying to figure out why my notifications disappeared. Turns out if was because all plugins had been disabled. Then I re-enabled them, played again, and ten minutes later... Bam, they were disabled, once again, all of them! I don't know why... The only thing I did today, was to move my forum to a different folder, and update the database to reflect it. I can understand the first time they got disabled, but not the second...
You did update *all* the paths?
Quote
I'm still not sure what the difference is going to be between warning and infractions, but I trust it'll be better...
The old warning system will no longer exist. Everything will be infractions going forward. I already removed the old configuration area, I'm just finishing up the admin page before I move onto the last thing - which is the actual 'issue infraction' screen.
Quote
Oh, regarding that... I've split it into three different functions, return_raw, return_xml and return_json, which do exactly what they say. It adds about 120 bytes to the source file, but it also has the benefit of variable parameters, so... It's all good I'm guessing. I chose camel_case because, well, redirectexit doesn't say redirectExit, does it..? :^^;: And that's a bit similar to it, I'd say...
So you went under_score rather than camelCase? Cool beans. Makes sense.
Re: Things I'm currently working on... (And not making progress on.)
« Reply #5, on April 9th, 2013, 05:29 AM »
OK, so I've hit something of a wall... I'm going to need to make more extensive changes than I thought because of the mess (and it is a mess, frankly) that is the profile area. It seems all over the place, like having separate view/issue warning areas. While I'm diving in there, I'm going to be making broader changes to reorganise things. I'll be talking more about this when I get there!

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Things I'm currently working on... (And not making progress on.)
« Reply #7, on April 9th, 2013, 10:12 AM »
Re: profile area, all I'd like to say is that my plans for it are to make it close to the noisen.com profile style, i.e. have more info on the main page, and/or split stuff into immediately-loaded tabs, and more importantly, have a preview of the last couple of posts they sent. Perhaps we can do without profile comments at this point (1.0), though...

Also:

- I'm giving up on inline Wysiwyg for now. Not that it's not doable -- everything worked, except for focusing, i.e. clicking on smileys would send them to the beginning of the post. I had a few sample scripts under the hand that purported to make focusing work, but I had a look at my compared filesizes for iframe and non-iframe versions, and figured it wasn't worth the trouble... non-iframe version = 8120 bytes, iframe version = 8304 bytes. For CSS, the iframe version is only 4% bigger (and also more complex, but much less complex than the SMF version anyway.)
I think it's safe to say that it definitely isn't worth spending a week on that, and I prefer to cut my losses at an afternoon's worth of work (weeks ago.) I'm keeping a copy of my other version aside, 'just in case', but don't expect anything from me in the near future.

- Crap, I still have that minor bug where, when I use smart quote splitting, an extra blank line is inserted after the automatically-added quote opener... I see no reason for that. It's annoying! Perhaps a Chrome bug, I dunno..?

- Plugins being disabled: this morning, they came out as disabled again... All of them. It's starting to annoy me! I went to phpMyAdmin, did a full export of my database, and searched for 'pristine' (the name of my test sub-folder), and it was nowhere to be seen. It's not in Settings.php either... Honestly, I don't know the plugin code well enough to debug it, at least for now. Do you have any idea where this could be coming from, then...? I don't remember having a single problem in the past, before my pristine temp changes.

- In a similar fashion, the debug option in the admin area, the one that shows debug info at the bottom of the page, regularly disables itself in my local install. I've never, ever disabled it manually. But I just had a look, and no surprise, it's disabled. I remember re-enabling it two weeks ago... Always enabling db_show_debug, not touching the other options (e.g. 'Admin only')...
Quote from Arantor on April 8th, 2013, 07:01 PM
No, you shouldn't. hreflang as far as I can tell is actually supposed to use ISO-630-1 codes, for which en-GB is not valid. In fact, it's two characters only as I documented elsewhere.
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=189077
They say the region is optional.
I looked into the w3 standards page, and it got complicated... They only give two-letter examples, but the format specifies a Language-Code, which in turn links to a page that explains it can either be a two-letter code, or anything that's acceptable, such as 'en-GB', or even 'x-klingon'... (Ah, geeks...)
So, I guess Google is right in that respect. They don't expect you to use more than a two-letter language code. They just offer you, well, the ability to specify your regional codes in case there are differences. So, ideally... I guess we should have 'en' for English US, 'en-GB' for English UK, and 'fr' for France.

I'd suggest going for a route that tests whether two languages have the same two-letter code, and if they do, use $txt['lang_locale'] instead of $txt['lang_dictionary'], except for 'English US', which gets 'en' either way (so that we have a fallback.) It takes some processing, though... And I'd like to have a fallback for each repeated language, but how do we determine the fallback, apart from adding yet another $txt entry such as $['lang_fallback'] = 1..?
Well, if we had to add a new entry, might as well do $txt['lang_href'] = 'en-GB' or something... That way we can fine-tune it.

NB: is it me, or does lang_paypal always match the region code...? I suppose you looked it up first, right..?
Quote from Arantor on April 8th, 2013, 07:01 PM
You did update *all* the paths?
Yes (see above.)
Quote from Arantor on April 8th, 2013, 07:01 PM
The old warning system will no longer exist. Everything will be infractions going forward. I already removed the old configuration area, I'm just finishing up the admin page before I move onto the last thing - which is the actual 'issue infraction' screen.
Just had a look at your Facebook update on this.
Quote from Arantor on April 8th, 2013, 07:01 PM
Quote
Oh, regarding that... I've split it into three different functions, return_raw, return_xml and return_json, which do exactly what they say. It adds about 120 bytes to the source file, but it also has the benefit of variable parameters, so... It's all good I'm guessing. I chose camel_case because, well, redirectexit doesn't say redirectExit, does it..? :^^;: And that's a bit similar to it, I'd say...
So you went under_score rather than camelCase? Cool beans. Makes sense.
Yes, sorry for the mix-up.
I'm not 100% sure about return_raw, my original was saying 'return_text', but as in one case I'm return a number, I thought it'd make more sense. People might think it's for returning binary, which is my main concern. Ideally, I'd also add a return_bin() function, but whatever... :lol:

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Things I'm currently working on... (And not making progress on.)
« Reply #8, on April 9th, 2013, 04:11 PM »
Ugh this is getting complicated.
Quote
Re: profile area, all I'd like to say is that my plans for it are to make it close to the noisen.com profile style, i.e. have more info on the main page, and/or split stuff into immediately-loaded tabs, and more importantly, have a preview of the last couple of posts they sent. Perhaps we can do without profile comments at this point (1.0), though...
I had a look at that last night while trying to figure out what to do with the profile area, and I actually find it a bit confusing to navigate - there's just so much there to look at. (Mind you, it's still nowhere near as bad as vB 3's profile area which is even more complicated)

What I'm planning on right now is not a serious overhaul, not really, more just moving things around a bit. For instance so far I turned 'Actions' into 'Manage Account', moving Account Settings, Track User, Group Membership, Show Permissions and the new Infractions entry on it.

I'm also thinking about splitting the forum profile stuff into a few pages, perhaps signature on its own page complete with shiny bbcode editor and preview function. But that's as far as I've got with it.
Quote
NB: is it me, or does lang_paypal always match the region code...? I suppose you looked it up first, right..?
Of course I looked it up. It uses ISO-630-1, but only a specific subset of that for countries that are supported. The key point, which doesn't matter for the three languages we have right now, is that it's supposed to be the country, not the language, that is referenced. If you look back at the older commits showing the list of old languages => code mappings, you'll see for example I ended up mapping Arabic to a country because 'Arabic' doesn't have a matching country code.
Quote
I'd suggest going for a route that tests whether two languages have the same two-letter code
Seems to me to add more complexity than is actually necessary :/
Quote
I looked into the w3 standards page, and it got complicated... They only give two-letter examples, but the format specifies a Language-Code, which in turn links to a page that explains it can either be a two-letter code, or anything that's acceptable, such as 'en-GB', or even 'x-klingon'... (Ah, geeks...)
We're talking about two different things. You're talking about the rel="alternate" language indicator, I'm talking about the one on the <html> element itself. rel="alternate" can just use the locale setting with _ replaced with -, while the <html> element one has to conform to the proper language code.
Quote
- In a similar fashion, the debug option in the admin area, the one that shows debug info at the bottom of the page, regularly disables itself in my local install. I've never, ever disabled it manually. But I just had a look, and no surprise, it's disabled. I remember re-enabling it two weeks ago... Always enabling db_show_debug, not touching the other options (e.g. 'Admin only')...
That's something else then. It has never randomly disabled itself for me, not once. Nor have plugins, actually.

The rule for disabling a plugin is straightforward; on startup, it looks at the list of plugins that are currently enabled, and verifies that the folder exists and that folder/plugin-info.xml exists. If either of these fail for any reason, the plugin will be disabled. But these are the only circumstances that should be causing automatic dropout of plugins.
Re: Things I'm currently working on... (And not making progress on.)
« Reply #9, on April 10th, 2013, 03:51 AM »
Just to add, this commit is now 43 modified, 4 added >_< And it's possibly going to get even worse yet. I think I can stave off much more in the way of profile structure changes (other than already documented), which is basically moving things around.

But I can see I will need to do something with the moderation area which means I might have to figure out what to do with the moderation centre if nothing else. I have a few interesting ideas on how to tackle this, which will help. But I think it'll all end up having to be one mahoosive commit :(

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: Things I'm currently working on... (And not making progress on.)
« Reply #10, on April 11th, 2013, 02:26 PM »
So, some news from me...

I was nearly done with the notification system, until, for some reason I ignore, I decided the animation for the popup sucked, and same for the search box, so I started rewriting it... And had issues with the popup arrow. So I looked into that next, and decided to rewrite it in CSS... It also allowed me to change the color of the dropdown arrow in the menus, which is a good thing. But then I realized a tiny mistake in the new CSS that was making the dropdowns harder to navigate. So... Again, I ended up rewriting these. Currently, I'm in the middle of that rewrite, and it doesn't work well, and it's upsetting. My goal is to keep the CSS size below what I had with the arrow image, I still have room for 30 bytes so that's all right, but I'm also worried that my rewrite will break oldIE and other browsers.

Funny hey...?
I should have committed much earlier. If anything -- yesterday. What's happening now is that I'm having trouble making sense of it all.
I'll try to commit all without my Arrow changes. Might help clear things up for me...
Quote from Arantor on April 9th, 2013, 04:11 PM
I had a look at that last night while trying to figure out what to do with the profile area, and I actually find it a bit confusing to navigate - there's just so much there to look at. (Mind you, it's still nowhere near as bad as vB 3's profile area which is even more complicated)
Yeah, vB3 is an example of what NOT to attempt...
Maybe tabs are too much, alright. But so are multiple profile pages..?

At the very least, I insist we have at least a couple of the latest posts from the member.
(Plus, ability for members to set up what others can see about them.)
Quote from Arantor on April 9th, 2013, 04:11 PM
Quote
I'd suggest going for a route that tests whether two languages have the same two-letter code
Seems to me to add more complexity than is actually necessary :/
Then, anything else..?
Quote from Arantor on April 9th, 2013, 04:11 PM
We're talking about two different things. You're talking about the rel="alternate" language indicator, I'm talking about the one on the <html> element itself. rel="alternate" can just use the locale setting with _ replaced with -, while the <html> element one has to conform to the proper language code.
Yes, I never even mentioned the lang attribute, only the hreflang one... What made you think I was talking about the html tag's..?
The only reason I want hreflang to be as specific as possible, is for Google to be better at serving the proper content depending on the user's geographical position. (Well, if it works... Because I have yet to see a Google link with language=... in it. Probably requires moving the language part to a subdomain, or something... Which I'm not too fond of.)
Quote from Arantor on April 9th, 2013, 04:11 PM
That's something else then. It has never randomly disabled itself for me, not once. Nor have plugins, actually.
For the record -- every time I re-enabled debug info, it got disabled after a while. It happened twice to me already this week... But, it never happened to me on wedge.org -- only on my local install! Any clues..?
Quote from Arantor on April 9th, 2013, 04:11 PM
The rule for disabling a plugin is straightforward; on startup, it looks at the list of plugins that are currently enabled, and verifies that the folder exists and that folder/plugin-info.xml exists. If either of these fail for any reason, the plugin will be disabled. But these are the only circumstances that should be causing automatic dropout of plugins.
Something wrong must have happened at some point. But since the other day, my plugins have yet to be disabled again, so I guess it's alright now. (I did a database dump to check on my variables, and they were all alright -- so it SHOULD not have disabled them in the first place...)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Things I'm currently working on... (And not making progress on.)
« Reply #11, on April 11th, 2013, 03:43 PM »
Quote
Yeah, vB3 is an example of what NOT to attempt...
Maybe tabs are too much, alright. But so are multiple profile pages..?
I dunno. Needs more thought.
Quote
Yes, I never even mentioned the lang attribute, only the hreflang one... What made you think I was talking about the html tag's..?
Because I was, in another thread, when I went looking?
Quote
The only reason I want hreflang to be as specific as possible, is for Google to be better at serving the proper content depending on the user's geographical position. (Well, if it works... Because I have yet to see a Google link with language=... in it. Probably requires moving the language part to a subdomain, or something... Which I'm not too fond of.)
That would be because Google won't ever have such URLs in it and with very good reason. First: duplicated content issues, second: canonical tag does not include language. And even if it did, the actual content of the page is not translated or anything, so even if you were viewing this site in French, all the content (just not navigation) is in English.

In fact the best thing to do would be to actually use the board flags stuff I did and use *that* to indicate the page's language. I'm not even sure the language flags should even be followed, really. (And I'm pretty sure other rules will cause most stuff to be set to noindex because of it!)
Quote
For the record -- every time I re-enabled debug info, it got disabled after a while. It happened twice to me already this week... But, it never happened to me on wedge.org -- only on my local install! Any clues..?
Well, debug info is stored in Settings.php which implies you're resetting it somehow.
Quote
Something wrong must have happened at some point. But since the other day, my plugins have yet to be disabled again, so I guess it's alright now. (I did a database dump to check on my variables, and they were all alright -- so it SHOULD not have disabled them in the first place...)
Unless you moved everything and then fixed all the paths and then (and only then) did a refresh would it have preserved things.