Skip to content

Conversation

@gb0101010101
Copy link
Contributor

Well this turned out to be a lot more work then I expected and took almost a solid day.

I have split it out into many commits to make it easier to see what has changed as there are a few source code formatting commits. The main changes are for desktop layout only, with minor fixes for mobile.

Bootstrap Layout:

  • The whole layout is now fully fluid using flexbox and grows/shrinks correctly on resize and zoom.
  • Navigation is now in <body> and part of the layout so no need for offset padding.
  • Removed all calc() from CSS that used fixed pixel sizes that did not work properly.
  • Fixed margins on sidebar which sometimes did not work.
  • Layout fits browser window without scrollbars!
  • Controller Message scroll box has minimum height so it is always visible (previously not) but otherwise grows to fit bottom right corner. This took a while to figure out.
  • The render canvas now shrinks when browser is made smaller. Made possible by temporarily making it 10x10px, then measuring parent div, then resizing canvas.

Jijna templates:

  • Move all JavaScript to just before </body> which is optimal place for loading.
  • Created {% Head %} template block in HTML <head> for additional CSS files. Move CSS files that were in {% Header %} to be in {% Head %}.

Template HTML:

  • Fix erroneous characters in button tags
  • Remove extra </div> that was in a number of frontpage* files. Had to format source code and compare to see where the extra tag came from.
  • Removed 'Controls' heading and made 'Controller Message' message smaller to get 4 extra line for messages on a 1080P screen.

Testing:

  • Checked all modals, menu, and loading animation. Nothing else should really be affected.
  • Be sure to clear JS and CSS caches!

ToDo:

  • The caching of JS and CSS does not work properly as the files are not reloaded when they change. I think this is because of the version numbers passed as variables in the URL. Any input on this or should I have a look at it?
  • The Canvas resize uses a 10px offset in height becuase #workarea seems to be reporting a size slightly too bid. I cannot anything in CSS that is causing this. If you have any ideas let me know. This temp fix is causing the white padding at bottom of #workarea.

Merge Fix:

Noticed this will not cleanly merge due to changes in past two days to master. Let me know if you want me to merge master in to my fork.

Screenshot After:

WebControl_Layout_Fluid

…ardcoded pixel dimensions are not used in CSS calc(). Nav moved into body to get proper sizing for subsequent elements. Additional Divs added to make resizing work. Controller Messages box has min-height so always visible; otherwise resizes to available space. Fixed JS resizing to shrink when window made smaller.
… 'Controller Messages' heading smaller. Gives 4 more lines for controller message display on 1080P screen.
@madgrizzle
Copy link
Collaborator

Wow.. this is awesome. It's like you know what you are doing! This has been one (and I have many) of my biggest concerns. Funny you spent a day at it.. I spent weeks upon weeks trying to get it so it at least works and I knew it wasn't how I should have been done.

If you can merge in my recent updates (I swear.. I'm stopping), let's do one big merge into an 'experimental' branch with all your changes and set the release to 0.1 or something low and ask people that want to test it to 'downgrade' to that version. I'll clear out all the old releases so it's just the current version and this 'experimental' version. Because the version is lower that the current version, it won't put a badge on the screen for user, but t a user can always 'downgrade' to it. Ultimately it would be nice to add a feature or tag or something that can filter on experimental versions, but that's work that can be done later.

@gb0101010101
Copy link
Contributor Author

Glad you like it. The visual change is so small that I wondered if it would get accepted. I worked as UI designer for a number of years but now mainly do server side code. Its good that you had so much perseverance getting it working. I was getting frustrated after 6 hours! The controller message box was resizing when new lines were added to it and standard CSS was not restricting it. Finally remembered the absolute position trick which made it work.

Merged changes from master into this pull request. The only conflict was version numbers for CSS links in frontpage3d.html. Also updated #112 which merged cleanly. These two pull requests should merge cleanly as they alter different files.
#108 will not merge cleanly with #112. Let me know if you want me to create an experimental fork and merge them and which pull request to include. Also see #116 which could be added.

Let me know what other things are bugging you (here, or PM in Maslow forum)?

@madgrizzle
Copy link
Collaborator

I think if you can make a single fork with everything in it, I can do a few tests and then PR it in (not that I don't trust your work, just feel it's wise to check). I can't think of any ui related issues that still bug me. One day we'll need to look at reworking all the websocket communications into a consistent manner. Right now it's a bit of a hodge-podge.

@davidelang
Copy link

davidelang commented Mar 22, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants