Lately, when I have been running webpack I have noticed this warning:
[BABEL] Note: The code generator has deoptimised the styling of
“…/public/javascripts/translations/gradebook.js" as it exceeds
the max of "500KB".
And I thought:
1. oh man, so sad that we have a half meg of strings for just the
gradebook bundle
And:
2. Why are we getting babel warnings about stuff in
public/javascripts/translations in the first place? Those are
generated files and have no need to be passed through babel.
So this commit at least fixes#2. We’ll fix#1 in the next sprint with
Our i18n work.
This shaved 1/6th of the time to run a webpack build for
Me when I tested it (50s vs 60s). Not bad :), every little bit helps.
Test plan:
* run webpack
* you should not see that “[BABEL] Note: The code generator…” warning
* run prod compile_assets and boot rails in prod mode.
* make sure all the strings are still translated for you
Change-Id: I2f1b6759ab5ace82662cb3c713449bbf3fef7fd5
Reviewed-on: https://gerrit.instructure.com/142380
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@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 just updates our webpack config so if you rename
spec/coffeescripts/fooSpec.coffee to spec/coffeescripts/fooSpec.js
and change the syntax to js it will accept that just the same as
the coffee file it replaced.
test plan:
* verify that the specs in the commits that follow this
have their specs run and they pass
Change-Id: I3a58c2bbffa6022a5c63a0f50dd5f37d311e1dc7
Reviewed-on: https://gerrit.instructure.com/141554
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
to make it clear why it's there and under what conditions
it should be changed
refs CORE-933
Change-Id: I449eaaa54baddc3ab6667f2a16d97570bb61f21b
Reviewed-on: https://gerrit.instructure.com/139438
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
This also removes md5 asset chunk hashing.
test plan:
* task force consensus
Change-Id: Id67efa204bef719fdb10b3a6d429915744ff2044
Reviewed-on: https://gerrit.instructure.com/139415
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
test plan:
* all eyes of the hot potato approve
Change-Id: Idaa349b2a5b526b46bfe72df2673093fb6ff88b3
Reviewed-on: https://gerrit.instructure.com/139120
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
the new version of webpack has a new plugin (EnvironmentPlugin) that
makes the syntax for doing this same thing a little more concise
test plan:
* webpack should work the same as it used to
Change-Id: I7116cc26386283c84a3d82fbbbd06f5497829a1c
Reviewed-on: https://gerrit.instructure.com/133390
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
...so people can start upgrading all of their stuff
closes: CORE-735
test plan:
* check out a follow on commit after this and make test that
* make sure theming works for new components
Change-Id: I1ab6141152c353cbae88657b8913431c2634a4f2
Reviewed-on: https://gerrit.instructure.com/135330
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Resolvesinstructure/canvas-lms#1101
In production, generate separate sourcemap files so that bundles appear
split into their original, un-obfuscated source files in browser
devtools.
Note: `source-map` generation on large projects can cause node/v8 to
exhaust its memory allocation (see webpack/webpack#1914,
webpack/webpack#2157). This is the reason for the change to
package.json. In the future (e.g. when Canvas uses Node 8, or the
NODE_OPTIONS feature is back-ported to Node 6, this can go back to
a traditional npm script that doesn't directly invoke `node`.
Test Plan:
- Remove the `public/dist/webpack-*` directories.
- Run `JS_BUILD_NO_UGLIFY=true npm run webpack-production`. No sourcemap
files should be present in `public/dist/webpack-production`.
- Run `npm run webpack-production`. Sourcemap files should be present in
`public/dist/webpack-production`
Change-Id: Iebc85b5f52a6c7c25fdc5c2326cf9436dd42c2dd
Reviewed-on: https://gerrit.instructure.com/128070
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
add timezone locales that were lost when moving from vendoring the
library to pulling it from npm. custom locales were apparently added
to the vendored lib.
fixes CNVS-38138
test plan:
- change user locale to each of the following:
ar, da, fa, ht, hy, mi, nn, tr
- load a page
- ensure there is not a 404 when trying to load the timezone js file
Change-Id: Idff0059e3e445d1602f5d595d595af4780b34517
Reviewed-on: https://gerrit.instructure.com/123653
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Fixes: CNVS-38653
This will prevent compile_assets from continuing
if webpack had any warnings.
Test plan:
* Comment out `new webpack.IgnorePlugin(/\.flow$/),`
in frontend_build/baseWebpackConfig.js
* run webpack
* it should return a non-zero exit code
Change-Id: Iecfd47bc4e83e15a288397e102716535a5a4ef0d
Reviewed-on: https://gerrit.instructure.com/122994
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
fixes CNVS-34165
test plan:
- make sure you are running with RAILS_LOAD_ALL_LOCALES=1
for (web and webpack if you are running docker)
- change locale to each of es, de, fr, fr-ca, he and pl
- create/edit a quiz
- in the due date try setting the due date to a day in each month
- no need to save
- make sure after clicking the day it doesn't change to a different
month or year
Change-Id: I2da96f80678193e084786d867b27f2944a6e402c
Reviewed-on: https://gerrit.instructure.com/119926
Tested-by: Jenkins
Product-Review: brian kirkby <bkirkby@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: brian kirkby <bkirkby@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
closes: CNVS-37356
in order to help the transition away from coffeescript, this makes
it so you can just change the file extension of a file in
app/coffeescripts from .coffee to .js and convert it to js syntax.
the big win is that you won't have to change the 'require' path to it
in all the modules that were consuming it.
test plan:
* check out g/114236, it converts a bunch of files to .js and uses this
* yarn test and yarn run webpack should work
Change-Id: Ie4e22153c419bb92ebef66fb8dae196db08ff583
Reviewed-on: https://gerrit.instructure.com/114234
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-35922
now that we pass all of public/javascripts through
babel, istanbul/esprima should not choke on `import`
in our JS tooling.
test plan:
* run `yarn test` w/ COVERAGE=1
* it should work
Change-Id: Ia19deb547350245b7cae54e76e56ae6355f61b2c
Reviewed-on: https://gerrit.instructure.com/105962
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-36996
test plan:
* webpack should build
* specs should all pass
* instructure.js should still work even though it
now uses import/export syntax
Change-Id: Ie5b40115cc81565fc1fe7b8a42ea788083f27208
Reviewed-on: https://gerrit.instructure.com/111713
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-36888
Test plan:
* Nothing should change
* pages that respond to hashchange events (like speedgrader) should
work as normal
Change-Id: Ic94fd903ee2ee048c0d620c4be670ac1310847ce
Reviewed-on: https://gerrit.instructure.com/111676
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-36443
what this does:
* takes tinymce out of the critical load path so it doesn't
have to be loaded on every page, even the ones that don't
have a rich content editor
* makes the legacy tinymce and the service tiny mutually exclusive.
only one will ever be loaded at a time. and only if the page needs it.
* loads the code for some of the modals that open when you click
on buttons in the editor toolbar async and only on the first time
you click it.
test plan:
* need to test this with both the rcs service enabled and disabled
* load a page that doesn't use an editor, in the 'sources' panel in
the chrome dev tools, there shouldn't be anything about 'tinymce'
* load a page that uses an editor. if the rcs service is enabled,
you should see a network request for RCEServiceAsyncChunk and
if not you should see a network request for legacyTinymceAsyncChunk.
* ensure that the following buttons in the editor toolbar still work:
EquationEditor
insert link
insert image
equella
external tools
video record
* for each of those, when you click on the button you should see a
javascript file for specifically that loaded in the network panel
on the first time you click it
* clicking the button again should not cause another network request
This is a feature that I added only to the legacy editor:
it should hide the textarea while it is loading tinymce for the first
time. you should see just a white box where the editor will go in the
short moment while tinymce is being fetched and executed. then it
should show the whole editor. you should not see the raw html in
the textarea while it is loading
for example, to test this:
* go to a discussion topic page
* click the "reply" buttons
Change-Id: Ib337dee1d89007e31d4d3933b8becf59017617be
Reviewed-on: https://gerrit.instructure.com/108581
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-35923
test plan:
* all specs should pass
* if you open your devtools there should still be a $ and jQuery
variable globally available for you to use
* check to make sure that the client_app quizzes stuff works.
* e.g.: go to view a quiz’s stats as well as quiz log auditing
Change-Id: Ibcb55c8f319fc02974814452273aea5af793b205
Reviewed-on: https://gerrit.instructure.com/106474
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
regression in 5d998e808e
this should get build times back down again, as more commits will be
selinimizable
Change-Id: I202fe22b734e29afb6c0e536cafb7e6f81eac071
Reviewed-on: https://gerrit.instructure.com/109298
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Change-Id: Ia09179d5775ad4480e8d5406de49ec19e967b5ce
Reviewed-on: https://gerrit.instructure.com/108144
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
fixes: CNVS-36256
refs: CNVS-36232
This will make it so all the helpers in
handlebars_helpers will be available in any
Handlebars template.
Right now, this would always work on an actual page because
coffeescripts/handlebars_helpers.coffee is included in
modulesToIncludeInVendorBundle.js but if you tried to use jspec-watch
to just run a few specs and no other file explicitly require'ed
handlebars_helpers.coffee then those helpers wouldn't be there
on the page for you to use them
this ensures it is always there.
test plan:
run `jspec-watch spec/javascripts/jsx/gradezilla/GradebookSpec.js`
it should work
Change-Id: Ic37a49c4aa006f7e6ae30174e33008d6252846e5
Reviewed-on: https://gerrit.instructure.com/108276
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-36233
webpack adds a fingerprint to the filenames that it outputs, which
means that if the content changes, the filename changes. so over
time, unless you manually know to rm -rf public/dist/webpack*
periodically, you'll start accumulating a ton of javascript files
in that dir that you don't need which can slow down your editor's
grepping, take up a ton of space, and confuse you. this change makes
it so right before webpack emits all of the new bundles, it cleans up
the ones that were there. it only cleans up the ones in the dir it is
outputting to, so you can still have prod bundles in
public/dist/webpack-production/ and dev bundles in
public/dist/webpack-development
test plan:
* run webpack before you check this out
* check this out
* run yarn then run webpack again
* you should see something in the webpack output like:
WebpackCleanupPlugin: 220 file(s) deleted.
* and there should be only one copy of each bundle in the
public/dist/webpack-development dir.
Change-Id: Ide7a7f53c255c7aa5ad09fb4ff0bcfd7436b2852
Reviewed-on: https://gerrit.instructure.com/108147
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-36232
The only thing this loader was being used for was
to make sure that all our handlebars helpers were
available to our handlebars templates, we can
accomplish the same by just loading it in the vendor
bundle before any templates load
Test plan:
Pages that use handlebars should still work
(AKA, build should pass)
Change-Id: I1d1044ffb6e1cb033626533d73c9c26f3cb5346f
Reviewed-on: https://gerrit.instructure.com/108143
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-36235
this is needed by g/108094. it makes it so plugins don't need to rely
on any of our custom loaders to load their handlebars templates
test plan:
* build should pass
* analytics pages that use handlebars templates should load as
they did before
Change-Id: Ic4f91ec9fc1f5dd6bd97fb74a67ba760fc14b13c
Reviewed-on: https://gerrit.instructure.com/108145
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
import just the particular instructure-ui / instructure-icon modules we
need, so that we don't get everything in the webpack bundle. also tweak
webpack config so people can't make this mistake again.
67d7ec7197 caused several bundles to balloon in size by a couple MB. this
gets us back down to sane levels (and many bundles are now smaller)
test plan:
specs? ¯\_(ツ)_/¯
Change-Id: I92b859063f56c672b85ec63f5c61ffd17735ced4
Reviewed-on: https://gerrit.instructure.com/107504
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
closes: CNVS-35702
This makes it so you don’t have to create a coffeescript
file to make a new bundle. Putting a file in:
app/jsx/bundles/foobar.js
will be treated exactly the same as:
app/coffeescripts/bundles/foobar.coffee
So from here on out, there is no excuses to create
new coffeescript files :)
Test plan:
* in the next commit I will actually move a couple
CoffeeScript files to be javascript files in the
jsx folder and it will make more sense
Change-Id: Ib5911b0a19760d66f43889c94f91fdd1eb9f85e9
Reviewed-on: https://gerrit.instructure.com/105166
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
fixes: CNVS-34727
this will make webpack faster because it cuts down
the number of files it has to look for when
it looks a module up. right now, every time
someone asked for a app/jsx/whatever.jsx file
it had to do a stat for app/jsx/whatever.js first
and then look for app/jsx/whatever.jsx. it also
slows every lookup for handlebars/coffescript files
since it has to look for the jsx first
this was just the result of running this command:
find . -type f -name "*.jsx" | while read FNAME; do git mv "$FNAME" "${FNAME//.jsx/.js}"; done
test plan:
* automated specs should pass
* webpack build should run faster than the patchset
before this one
Change-Id: Ia15ded6dc2b09c10c4f9070edcee9305b5b429ad
Reviewed-on: https://gerrit.instructure.com/101005
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-31785
test plan:
all builds should pass
Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
this will let us take advantage of caching in CI land, since the current
spot gets blown away from one build to the next (doubly so once we start
yarn'ing in CI)
Change-Id: I3f6493c5f55a3afa8ce5abcc028eb8f687d1f22a
Reviewed-on: https://gerrit.instructure.com/104686
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fixes CNVS-34969
test plan:
- go /profile/settings and turn on high contrast
- go to the course people page (/courses/#/users)
- click on the +People button
> expected result: the modal honors high contrast
- enter some text in he text area
> expected result: nothing bad happens, as the event
handler for TextArea has changed.
- there's a TextArea in MessageStudents also, but I don't
know where to find it in the UI. You should probalby
test it doesn't blow up either.
Change-Id: Ia8102dacfa2b01ee043002ee0f5c27943abe5743
Reviewed-on: https://gerrit.instructure.com/102133
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
That way, you can run
`JS_BUILD_NO_UGLIFY=1 npm run webpack-production`
and it will still output a comment with the path to each
Thing it defines/requires so you can more
easily tell what you are looking at.
But when it does uglify, it will still strip out
those comments
Test plan:
run: JS_BUILD_NO_UGLIFY=1 npm run webpack-production
The output it puts out should have comments about
which module it is defining
Change-Id: Ia6421f988848c1f6cc167bfe07ec0534ffc0ac79
Reviewed-on: https://gerrit.instructure.com/104204
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
speed up require_js and webpack builds. here's how:
* bump i18nliner
* it uses babel
* it is much faster
* tweak canvas_i18nliner to not need to precompile anything
* run i18n:generate_js without having to precompile anything
* webpack can avoid running js:generate altogether
test plan:
* tests pass
* i18n works as per usual under requirejs
* i18n works as per usual under webpack
* `rake i18n:generate`:
* builds identical yml before/after
* runs faster now
* works even if you nuke compiled coffee/jsx
* `rake i18n:generate_js`:
* builds identical translation files before/after
* runs faster now
* works even if you nuke compiled coffee/jsx
Change-Id: I2682e68ff87168d9f76e20deb93713aa9a50477a
Reviewed-on: https://gerrit.instructure.com/103285
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
just check in main.coffee, it pretty much never changes (especially since
the ember srgb will diaf soon)
this is (hopefully) one of the last pieces of the webpack puzzle
test plan:
* webpack and requirejs builds should be happy
* srgb should boot up in both
Change-Id: Icc1a6ad811cffca5ef18a6858d9103c9bbccf037
Reviewed-on: https://gerrit.instructure.com/103352
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
fixes: CNVS-35043
in the webpack build, we were relying on a
‘public/javascripts/compiled/bundles/screenreader_gradebook.js’ file
that was created as an artifact from the requireJS build.
that looked like:
require(['compiled/ember/screenreader_gradebook/main'],
function(App) { window.App = App.create(); });
this file does the same thing so we don’t have to worry about running
rake canvas:compile_assets before running webpack.
test plan:
*
* in webpack, go to the “individual view” (aka screenreader) gradebook
* it should load and not have any errors
Change-Id: I900004a6d73971f8dce01915ec69172341151f8a
Reviewed-on: https://gerrit.instructure.com/102296
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Fixes: CNVS-34067
Test plan:
* with webpack turned on and in prod mode
* run RAILS_ENV=production bundle exec rake canvas:compile_assets
* pick a different language on your user settings page (e.g.maori)
* go to /calendar
* the “week, Month, Agenda” buttons and everything
else on the page should be translated into your language
* go to other pages, e.g. /courses/x/assignments/new
* all of the strings on those pages should be translated too
(The broken behavior was that any strings that came from handlebars
Files would not be translated but ones coming from js, erb or
Coffeescript were)
Change-Id: I9a4b76e857b6c809b663d18abd7196ca10ef8564
Reviewed-on: https://gerrit.instructure.com/102534
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
fixes: CNVS-34796
emitting assets for each of these timezones adds a
non-trivial amount of time to the webpack build.
by making it so webpack doesn’t have to do anything
about them, it goes a lot faster since there is just
a lot less work to do.
this commit also uses npm to get `timezone` instead
of a git checkout
test plan:
in requireJS & webpack,
* load a few pages, make sure your timezone data loads
* automated specs should pass
Change-Id: Ice3b7b6d4c7ac53315d5cb238d4213afb9faddc5
Reviewed-on: https://gerrit.instructure.com/101116
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
closes: CNVS-34770
because the previous commit renamed
‘module’ to ‘qunit.module’ in all our specs,
we don’t need this loader anymore
in an effort to get rid of vendor code that is just
copy/pasted into our repo, this also has us use
npm to get qunit, sinon, and AXE.
test plan:
* because this only touches stuff for specs,
if js specs pass in both webpack and requireJS,
this should be good.
Change-Id: I1d1cbf187211ad1d04d775fe4469913b3942d74a
Reviewed-on: https://gerrit.instructure.com/101101
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@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>
Test Plan:
- Breaking those rules will be okay or in the case of
named stuff it fails :)
Change-Id: I5d41ec8d12aee5a59b6f35da0a86ed1571950998
Reviewed-on: https://gerrit.instructure.com/100877
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
in webpack, it would try to load the web worker from the
cdn configured in canvas_cdn.yml. it is against browser
security rules to open a web worker on a different origin,
so in production/beta it would not load and the page to take a quiz
would not load at all. It worked in requireJS because
it didn’t actually know to load the worker from the con
and since it just loaded it from the same domain the page
was served from, it did not have that problem.
this fix just inlines the web worker into a blob and
loads it itself, so there is no cross-origin problems
and we don’t have to have a requireJS or webpack plugin
to load web workers.
also, fix bug where webpack looked for compiled
version of quiz_taking_police
fixes: CNVS-34349
fixes: CNVS-34386
test plan:
using the CDN setup for dev/testing
in both webpack and requireJS
go to take a quiz,
the stopwatch should tick every second
Change-Id: I31e6ea0cd22d8dff8c8cb46c68e78d3f5c1989c0
Reviewed-on: https://gerrit.instructure.com/99521
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
This reverts commit 582417ce0b.
we are just going to stop using symlinks in caturday
Change-Id: If1957f932b98cca0d6e42ae9f37928a9f34249eb
Reviewed-on: https://gerrit.instructure.com/99279
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Fixes: CNVS-28306
Test Plan:
- ensure Admin > <your account> > Settings > Enable Profiles
and User Avatars are checked
- navigate to Account > Profile
- using keyboard:
- TAB (displays "skip to main content")
- ENTER (focuses on the main content of the profile page
- TAB (focuses avatar image)
- ENTER (displayes Select Profile Picture dialog)
- TAB 4 times (focuses "choose a picture")
- ENTER (displays system file open dialog)
- Select a photo
- The selected photo and crop-box are displayed and
have focus
- Use arrow keys to move the crop box around
- Use shift-arrow keys to size the crop box
- TAB twice to focus Save button
- ENTER closes dialog
- cropped image should be displayed on the profile page
change history
- added js spec for the cropper
- fix require_js config for react-crop
2016-12-13
- changes needed after react-crop distribution changed
- break CanvasCropper and CanvasCropperMaker into 2 files
in response to code review
2016-12-16
- update the react-crop version
- set a min size on the cropper (so it can't go negative)
- update css so image won't overflow its box
- address eslint warnings
2016-12-21
- fix merge conflict
note: the .rb file change supports the build. there is no need
for a corresponding spec
Change-Id: I2b6dc165ed5dc2865f282c35018686dd820fea30
Reviewed-on: https://gerrit.instructure.com/97197
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
fixes: CNVS-34235
test plan:
* automated tests should pass
* make sure that you see that it picks up all
the plugin stuff in the jenkins webpack build
* mv gems/plugins ./moved_plugins
* ln -s ./moved_plugins gems/plugins
* run webpack with those plugins in the symlinked
directory
* it should work
Change-Id: I97024d29d9dbf153147781af05c205fe766c0bd3
Reviewed-on: https://gerrit.instructure.com/99159
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
fixes: CNVS-31779 [webpack] bundle file size
test plan:
* using webpack, look at the network panel in
the chrome developer console.
* the total ammount of javascript loaded for any
given page should be much less than before this commit
and about on par with what requireJS loads for the same page.
* use chrome network panel to throttle to "Regular 3G"
* from both a clean cache and a primed cache:
* make sure that the total time to render the page
is about on par with requireJS
first change: load webpack chunks from CDN
fixes: CNVS-32261
test plan:
* run `npm run webpack-production`
* check your page, it should load js files and chunks
from the same hostname the page is served from.
* now set a host: in config/canvas_cdn.yml
(for testing locally, I just set it to http://127.0.0.1:3000,
* restart rails and reload the page, now the scripts and
chucks should come from that new hostname
second change:include fingerprints in webpack bundle and chunk filenames
closes: CNVS-28628
with this change we don't need to run `gulp rev`
after running webpack and we can load both the bundle
and chunk files safely from the cdn, since they will
have content-based fingerprints so we can tell
browsers to cache them forever. (we set those
http caching headers in lib/canvas/cdn/s3_uploader.rb:53)
test plan:
* for both dev and production
* run `npm run webpack` (or `npm run wepack-production`)
* with a cdn configured in canvas_cdn.yml, run:
RAILS_ENV=<dev or prod> bundle exec rake canvas:cdn:upload_to_s3
* check to make sure that the page loads the webpack js,
that there are no errors, and it all came from the cdn
third change: properly handle moment locale & timezone in webpack
test plan:
(see application_helper_spec.rb)
* set a non-default user timezone, context timezone
and locale
* dates should show up in your timezone and and
the date helper strings should be in your language
better handling of moment custom locales
closes: CNVS-33811
since we now have hatian and maori, we need to do this in
a way that is not just a one-off for maori
test plan:
* set your locale to maori
* in webpack & requireJS make sure dates show up right
Change-Id: I34dbff7d46a1047f9b459d5e1c0d141f435d42fb
Reviewed-on: https://gerrit.instructure.com/95737
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This is purely a refactor of the existing grade calculator. It does not
alter existing behavior, but bolsters its spec coverage to protect
against unexpected grade calculation changes.
Ensuring that calculated grades are unchanged before and after this
refactor will be sufficient for QA.
closes CNVS-33841
refs CNVS-33572
test plan:
A. select or create:
1. a course
2. a teacher for the course
3. a student for the course
4. an assignment group for the course
5. an assignment in the assignment group
6. a graded student submission
B. ensure scores are calculated and visible for:
1. Default (grid) Gradebook
2. Individual Gradebook (SRGB)
3. SpeedGrader
4. Student Grades Page
Change-Id: I1e87949dc690d4ebee4e3960f2adb141bc5a5e0d
Reviewed-on: https://gerrit.instructure.com/96780
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
closes: CNVS-33810
because this is code that runs on node 6, we can
actually rely on all our es2015 "best practices".
this change was because the code in this folder had a bunch
of different styles and incosistencies, and I wanted to clean it
up while I am working on all this webpack stuff before we turn
it on everywhere.
this is basically the result of running:
npm install -g jscodeshift
cd ..
git clone https://github.com/cpojer/js-codemod.git
jscodeshift -t js-codemod/transforms/arrow-function.js canvas-lms/frontend_build
jscodeshift -t js-codemod/transforms/no-vars.js canvas-lms/frontend_build
jscodeshift -t js-codemod/transforms/object-shorthand.js canvas-lms/frontend_build
jscodeshift -t js-codemod/transforms/template-literals.js canvas-lms/frontend_build
jscodeshift -t js-codemod/transforms/trailing-commas.js canvas-lms/frontend_build
npm install -g standard-format
cd canvas-lms/frontend_build
standard-format -w
Change-Id: Ifb347a5577504dbca6402ad3ec71de2ec58a423a
Reviewed-on: https://gerrit.instructure.com/92166
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes OUT-4
Test plan:
On eportfolios page,
- verify that pages and sections
can both be reordered using the mouse (drag and drop)
and the new move to dialog.
- verify screen reader a11y for move to dialog
- verify moved edit/delete functionality still works
as expected
Change-Id: I342fcb0a4ac7e995f0566687cd1daceb2be4f1f3
Reviewed-on: https://gerrit.instructure.com/96188
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins
test plan:
- add the following line to your .bashrc/.zshrc or equivalent,
making sure to replace the CANVAS_PATH:
export ENABLE_CANVAS_WEBPACK_HOOKS=1
source $CANVAS_PATH/frontend_build/webpackHooks/macNotifications.sh
- reload your shell (`source ~/.zshrc` or equivalent)
- run `npm run webpack-development`
- notice that a notification is displayed in OS X when the build
starts and finishes
Change-Id: I1139bdf4da2711fa9ce340eaa96165ccbd3ceec1
Reviewed-on: https://gerrit.instructure.com/95656
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Any code requiring lodash and consuming functions from that library in
ways not compatible with the older version of lodash available in Canvas
will succeed when built with requirejs, but fail when built with
webpack.
closes CNVS-33578
test plan:
* run all tests against webpack
Change-Id: Ie0465e23f7ac5bb5a5eca97068fbc66e579e08aa
Reviewed-on: https://gerrit.instructure.com/96319
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
This removes the ill-fated React Gradebook.
This commit is effectively a revert of
b9534edd64
closes CNVS-32394
test plan:
* ensure 'Gradebook Performance' is no longer available
* ensure other Gradebooks are still functional
* Default Gradebook basic happy path
* Individual Gradebook (SRGB) basic happy path
Change-Id: Ie71ab4dfb17f494c2a7c17a27cd551a84e7efb96
Reviewed-on: https://gerrit.instructure.com/94005
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
since we're on node 6.6 now, we don't need
babel for anything we were using it for in our
frontend build/webpack code that runs on node.
(except for es6 import/export)
Change-Id: I41352fdc8adb06fe1585565f63d808d249f92864
Reviewed-on: https://gerrit.instructure.com/91573
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
This is a combination of 3 commits.
The first commit's message is:
fix quiz log auditing build in webpack
fixes: CNVS-33125
test plan:
* webpack aux build & selenium should pass
* enable the quiz log auditing feature flag
* go to the quiz log audit page:
eg: http://c.dev/courses/1/quizzes/2/submissions/1/log
* make sure the page loads without any script errors
This is the 2nd commit message:
fix webpack build of ember screenreader gradebook
fixes: CNVS-33051
test plan:
* tests should pass, both in webpack and requireJS
* in both webpack and requireJS
* go to the the screenreader gradebook page
* it should load without errors
This is the 3rd commit message:
fix js tests in webpack
Change-Id: I75e2d3d8ec3c817d5ac7d4aade5204f9a6016c10
Reviewed-on: https://gerrit.instructure.com/94497
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
closes: CNVS-32896
test plan:
touch config/WEBPACK
run `npm run webpack-production`
run `RAILS_ENV=production rails server`
it should work
Change-Id: Ic2cf2ddff6f3c2ffe6fd1a6971813824fcebe638
Reviewed-on: https://gerrit.instructure.com/92152
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-31787
the only things left in bower are things that
are just not avalable on npm because they are so old.
we'll have to continue using the bower versions of them,
but it's ok since they are mostly old ember stuff
that will be ripped out when we finish our react screenreader gradebook
also:
remove some ember stuff that wasn't being used anymore.
nothing was using this stuff
test plan:
this really does touch a lot of stuff. some things
to check out specifically in the prod/optimized requireJS build:
(load the page, click around to make sure things work)
the screenreader gradebook
client_apps:
quiz statistics
quiz event logging
creating a new student group
calendar, try all the views (month/agenda/etc)
gradebook 2
turn on the new course/user search feature for your account
and go to accounts/x and search for a user/course
the new react gradebook
use tinymce on a page, make sure that both the service
and local version of it work
Change-Id: I4322a154d289760ab51b92e34dd7fac808b41ba8
Reviewed-on: https://gerrit.instructure.com/93102
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
wheee regexes
spec/javascripts/jsx/speed_grader/mgpSpec.jsx was breaking :allthethings:
cuz 1. require and 2. multiline. now we allow those, cuz why not
test plan:
1. js specs should still pass under requirejs
2. js specs should now pass under webpack
Change-Id: I039991bcb8fd5afd25ffa1ede487bd3691848761
Reviewed-on: https://gerrit.instructure.com/91196
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
closes: CNVS-31940
This is to try to not break code of our customers
that use RequireJS-style `require`s in their Custom
JS files from ThemeEditor. It is not meant to be
comprehensive. There will be some customers that
need to change their code, but there was a lot that
just used require to load jquery or just load an
external script. this should handle both of those cases.
test plan:
* with webpack turned on, type this into the console:
require([
'underscore',
'jquery',
'https://code.jquery.com/color/jquery.color.js'
], function(_, $) {
console.log('got', $, _, $.Color.names)
})
* it should log underscore, jquery and the colors
Change-Id: I88ad111ac6c475c9bb0987ed98bec10417a6eea0
Reviewed-on: https://gerrit.instructure.com/90379
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
test plan:
* before checking this out, run:
NODE_ENV=production npm run webpack-production
* check the size of the common bundle with:
ls -lah public/webpack-dist-optimized/instructure-common.bundle.js
* check this out and run it again
* the size of that file should now be smaller
Change-Id: Ice764700e75c2a793b2807b6a77e30fa7b2f2c25
Reviewed-on: https://gerrit.instructure.com/90432
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
closes: CNVS-29725
this gets everything working on node 6.
As far as our build process goes, it cannot support
running on both node 6 at the same time as 0.12
since our i18nliner handlebars stuff uses jsdom and
one version of it only works on node <4 and the
next only works on 4+.
But the stuff in the production dependencies in
package.json, aka the stuff that runs on the job
servers (brandable_css), can work on both. we just
need to run npm rebuild on the job servers if the stuff
that was npm installed into ./node_modules was compiled
against a different version of node. that is done here:
https://gerrit.instructure.com/81254
that commit needs to be committed to caturday before
we commit and deploy this to beta
as far as managing node, there are 2 "official"
ways that will make you life easier, you can either
just use docker or use nvm (https://github.com/creationix/nvm)
if you use nvm and if you use ZSH:
Put this into your $HOME/.zshrc to call nvm use automatically
whenever you enter a directory that contains an
.nvmrc file with a string telling nvm which node to use:
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
if [[ -f .nvmrc && -r .nvmrc ]]; then
nvm use
elif [[ $(nvm version) != $(nvm version default) ]]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
but however you do it, as long as you have node 6.2
installed it should work
test plan:
* install nvm
* check this patchset out
* run bundle exec rake canvas:compile_assets
* it should work
* use theme editor to preview a change to a theme
* it should work
Change-Id: I1cc9faed361938afc713c4b921042386b956db70
Reviewed-on: https://gerrit.instructure.com/80839
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes: CNVS-30472
since client_apps/canvas_quizzes is the only
thing that cares about our old version of
react and react-router, this moves them out
of canvas and into canvas_quizzes so it is the
only one that can use them. This simplifies
things in canvas so no one ever tries to
use them going forward.
test plan:
* inside of client_apps/canvas_quzzes
run: `script/build && grunt test`
* it should pass jenkins
* click around in the quiz stats and quiz log
auditing apps to make sure they still load
mv old_unsupported
Change-Id: I56eadedfe2417f32f2afb99ec76a21870871ad7e
WIP move "old_unsupported_react" to client_apps
Change-Id: I673321b51db9b197a298ccb831c417e902aaae28
Reviewed-on: https://gerrit.instructure.com/85483
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This keeps quiz_statistics using the underscore compatible
version of lodash 2.4.1 in which exists _.findWhere rather than
using the new 4.x version of lodash recently added.
closes CNVS-30750
Test Plan:
- Post-merge and silent patchset builds for selenium webpack pass
Change-Id: I4f63aa431e29b77dd46dad4a9828afe10e84ef85
Reviewed-on: https://gerrit.instructure.com/86007
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
For some reason some plugins like analytics have specs that
live in `spec_canvas/coffeescripts` it seems that webpack never
properly picked those up and complained about it in warnings.
Test Plan:
- Webpack tests pass
Change-Id: I1c84f6850aa0501a5659aabde7768257e97a9253
Reviewed-on: https://gerrit.instructure.com/78723
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
This fixes it post 4f547f345b
Test Plan:
- Webpack builds without complaining about it
Change-Id: Ie6d58a3d9ac4b1c9ee4b8a1075c57321c630a3c7
Reviewed-on: https://gerrit.instructure.com/82473
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
fixes CNVS-28474
From what I could tell, none of the hbs templates were being passed the
`scope` value as part of the helper method `options.hash`, and that's
because we were not using the preprocesses that
PreProcessor.processStatement override via
frontend_build/i18nLinerHandelbars.js.
test plan:
- Load canvas using the Webpack build.
- Go into Calendar.
- Click on a day in the month and a Edit Event modal should pop up.
- Observe that the `Date:` labem is present, whereas it used to say
[object Object].
Change-Id: I8e077261379b43f5be27ab6544d9d05a47e97625
Reviewed-on: https://gerrit.instructure.com/81558
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Fixes PLAT-1564
Test Plan
- With the new collaboration feature flag turned on
- For a user, create some collaborations with the
collaboration_type=external_tool_collaboration
- Load the lti_collaborations page
- Notice that collaboration now shows
Change-Id: Ie17a599fa4b54a98eff7060c2c72b2c76c242b3d
Reviewed-on: https://gerrit.instructure.com/81645
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
Previous to this change if the callback only contained
'$' or '_' as variables to hold the required dependency,
it was not detected and qunit was not injected properly
fixes CNVS-29207
Test Plan:
- Automated tests pass that contain only $
- Normal automated tests pass
Change-Id: I22d9cb390bfc1f0b579577dc7bec2de40fd5dc3f
Reviewed-on: https://gerrit.instructure.com/79017
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
closes: CNVS-28669
refs: CNVS-28781
Back in 2013 we came up with an awesome idea to have these
"Tours" to introduce new features and stuff. It was a
great idea but we don't use it anymore. it has been commented
out so it doesn't show up in the styleguide and all but one
(see below) were commented out of config/tours.rb.
so in the interest of not letting code hang around
that we don't use, I'm removing it (unless anyone is opposed
or has a good reason to leave it). If we want to do it in the
future, we can just add it back, because yay Git!
There was one place in quizzes that was still trying to
use a tour. if you go to create a quiz and edit a question
and then pick another option as the correct answer for a
multiple choice question it would try to show a tour telling
you that you could regrade all the existing submissions. but
in reality it just threw a javascript error and the tour never
popped up. So even though it was still in the code, it didn't
work. Since no one noticed that it stopped working, I'm assuming
we don't need it any more. Quizzes team and quizzes
product/QA, will you confirm this is ok?
test plan:
* no tours should show up anywhere in canvas
* read that paragraph above about the "regrade existing"
thing in quizzes.
* try that feature, it should work but no tour should show up
and no error should occur in the console
Change-Id: Ib2d6bbb80f93fd7ca0a33d20c1f57ee16e7027ea
Reviewed-on: https://gerrit.instructure.com/76875
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
refs: CNVS-27874
TEST PLAN:
1) run webpack build
2) should be fast
3) load the calendar page
4) all the styles should look good
Change-Id: I28d9205fbf53616ed9264d8393dc617962e43c22
Reviewed-on: https://gerrit.instructure.com/74197
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This follows up to f725bcf813
by also removing it from the webpack build.
Test Plan:
- The webpack build works still
Change-Id: I43aa82c129aa9dbf5bf4d4e4928f39701af147a8
Reviewed-on: https://gerrit.instructure.com/75887
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
it was just a bundle that required another bundle
the only place we used this calendar2.
this just removes the step of indirection and
simplifies things so we don't have to do extra work
to workaround it in webpack
refs: CNVS-27679
test plan:
in prod env, go to calendar2
do some things that cause modals to open
it should work
do the same with webpack on
Change-Id: I23fc7836e1def8283d582df98f895cdc6d8f1317
Reviewed-on: https://gerrit.instructure.com/73242
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This makes it so using async test features of qUnit works within
the JSX specs.
Change-Id: I602468d7ef70091e603f02bc9558390b94c0bfee
Reviewed-on: https://gerrit.instructure.com/74527
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
This makes it so that multi-line define statements work with
the qunit dep loader for jsx.
Prior to this commit
```
define([
'jsx/account_course_user_search/reducers/rootReducer'
], (reducer) => {
```
is not properly transformed, however
```
define(['jsx/account_course_user_search/reducers/rootReducer'], (reducer) => {
```
does get transformed properly.
Effectively, this replaces the `.` regex operator which doesn't transend
newlines with `[\s\S]` which effectively does the same thing
including newlines as well though.
Change-Id: Ife96438695997050fbdf866b7c319fa1b075875a
Reviewed-on: https://gerrit.instructure.com/74419
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
refs: CNVS-27679
if you name your config files *.config.babel.js
webpack knows to run them through babel. this change
makes it so use es6 stuff in the webpack.config files
(including everything in /frontend_build)
test plan:
run webpack
it should work
Change-Id: I6ceda3386227c30e106339f744f18dc61bbab54b
Reviewed-on: https://gerrit.instructure.com/73241
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
closes CNVS-27874
TEST PLAN:
1) run webpack build
2) should be fast
Change-Id: I3d0b07cb7417cbd235bd628375d9888c6cc8d090
Reviewed-on: https://gerrit.instructure.com/74112
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
closes CNVS-27767
it’s the same reason as jsx was added here.
we compile handlebars templates to public/jst/etc
which matches to the same require path
so if you require “jst/wiki/WikiPageEdit”, it will grab the requirejs
pre-compiled version rather than the handlebars source
so watch doesn’t pickup changes to the handlebar template
TEST PLAN:
1) build with webpack
2) make a handlebars change
3) webpack picks it up
Change-Id: I57e89652a43d3046a71b5779ffff883907da2b14
Reviewed-on: https://gerrit.instructure.com/73794
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
the artifacts generated by the requirejs build can
be picked up by webpack, we need to make sure that
doesn't happen to allow webpack to find changes as you work.
Change-Id: I8df9ca16105eb8f179b82111ebc516de0410226d
Reviewed-on: https://gerrit.instructure.com/72121
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
Replicate old require-js plugin behavior
for making sure contextual timezone and locale
information is loaded before any other modules
depend upon it.
TEST PLAN:
1) grading_periods_account_spec should pass in
webpack selenium build
Change-Id: I46871b15e803e551149d344922f1679906873c54
Reviewed-on: https://gerrit.instructure.com/70553
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
the migration_tool plugin uses the secondary
bundle override technique of having an extension
bundle loaded in parallel. I don't think we
want to support both that and the glue-module
extension approach since only one plugin makes
use of the former. In order to migrate that
work to extend a core module, the work
needs to be moved to a non-entry-point
module (because overriding require names doesn't
work if you're talking about the bundles
rails knows how to load). All this patchset does
is move the core work done in the content_migration
bundle into it's own module to make a valid
override target for the plugin refactor.
Also adds this new module as a non-entry-point
exception in the bundles.js, just like it's sibling
file.
TEST PLAN:
1) nothing should change on /courses/x/content_migrations
Change-Id: I2dfa0d1b1d11657bb5931e8caae6ef9d4b3c9aec
Reviewed-on: https://gerrit.instructure.com/70510
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
the "app" directory as root is only present for docker users.
we can just remove it from the matchers for jsx loaders
and then these work on jenkins too.
TEST PLAN:
1) spec/selenium/quizzes/quizzes_stats_spec should pass in selenium
webpack build
Change-Id: I51f915452de5f4a3f98407d6e3b90a4b18a8671e
Reviewed-on: https://gerrit.instructure.com/70292
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
alias case-sensitive file names so they build
the same on Linux as OS-X
Change-Id: Ib36193d7f7a6c3f77e4eac6e5650ea549747b957
Reviewed-on: https://gerrit.instructure.com/70203
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
Use an AMD-rewritten version of old react-router
and expose some of reacts internals that
react-router depends on (named AMD across files
is something web pack does not support), and leave
the other version for the require-js build for now.
Also, add gulp rev as a web pack post build action.
TEST PLAN:
1) regression check QLA and Quiz Stats
to make sure reworking their dependencies didn't
crash everything
Change-Id: Id2b448a334494ebd3d353678742bf07c1b7833eb
Reviewed-on: https://gerrit.instructure.com/69837
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
remove dynamic requirements for env configs,
use separate jsx loader for client apps,
update client app plugin to use old react version,
rewrite selenium spec to be an integration test
rather than executing arbitrary javascript,
and MAJORLY refactor loading patterns of client apps
to avoid sharing code with differences delineated
by opaque require re-writes.
Also moved some code that was in "common" client
app but only used by one actual client app down
into the app that uses it (simplifies dependency
tracing).
TEST PLAN:
1) make sure quiz statistics still works ok under
require js build, no behavior should have changed
2) also make sure quiz log auding works under require-js
Change-Id: I0e5ee3eda9da16e0ad48cf858761735c71df801c
Reviewed-on: https://gerrit.instructure.com/69804
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
This prevented non-docker installs from web packing
correctly, unless they happened to be inside
a directory called "app".
TEST PLAN:
1) nothing should change, no production code impact
Change-Id: Ice89ed1295e0502bc9d6cc432767f371a1a53b83
Reviewed-on: https://gerrit.instructure.com/70016
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
newly added bundles are being missed.
Look for bundles in "app/coffeescripts/bundles"
and reject those which are not entry points.
TEST PLAN:
1) specs should pass
2) web pack selenium build should have less failures
Change-Id: I7562e4f6124a78b62cdd59151067ce31ac65e164
Reviewed-on: https://gerrit.instructure.com/69311
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-25714
TEST PLAN:
web pack should compile in like 60 seconds rather than 600
Change-Id: I74716d9cccfd0253693660c0b4ad4368e91b72e7
Reviewed-on: https://gerrit.instructure.com/68497
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>