-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Overflow, Hidden Examples, and Changed HTTP Request Format #1
Open
zachldl
wants to merge
12
commits into
COMS30106:master
Choose a base branch
from
zachldl:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Swish text is now height-constrained, scrollable, and height scales to window size.
Added a three-step scaling gradient based on vertical resolution to fix the overflow coming back on extremely high- or low-resolution displays, and narrowed the line spacing very slightly to fix the overflow on the third slide on the top row which previously happened due to the added subtitle.
This reverts commit 9cc8a83.
Added a three-step scaling gradient based on vertical resolution to fix the overflow coming back on extremely high- or low-resolution displays, and narrowed the line spacing very slightly to fix the overflow on the third slide on the top row which previously happened due to the added subtitle. Edited - accidentally left some visual changes I was meaning to undo in the last commit.
Hides the examples visually from the code before SWISH has been activated but still inclues them when the code is sent to SWISH. Functions on $(document).ready() so should be compatible with all types of code input. REQUIRES EXAMPLES TO BE THE LAST PART OF THE CODE.
Code is now preloaded into Swish by inputting the address of the external file hosted on GitHub in the COMS30106/prolog_scripts repository. No changes need to be made to the existing examples present or to the method in which new examples are added, as the address is created from the ID of the <pre> tag, which is already present for all of the Swish boxes. A new button and element-swapping system had to be implemented to facilitate this, but the visual change is minimal. Currently, the contents of the box before Swish is activated are still pulled from the 'local' set of prolog scripts, however, so these should not be removed.
Changed the button to display in a better location which will also work for the vertical-scrolling book format. Reverted potentially problematic changes to line-height. Changed the way the button is inserted into the document such that modifications to the swish_box.html file are no longer necessary and have been undone.
Cleaned up the code, consolidated all of the $(document).ready(function(){}) statements into one, removed extraneous code, and added comments.
Folder to be removed later. Only being used temporarily to troubleshoot irregular SWISH behaviour.
In lpn_overflowfix_examplesfix_iframefix_previewfix.js the previews are now also loaded from an external file, as well as the iframes. This uses asynchronous AJAX requests so loading times should not be severely impacted. All of the major changes to lpn.js are now staggered. The first four all use the original index.html but the one with the most changes uses index_overflowfix_examplesfix_iframefix_previewfix.html as it also uses new_swish_box.html from _includes.
So-Cool
reviewed
Jun 25, 2018
web/js/lpn.js
Outdated
@@ -23,7 +23,7 @@ | |||
return this.each(function() { | |||
var elem = $(this); | |||
var data = {}; /* private data */ | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the tab sign
Removed a line in lpn.js which interfered with the CSS and created incorrect scrollbars.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addition to lpn.js that height-constrains and scales the Swish boxes as well as a small modification to the CSS (specifically line height) in order to solve persistent overflow on the third slide of the top row due to the additional subtitle on that slide.
--
Addition to lpn.js that hides the examples visually from the code before SWISH has been activated but still includes them when the code is sent to SWISH. Functions on $(document).ready() so should be compatible with all types of code input. REQUIRES EXAMPLES TO BE THE LAST PART OF THE CODE.
--
Changed code for creating the HTTP request such that the request is now made with reference to an external file rather than containing the entire code itself, which caused some problems. A new button and element-swapping system had to be implemented, but the visual change is minimal. The preview (before Swish is loaded) still relies on the local copy of prolog_scripts, so this must not be removed.
--
New method of displaying button no longer requires modification to swish_box.html and looks nicer.