Editing User talk:Derf

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 49: Line 49:
----
----
Good job narrowing it down to the exact lines. I made the changes, it looks good [[User:Sandungas]]! [[User:Derf|Derf]] ([[User talk:Derf|talk]]) 01:58, 4 May 2023 (CEST)
Good job narrowing it down to the exact lines. I made the changes, it looks good [[User:Sandungas]]! [[User:Derf|Derf]] ([[User talk:Derf|talk]]) 01:58, 4 May 2023 (CEST)
----
It looks better than ever :), a couple of details i did learn and i would like to mention before concluding this talk, just for the record<br>
It seems the color config was intended to be generated automatically from a generic stylesheet.css the idea was to take a generic stylesheet as input (i.e: the vector-white skin we are using in wiki) and generate a syntaxhighligt color palette from it just by running a python command, is mentioned here in the original [http://qbnz.com/highlighter/geshi-doc.html#getting-stylesheet official documentation] (a bit obsolete though, the syntaxhighlight used by mediawiki is an evolved version derivated from this)<br>
The problem i see with that ptocedure is that is almost imposible that method could generate a nice color palette. Because you know... what we really need is a color selection that covers all programming languages, it should be intuitive and should be approved by lot of programmers that are already using it... and we dont care at all about aesthetics because it doesnt needs to looks pretty and doesnt needs to match with the wiki skin (vector, dark, or whatever you add later, the general skin doesnt matters), our only priority is for practical reasons<br>
I dont really know where to get that kind of color selection, maybe there is something stable and well mantained from linux (debian, ubuntu, etc...), but by now the notepad++ color palette we added is fine and standard enought (notepad++ is a popular app anyway), if someone else wants to continue "importing" colors from notepad++ [https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/stylers.model.xml stylers.model.xml] settings for the other programming languages please publish your suggestions here, im not going to do it, but i know there is room for improvements<br>
The remaining problem i see right now is we "fixed" only the xml colors, but the color selection for all other programming languages looks like shit (it still amazes me syntaxhighlight is distributed with that default color selection, who made that color palette with cucumbers and pistacchios ?, dolce and gabbana ?, we are geeks, if some mediawiki dude is reading us, please give us intuitive RGBYK colors and thats all, this is one of the cases where the beauty is in the simplicity)<br>
In the meantime i figured another alternative way to improve it that should work fine and should give a bit of consistency with what we already did, take a look at this, in the official page there is a [http://qbnz.com/highlighter/demo.php live demo] where it can be seen that it was intended to be configured by using '''only 11 colors !!!''' (and we already changed 3 of them), the weird detail is the file [https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/SyntaxHighlight_GeSHi/+/refs/heads/REL1_35/modules/pygments.generated.css pygments.generated.css] contains a lot more color definitions, but most of them are repeated for different programming languages<br>
So... following that concept of using only 11 colors shared by all programming languages... i figured we could replace all apparences of #008000 by #0000FF (repeated 10 times), #7D9029 by #FF0000 (repeated 1 time), and #BA2121 by #8000FF (repeated 9 times) in [https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/SyntaxHighlight_GeSHi/+/refs/heads/REL1_35/modules/pygments.generated.css pygments.generated.css]. This should replace most of the default "vegetal" colors by the new colors we used for xml<br>
Im not sure about the results, but i guess it worths a try. For the tests... there is a sample of javascript in [[Coldboot.raf#Script]], python in [[CXML_Containers#CXML_decompiler]], C++ in [[Syscon_Thermal_Configs/structs]], TCL in [[PS3MFW_Builder]], bash in [[Debian_LiveCD]]<br>
Bonus: in one of the random google searches i found [https://myridia.com/dev_posts/view/2125 a dark theme], is mostly a curiosity because most probably doesnt matches at all with the vector-white skin we are using (the contrast in between white and black is going to be too much disturbing), but if at some point you implement the vector-dark skin or any other dark skin it could fit<br>--[[User:Sandungas|Sandungas]] ([[User talk:Sandungas|talk]]) 19:45, 5 May 2023 (CEST)
----
[[User:Sandungas|@Sandungas]] I went ahead and replaced all instances of those colors as you suggested to purge the vegetables out. I think it did the trick! This fix is fine, I'll just have to write a note to remember to make those replacements again when I update MediaWiki, since it will probably overwrite it. Regarding dark mode, I plan on eventually rolling out a dark mode to the site. Not sure if any are maintained at the moment, as when I setup ConsoleMods.org there were no maintained dark mode version of Vector, so I just made my own dark mode via Common.css. I should be able to paste it over to the devwikis once it's on the same MediaWiki version as ConsoleMods (which I'll update to 1.40 when it comes out). I should be able to just toss in a Common.css override for the SyntaxHighlight changes for dark mode (which I guess I could have done to solve this problem to begin with). [[User:Derf|Derf]] ([[User talk:Derf|talk]]) 05:44, 8 May 2023 (CEST)
----
Right now im not sure if there is some color conflict with other languages different than xml (eventually some wiki user could complain about what we did), but at first sight all them looks better than default, as far i remember i did read somewhere that there is a way to load the custom colors from an external .css file, this feature would be the less intrusive way to configure it and i guess it should survive the "update" procedure (mostly because the updater is going to recognize the custom edit and is going to preserve it in the new installation) but anyway yeah... better make a .txt somewhere to take notes of all customizations you did because the syntaxhighlight config can be improved a lot more, right now there are a couple of details that comes in mind. In the sony xml language there are a couple of characters (as far i remember one of them is &) that doesnt follows the .xml standards, and as a consequence most xml parsers and highlighters displays the code "broken" after the presence of that characters (the same problem happens in notepadd++ and any other app), and i guess they did the same in PS4, Vita an even PS5. While reading the legacy syntaxhighlight documentation i think i saw an option to add an identifyer for this kind of keywords that doesnt follows the language standards. Another thing that can be improved is the highlights for bash language, if you take a look at the legacy file dedicated for it in older syntaxhighlight packages you are goin to see it contains a huge list of kwywords to identify all the unique bash commands<br>
I dont know how to do any of this two things, but eventually we could return to it and try to see if we find how to do it, by now i dont want to enter in this forest because would extend this conversation too much<br>
I thought there was only a [https://www.mediawiki.org/wiki/Skin:DarkVector Skin:DarkVector], and it was considered official and well mantained but sadly is abandoned. And the other dark skins in [https://www.mediawiki.org/wiki/Category:All_skins Category:All_skins] differs too much with vector, thats a problem<br>
Right now i only see two options, either use the abandoned skin i mentioned (i like the color palette but im not so sure how much differs from the default vector), or what you did about taking the vector skin and customize it (only the colors, not positions, sizes or anything else, we need it to be simple to swap back and forth from vector-white to vector-dark without hassle), you could install both as a temporal test<br>
Btw, im pretty sure one of the tricks i been doing in some wikitables to hide table cells is going to be problematic with a dark skin because i was filling the table cell backgrounds and borders with white in RGB notation <code>color:#FFFFFF</code> (invisible over a white background, but very notable over a black background, oooops), the solution is easy, we need to use RGBA notation <code>color:rgba 0,0,0,0</code> (fully transparent black) or with syntax <code>color:transparent</code>, if some of you finds this kind of mistakes feel free to fix them<br>
--[[User:Sandungas|Sandungas]] ([[User talk:Sandungas|talk]]) 14:00, 8 May 2023 (CEST)
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)