Commit Graph

16 Commits

Author SHA1 Message Date
Ryan Shaw 5d998e808e clean up old webpack artifacts after each build
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>
2017-04-11 16:31:12 +00:00
Ryan Shaw 8ed5ab2252 Use jQuery.tabelsorter from npm
closes: CNVS-35924

Test plan:
webpack && bin/rspec ./spec/selenium/interactions_report_student_spec.rb:33
Should pass.

Also, go to that page and verify that you
Can click on the column headers and sort by that
column

Change-Id: I68227ea44b44ee33ce2d1078299b2f62e52bd058
Reviewed-on: https://gerrit.instructure.com/106513
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-04-11 15:45:03 +00:00
Derek Bender d261106efe upgrade sinon
Change-Id: I4dfe355bbfe1f0de2fb5028b1d4b4b8443a69cc7
Reviewed-on: https://gerrit.instructure.com/108112
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2017-04-10 22:09:34 +00:00
Jon Jensen 0939898e56 fetch all pages of students for adhoc override
fixes CNVS-28479

when a course has more than 200 students (so not all are prefetched) and
an adhoc assignment override specifies more than a page size (default
10) of students, it's possible for some students in the override to be
neither prefetched nor in the first page of results when fetched by ID.
make sure to fetch all pages of results when fetched by ID.

also make the 4 prefetch requests happen serially, and only once the user
begins interacting with the component (hover or focus). this way we don't
fetch more than we need to in small courses, and we don't fetch anything
if the teacher isn't using this part of the UI (generally the case). this
has the added benefit of speeding up selenium specs, as it has only one
server thread and the `get` waits for all ajax requests to complete

test-plan:
  part 1:
   - have a course with at least 201 students
   - have an assignment in that course with an override that specifies 11
     students
   - have the 11th student specified for the override be the 201st student
     in the course
   - edit the assignment
   - confirm you see the name for the 201st student (11th in override)
     instead of "Loading..."
  part 2:
   - have a course with 51 students
   - go to edit a new assignment
   - confirm no /users ajax requests happen initially
   - focus the "Assign to" widget so you can manage overrides
   - confirm there are 2 ajax requests for /users
   - confirm you see 7 students in the dropdown (either immediately or
     with a very slight delay, depending on whether you clicked or
     tabbed into the widget)
   - confirm you can search for any of them without additional ajax
     requests

Change-Id: I47ed202eb0d8ac1ad9e4ad21e50ceae930a6f3fe
Reviewed-on: https://gerrit.instructure.com/106693
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2017-03-31 18:58:45 +00:00
Mysti Sadler 5008dda896 Update webzip export version to 1.0
closes OFFW-179

Change-Id: I30ade8c7931b3ae49fbbb01b2ef3fa199cd8d065
Reviewed-on: https://gerrit.instructure.com/106770
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2017-03-29 16:13:22 +00:00
Shahbaz Javeed 1f70432fa2 upgrade instructure-ui to 1.3.1
test plan
* Specs should pass
* Load up gradebook and everything should work

Change-Id: I5734e9262244154c495725f89d92841547aba473
Reviewed-on: https://gerrit.instructure.com/106662
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
2017-03-28 21:57:55 +00:00
Neil Gupta 42efe68dd8 Update InstUI to 1.2
Change-Id: Idf9a961c691fa398ed50445bd77aefb6fb00483c
Reviewed-on: https://gerrit.instructure.com/105852
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2017-03-21 17:47:32 +00:00
Jon Jensen e823e67fe5 get yarn.lock up to date
Change-Id: I8d570ef3e0a53141e2a3e6458fc8c064dd1993e8
Reviewed-on: https://gerrit.instructure.com/105143
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-03-15 14:13:41 +00:00
Jon Willesen 3e9365cc88 bump offline course viewer to 0.3.0
fixes OFFW-126

test plan:
* build passes

