Commit Graph

29 Commits

Author SHA1 Message Date
Ethan Vizitei be337eeb01 webpack: dont rely on translation files in development
Change-Id: I12bf4332bf9ec57a509d08bf71073033756b17bf
Reviewed-on: https://gerrit.instructure.com/72366
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-05-27 22:52:41 +00:00
Clay Diffrient 4655dc941d Loosen up regex for detecting amd callback
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>
2016-05-09 16:25:27 +00:00
Ethan Vizitei 513cadec68 remove react-router from webpack vendor bundle
fixes CNVS-29021

TEST PLAN: webpack should build

Change-Id: I5db995adfbeb876df681e310714e5b65a40af96f
Reviewed-on: https://gerrit.instructure.com/78237
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-04-28 21:17:32 +00:00
Ryan Shaw 80a7fb0941 remove "Tour" functionality. nothing used it.
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>
2016-04-21 18:25:05 +00:00
Ryan Shaw c3386397ef cleaner way to lookup brandable_css fingerprints for webpack
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>
2016-04-06 17:03:44 +00:00
Clay Diffrient 96674ee369 Remove firebugx from webpack build
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
2016-03-31 18:24:59 +00:00
Ryan Shaw b81b78b325 remove strange jquery_ui_menu bundle
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>
2016-03-28 22:46:06 +00:00
Clay Diffrient e659ffd70f add start and async test to the replacements for qunitjsxloader
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>
2016-03-15 18:18:04 +00:00
Clay Diffrient e1a19ff487 Fix qunit jsx dependency loader regex
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>
2016-03-14 18:39:12 +00:00
Ryan Shaw ad34b40c32 make it so you can use es6 in the webpack config stuff
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>
2016-03-11 21:18:43 +00:00
Ethan Vizitei 16c6c1c172 webpack: Help handlebars compilation not be terri-slow.
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
2016-03-09 18:56:39 +00:00
Ethan Vizitei d32465ecd5 make web pack specs pick up jsx specs
closes CNVS-27835

TEST PLAN:
  1) aux builds should pass

Change-Id: I882c89fba1240037bbda11f321a5afd85e854ced
Reviewed-on: https://gerrit.instructure.com/73971
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-08 19:08:14 +00:00
Ethan Vizitei 35c84fc95f webpack: use handlebars source
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>
2016-03-08 17:02:56 +00:00
Ethan Vizitei 9be656a7f7 add ENV var to skip js rev'ing in dev if you want
Change-Id: I7eb1413191d9b0ca0178459b96430c796334d11b
Reviewed-on: https://gerrit.instructure.com/72376
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-03-02 00:06:29 +00:00
Ethan Vizitei 2329d50839 stop webpack from loading js-from-jsx
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>
2016-02-12 18:18:31 +00:00
Clay Diffrient 7f6d18f574 Remove unused redux-promise library
Change-Id: If8e348fbbe880034a871c35156a050f2ff486c19
Reviewed-on: https://gerrit.instructure.com/71973
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-02-11 21:40:04 +00:00
Clay Diffrient b9119afe32 Remove react-bootstrap-table from webpack noParse
This allows the library package to be parsed correctly
handling uses of require

Change-Id: I17ee5eb2d8b7f083371388b316d311caebb712c3
Reviewed-on: https://gerrit.instructure.com/71975
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-02-11 15:49:15 +00:00
Ethan Vizitei da9a226eb4 make webpack able to digest jsx from plugins
Also don't parse the react bootstrap table plugin, it's already
a prebuilt thing that doesn't require other things.

Change-Id: Ibdc06483afc22fe53d08a50892ac2d1322d759e2
Reviewed-on: https://gerrit.instructure.com/71646
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-06 23:37:44 +00:00
Ethan Vizitei f58d5b5023 shim in web pack version of timezone plugin
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>
2016-01-19 21:48:07 +00:00
Ethan Vizitei 51baba3eeb move content_migration work into support bundle
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>
2016-01-19 18:25:12 +00:00
Ethan Vizitei 4f797398d9 fix quizzes/quizzes_stats_spec.rb in selenium
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>
2016-01-14 20:35:44 +00:00
Ethan Vizitei aa477b031c Fix webpack selenium specs for course/account searches
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>
2016-01-14 00:34:06 +00:00
Ethan Vizitei b271b5d694 build quiz log auditing w/ web pack
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>
2016-01-14 00:33:38 +00:00
Ethan Vizitei 81561784e0 web pack port of quiz statistics
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>
2016-01-14 00:33:19 +00:00
Ethan Vizitei e94267df29 fix client_app reference in web pack build
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>
2016-01-12 17:39:26 +00:00
Ethan Vizitei f6b4b6e0e1 glob for web pack bundles
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>
2015-12-22 15:47:36 +00:00
Ethan Vizitei 765507f63e several things to help webpack compile speed
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>
2015-12-09 19:25:30 +00:00
Simon Williams a1e7f57c56 webpack tests
closes CNVS-24966

change js specs to work with web pack.
update some dependency references, make some aliases
for external dependencies to get the right version,
and clean up a bunch of leaky state.

TEST PLAN:
js tests should pass in web pack _and_ requires

Change-Id: If37fbce93e7e67021d90bacb470ffc4f1b17402d
Reviewed-on: https://gerrit.instructure.com/66309
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-24 18:40:58 +00:00
Ethan Vizitei d7f61d1820 use web pack
closes CNVS-24124

makes working with web pack possible in canvas
instead of require-js.  See doc/working_with_webpack.md
for instructions.

TEST PLAN:
Nothing should change in non-webpack'd behavior
Things should mostly work when you use the
USE_WEBPACK environment variable, but make sure to document
and ticket things that don't

Change-Id: I493a259a609e9e183950bc57aa5876df70108547
Reviewed-on: https://gerrit.instructure.com/64386
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-02 16:27:14 +00:00