why:
The iframe used for LTI messages has 450px as minimum height
When the user has a viewport smaller than the min-height (450px)
and launches a tool in a fullscreen placement, the iframe is
not resized
previous commit
https://gerrit.instructure.com/c/canvas-lms/+/291039/8
ignore PS 9 it got messed up
refs INTEROP-7431
flag=none
--------------------------------------------------
Test plan
--------------------------------------------------
* Compile the CSS and JS. Run:
```
rake canvas:compile_assets_dev
```
* Open the Browser Developer Tools (F12)
* Open the Responsive Design Mode
* Choose a viewport smaller than 450px
* Launch any LTI tool from a fullscreen placement like global
navigation
* The tool should fit the available height
* Exit the Responsive Design Mode and launch the tool from the
same placement and the tool must also fit the available height
Change-Id: I043c9fb6e3a772f1237ba30d1a59162e3ae6da9a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292646
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
QA-Review: Ryan Hawkins <ryan.hawkins@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>
This reverts commit 078a06d50e.
Reason for revert: Broke some iframe heights in canaries
Change-Id: I3a594dc516c4ba03ec1fbd4a24f67a5223c54827
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285820
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Evan Battaglia <ebattaglia@instructure.com>
Product-Review: Evan Battaglia <ebattaglia@instructure.com>
Reviewed-by: Mark Starkman <mark.starkman@instructure.com>
why
The iframe used for LTI messages has 450px as minimum height
When the user zooms in the browser (3-400%) the visible viewport
will be much smaller than the min-height (450px) of the iframe
which causes problem and the focused elements are not visible
Instead of setting an absolute value for this property, we can
use 100% of the iframe's height
fixes INTEROP-7093
flag=none
--------------------------------------------------
Test plan
--------------------------------------------------
* Compile the CSS. Run:
```
rake css:compile
```
* Compile the JS. Run:
```
rake js:webpack_development
```
* Launch any LTI tool
* Open the Browser Developer Tools (F12)
* Locate the HTML element iframe#tool_content
* Check the height property of the iframe. It should allow values
below 450px when zooming in
Change-Id: I4b20909d3accdb00de3320de7b3ecc61997e4df0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282126
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
This also adds things in this directory to the whitelist
to make sure nothing ugly gets introduced.
Test Plan:
- Automated tests pass
- Make a non-pretty change in a js file within spec/coffeescripts
- Commit it
- Notice it has been prettierfied
refs COREFE-347
flag = none
Change-Id: I52a32b5888da2ad8fc8054f753bc75e48b5ab843
Reviewed-on: https://gerrit.instructure.com/212515
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
fixes PLAT-3232
Test Plan:
- Launch a tool and put the following command in your browswer
console:
window.postMessage('{"subject":"lti.screenReaderAlert","body":
{"html":"<img src=x onerror=alert(document.domain)>"}}','*')
- Note that the alert does not occur
- Also post the following:
window.postMessage('{"subject":"lti.setUnloadMessage","message":
{"html":"<img src=x onerror=alert(document.domain)>"}}','*')i
- Note that the alert does not occur
Change-Id: I7309d8de36cbcbe3646714786d603afbe8ce7178
Reviewed-on: https://gerrit.instructure.com/147255
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Marc Alan Phillips <mphillips@instructure.com>
...and pass them through amdtoes6, eslint, and prettier
This converts most of our coffeescript spec files to javscript, to
es module syntax and applies our eslint code formatting rules to it.
Because this is just spec files, as long as the tests still run
and they all still pass, this should be good. That makes these a lot
easier and safer to deal with converting than the stuff in
app/coffeescripts
After this commit there should not be any .coffee files in the
/spec/ directory.
test plan:
* jenkins should run the same # of js specs as before and they should
all pass
Change-Id: I701c101777486e2e37d0ec1327692f16099352cd
Reviewed-on: https://gerrit.instructure.com/141556
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
this will not pass jenkins since it renames these files to .js
without also converting the syntax to javaScript. However, this is
intentionally it's own commit so that when you `git log --follow`
a file, it can track its history across the name change.
the following commit actually changes the syntax.
test plan:
* make sure the next commit passes. This should just rename things
Change-Id: I4b56f2789eda12cba64a3716462fecce31b2e895
Reviewed-on: https://gerrit.instructure.com/141555
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Ryan Shaw <ryan@instructure.com>
Closes PLAT-2730
Test Plan:
- Follow the steps to reproduce at
https://instructure.atlassian.net/browse/PLAT-2730
- Navigate to the module and verify that the module navigation
no longer covers the bottom of the tool launch iframe
Change-Id: I9136392046edeade0906c038a69c5dcbd108e720
Reviewed-on: https://gerrit.instructure.com/122642
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
Closes PLAT-2738
Test Plan:
- Install two lti tools that use the new
'com.instructure.PostMessageToken' variable expansion.
- Visit a page with two LTI tools launched (this happens when
launching a tool in a course that has chat enabled).
- Have one tool send a resize post message and verify the correct
tool is resized. The post message should include the token
for the value of 'token':
<script type="text/javascript">
parent.postMessage({
subject: 'lti.frameResize',
height: 12000,
token: '<%= @wrapper_id %>'
}, '*');
</script>
- Verify the proper tool is resized.
Change-Id: Ie7e976c5cd53ef5c61cd86c471ba416045a0fb68
Reviewed-on: https://gerrit.instructure.com/119858
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
Product-Review: Weston Dransfield <wdransfield@instructure.com>
closes: CNVS-34769
this is the result of running this find & replace
(^\s+)(module)(\s[\"\']|\()
\1QUnit.module\3
s/module/qunit.module/ in spec/coffeescripts
and the result of running this find & replace
(^\s+)(module)(\s*\()
\1qunit.module\3
in canvas-lms/spec/javascripts/
test plan:
* automated js specs should pass in requireJS and webpack
Change-Id: I65188cce4bd5e6e5caa199dc108393a93f400a67
Reviewed-on: https://gerrit.instructure.com/101100
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
fixes PLAT-477
fixes PLAT-479
fixes PLAT-480
test steps:
- Add one or two external tools which allow homework submission (e.g.
box) and find the tabs on the submit assignment page
- Submit assignment using tool
- Add three more external tools which allow homework submission
- Ensure that you see the 'More' tab on submit assignment page and
submit assignment using items under 'More' tab
Change-Id: I118b3fa059e6a4046c87b8cf894ce77ecffd9252
Reviewed-on: https://gerrit.instructure.com/33421
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Eric Berry <ericb@instructure.com>
QA-Review: Eric Berry <ericb@instructure.com>