(New / Fixed) Widescreen Package Update
-
BUMP!! Any news of this??
-
-
Whats missing??
-
Hey guys,
That Zip file just represents my brainstorming on the situation.. I know the Diff didnt work.. but I was atleast thinking. :-P I was gonna hand write diffs if that was the only way, thanksfully its not.
but here is where I believe the answer lies… Fix the index.php to remove the hardcoded 2 column code, and we have widescreen.. it doesn't break any of the existing themes.. it actually fixes them and lines stuff back up. :-) Try the patched index.php with other themes.. overlay the files onto a 2.1 install, and try every theme..
The code which is present in that Widescreen.zip link posted earlier is ALL based on the 2.1 code, not the 2.0.3 code.. if you want the 2.0.3 one, I have that one done.. but with the same issues.. just less jquery and less requirements in terms of includes.. and file requirements, but no 2.1 features.
The only other file that needs tweaking is the fend.inc.. and maybe it doesnt.. I'm trying to comprehend some advanced javascript, I think the term is Duck Punching / Monkey Patching, which is rewriting other code at runtime... there seems to be other more simplistic examples of these techniques peppered into the existing theme.
But I believe that if there can be more flexible code that avoids that whole mess, we should just fix the 2 files under the www folder.
Here is the majority of the existing "non wide" code in the index.php, the hardcoded fixes, then some code which scales much better than the hardcoded stuff..
Here is the way the existing official code works to print the 2 columns... But its hardcoded to only 2 columns.
// --------------------------------------------- // Here is the way the existing official code works to print the 2 columns... But its hardcoded to only 2 columns. // --------------------------------------------- if ($config['widgets'] && $pconfig['sequence'] != ""){ if ($colpos[$widgetcounter] == "col2" && $printed == false) { $printed = true; ?> } } else if ($widgetcounter >= $halftotal && $printed == false){ $printed = true; ?> } Here is the way the existing NON WIDESCREEN code works to SORT the 2 columns… Hardcoded, column 1 sorts to column 2 and vice versa. (In the Index.PHP) The Hardcoded columns #col1,#col2 need to go away in index.php.
// ----------------
// Here is the way the existing NON WIDESCREEN code works to SORT the 2 columns... Hardcoded, column 1 sorts to column 2 and vice versa. (In the Index.PHP)
// The Hardcoded columns #col1,#col2 need to go away in index.php.
// ----------------Here is the solution to the hardcoded col1 -> col2 and col2 -> col1 sorting.. but this version is still hardcoded to 9 columns. this is the code in the widescreen theme now. This is for testing against the other themes, etc.. "ui-sortable" is used to allow sorting from any to any column.
// ----------------
// Here is the "ui-sortable" solution to the hardcoded col1 -> col2 and col2 -> col1 sorting.. but this version is still hardcoded to 9 columns.
// this is the code in the widescreen theme now. This is just proof of concept stuff for testing against the other themes, etc..
// ----------------// ----------------
// Here is the hard coded test code for printing more than 2 columns.. this is a hack.. but it works.. its from the original widescreen package, but I think it has tweaks.
// Its not elegant, but would be a nice pull request for the index.php.
// ----------------Ok, now onto my napkin code solution, untested.. but it looks like it works.. but brackets, semicolons, my brain, (I'm not Notch!) I mean I'll get it done if no one else can, .. but whats the word you guys use .. "bandwidth?" well.. I'm basically working on a Commodore 1650 vic modem that only dials pulse. while my customers sap me for around 50Gb sustained transfer 16 hours a day of IT Problem solving.
// ---------------------------------------------
// Now, this code here is STARTING to be on the right track.. and once debugged and working it will print 2 columns or 25 columns across 6 WQXGA monitors..
// This is a "Napkin Code" Loop to Print the Sortable Columns (What I am trying to make work, it should work.. maybe as is, maybe needs tweaks..
// my napkin's runtime compiler was on the fritz, and I ran out of time for the weekend and a few days..
// ---------------------------------------------if ($config['widgets'] && $pconfig['sequence'] != ""){
?>}
// Need a loop here for -> jQuery('#col"+colnum+"').sortable({connectWith: '.ui-sortable', dropOnEmpty: true, handle: '.widgetheader', change: showSave});
// See last javascript snippet on this page[code]
// ---------------------------------------------
// We need a similar loop for dealing with the sorting portion of the code which is hardcoded to 2 columns.. so another loop here of some kind..
// ---------------------------------------------
[/code]I will be the first to say that hard coding line after line after line of the same things and only changing a character or 2 in each line is bad form..but it works for testing, and it needs to be commented as such and fixed..
However, getting that hardcoded stuff into the index.php (or something more permanant) to remove the hard coded 2 column stuff, we can then feel good moving forward knowing widescreen is on a solid foundation.
I am happy to make a pull request with the hardcoded stuff as long as its VERY clear that this is not my idea of the final solution. :-)
What do you guys think? I have to apologize if anything above is repeated, misspellended (heh) or anything that makes what I wrote not make sense.. I'm deliriously tired right now.. but wanted to convey all of that..
Regards everyone,
Richard Graver[/i]
-
Thanks Rich and sleep well! :D
-
I got some more notes… all of this work started with Evgeny Yurchenko's original widescreen package.. It was a down and dirty hardcoded patch.. it was essentially an overlay to pfsense, and not a theme, nor was it a package.. in its previous iteration it was unqualified to remain as a package, It modified pfsenses own personal zones of files, this isnt what a package is meant to be, packages extend pfsense.. if a package modifies pfsense, it has stepped beyond its boundries into the area which makes pfsense feel insecure.. and uncomfortable with it.
I think its easy to see how we wont have wide screen themes until the 2 column hardcoded routines are reworked... its bad form to hardcode something that needs to scale, the only difference between 2 columns and 9 is the number of lines of code.. the hardcoded stuff in the widescreen is not different than the 2 column code. just more of it.
Please read the big post I made above, overlay the widescreen fix onto your www folder, test against all themes, etc.. everything should work.. truth be told some stuff looks better, but some centering is lost.. this had not been overlooked.
Besides the official pull tweaks to index.php and fend.inc.. I dont think its good form to overlay onto the pfsense_ng theme.. Why should it even be a package. This is MUCH NEEDED fixes to the existing layout code, and is really at its core enabling wide themes.. Pay close attention to the way the new code lays out the widgets, all of the padding is consistent, top bottom and sides.. also certain widgets look better now.. the picture widget is centered pixel perfect.
The old widescreen plugin attempted scaling the widget widths.. this was just plain terrible and its gone.. unfortunately the content div still scales like it did in the old widescreen plugin, which is terrible to a lesser degree..
All percentage based scaling has been reworked, and spit polished. except. the right side of the content div is scaling based upon %, Check out the superwide screenshot, looks good? nah.. look at the wasted space.. look at how stuff is not centered in the content area. I tried using padding which scaled, it was worse than float left.. all of this has just convinced me that the width needs to scale to accommodate the number of columns, instead of the columns trying to take advantage of the available space in the content area.
The old widescreen looked like it was having a seizure as it scaled.. all the widgets were refreshing hundreds of times as the width changed.... That is fixed also.
I have a github account, I can do pull requests, etc... I honestly was just as excited as you guys were asking to publish this thing.. I jumped in and said "Look at what I did, I fixed the widescreen." Then as a went deeper and picked it apart I kept finding more and more that needed addressing. I think we are close.. but I'd like to fix the right size scaling / passing problem.. this will also make the other themes that dont scale appear consistently centered right now they push a tiny bit left,.. nothing to get worked up about.. but it can be better.
My final feature was going to be to revert everything to match the standard theme, and have widescreen be implemented as an easter egg to be activated only after entering the konami code on the keyboard. Just slap me now. (Don't think mine wont work like that though. hehe)
Best Regards,
Richard Graver
-
Yes, we want it fixed properly in the base code but at this point it's too late to get it into 2.1, because we need to stop adding features there and ship it.
Once we branch 2.1 off, we'd have no problem accepting this kind of change into HEAD/master (which will become 2.2).
-
Overlays are OK for packages so long as there are fun/scary notes about it not being able to be uninstalled.
Patches are good because, assuming nothing else mangled the files, patches can be reverted. (See the System Patches package for an easy way to apply and revert patches) there are quite a few "patch packages" that are little more than a .patch file with some "package" code wrapped around it. The tap fix package, for example. Those are quite easy to make.
-
Problem if we then get an update that destroys it.
If its nothing more to work in the base code, then why not?
Rich says its close and I thinks its a brilliant job. Why not see it through and get it done so people can enjoy a much needed update to the GUI?
-
It's too late for 2.1, it can be in 2.2. cmb stated that a couple times in other widescreen-related threads.
We have to draw a line somewhere or 2.1 will never be released.
-
:(
-
If it's patched against 2.1 or a package is made, it can be used in the meantime. It's not really that big of a deal to go that route.
-
Can we get a package done for both the 2.0.x series and then 2.1 since its not on release yet you think?
Marcello had something going but I dont know if he is talking to Rich about this and they do it together?
-
If it's patched against 2.1 or a package is made, it can be used in the meantime. It's not really that big of a deal to go that route.
So, I'll keep some of the hard coded stuff that works with comments that it needs a little logic love, and focus on asthetics and functionality.
I'll do what it says here to my eclipse, hopefully it will get me off of the napkins I have been using to get this widescreen thing done.
http://devwiki.pfsense.org/PfsenseEclipseXdebugSetup
I STILL need some kind of autocomplete Ai Syntax thing where I type just a few letters of what I'm trying to do, and a whole function appears that just works exactly like what I'm picturing in my head.
(I hope you guys can tell when I'm joking.. all I hear is crickets.. is this thing on? How come there are many programmers who think that Halloween is XMas? because Oct 31 == Dec 25!! Um, how many coders to screw in a lightbulb? Can't be done .. hardware issue. Ok, I swear.. maybe not today , maybe not this week. I'll get some more time to keep this moving forward.,….)I anyone who is using the current 2.1 widescreen stuff... Any comments? does it feel like I'm going in the right direction with this so far?
-
Rich,
Your widescreen update does work in v2.1, sorry no screen shots (yet!), unfortunately the "all.css" file that is included in the zip file appears to be old and misses some later updates.
The dashboard (index.php) has an issue with the HTML DIV statements, it's giving an error message. I'm not at home at present and will try and find the culprit, but may be something to do with the closing DIV statement before column 1 ("col1").
Definitely a thumbs up from me (and probably lots from Supermule ;) ).
-
Yes…..! Its fairly annoying to sit on a 2560x1600 screen and mess with the "old" theme.... :D
Rich. Can you walk me through a 3-4 column code change in 2.0.3??
-
Just found this thread thanks to Supermule. I was unaware of your work while I was working on something similar! I was struggling with loading the columns after a save, but looking at your code I figured this out big THANKS!
Anyway I have taken a different approach to you and have attempted to implement this into a theme as opposed to the existing pfsense. If your interested in what I have done you can follow it here:
-
Can we somehow merge the threads??
-
Since I thought initially this was for 2.0.x I installed it on a few I have around. What Ive found is that if Ive had the original widescreen package on a box before (but uninstalled) things work fine. If not then I seem to have issues. (Actually one I tried to install over the widescreen package and that didn't so so well until I uninstalled that package then worked fine. 2nd had the package then uninstalled before I tried, works fine. third never had the package and didn't do so well.) Forth same as third before went to 2.1…
I have it on two boxes now with 2.1 RC and everything (this widescreen (manual install)) is great so far. :)
Some others going to 2.1 today and will add it later.
-
Guys any way we can add it to the packages repo on 2.0.3?
Thanks!