Change-Id: Ic5a4d3dea5527b1c8c98448a4dd0751b863872dc
Reviewed-on: https://gerrit.instructure.com/105006
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
2017-03-14 17:18:31 +00:00
Ryan Shaw 3c3078b3ac upgrade coffescript so we can use import/export
Fixes: CNVS-35540

test plan:
Since this upgrades the coffeescript compiler version,
it changes the format of the code that it generates so it has
the possibility to break things in a strange way if someone was
doing something in a way that was not actually supposed to be
supported as part of the coffeescript language spec or if we
run into a weird edge case of the compiler doing one thing before
but doing it in a way where our code breaks now. Having said that,
since there is no specific place where we intended things to change:

* automated specs should pass

Change-Id: I0630c25db7f97e69675992bba2ebccfdaf918ed3
Reviewed-on: https://gerrit.instructure.com/104677
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-14 16:09:54 +00:00
Stephen Jensen ed5d6260a7 Bump instui to version 1.0.2
Test Plan:
- InstUI components in canvas should behave as before

Change-Id: Icf74b119347d1af7d037abe6bed1cab655ca4a48
Reviewed-on: https://gerrit.instructure.com/104670
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-03-13 22:21:58 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
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>
2017-03-13 22:10:23 +00:00
Ed Schiebel d1664390e2 Upgrade instructure-ui to 1.0
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>
2017-03-08 19:23:07 +00:00
Ryan Shaw 0627c2faef Upgrade brandable_css
fixes: CNVS-35414

the actual changes are here:
https://github.com/ryankshaw/brandable_css/commit/1fa1c2bc10c

Test plan:
Before checking this out, run:
rm -rf public/dist/brandable_css
RAILS_ENV=production node_modules/.bin/brandable_css
rm public/dist/brandable_css/brandable_css_*
cd public/dist/brandable_css/
git init .
git add .
git commit -am “original”
cd ../../..

Check this out, then run:
yarn install
RAILS_ENV=production node_modules/.bin/brandable_css
rm public/dist/brandable_css/brandable_css_*
cd public/dist/brandable_css
git diff

There should be no difference

to test the S3 stuff still works:

* set up your config/cavnas_cdn.yml file with a valid s3 bucket
* run `brandable_css`
* pull up a canvas page.
* the css should show up right and should be coming from your 
  cloudfront url

Change-Id: Iee1a7a916c3f17341adf513c2981b018420f7c16
Reviewed-on: https://gerrit.instructure.com/104016
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-06 20:02:51 +00:00
Jon Jensen ec1840b502 make xsslint not need js:generate, fixes SD-2160
this does make xsslint about 10x slower, since:
1. babel is slower than acorn
2. we now have to coffeescript everything on the fly

will revisit perf in another commit

Change-Id: I2ddad309d1921ba6a4e15cd79d3d8bd956a7e403
Reviewed-on: https://gerrit.instructure.com/103850
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-03 17:24:16 +00:00
Ryan Shaw 05f55c1c30 Deprecate `npm` client. Use `yarn` instead
Closes: CNVS-35152

This changes all our tooling that used `npm` to
Run scripts to use `yarn`. `npm` will still work
for now but if you have yarn installed, it will use
that.

Cheat Sheet:
old command      -> new command
npm install      -> yarn install (or just `yarn`)
npm run webpack  -> yarn run webpack
npm test         -> yarn test
See more at https://yarnpkg.com

Test plan:
* all Jenkins builds should pass
* without yarn installed:
* run script/nuke_node.sh
* it should work and warn you about how `npm` is deprecated
* now install yarn, e.g.: `brew install yarn`
* run script/nuke_node.sh again
* it should work and you should see silly yarn emoji
  in the output and it should be a lot faster

* the docker changes I made should work and docker should
  build correctly and use yarn.

Change-Id: I4aa31eeae3ecc504634a7c72a1ea0d3396f445e3
Reviewed-on: https://gerrit.instructure.com/102969
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-01 19:39:01 +00:00