Commit Graph

339 Commits

Author SHA1 Message Date
Ryan Shaw 6f910dbc43 treat anything in gems/plugins/* as a workspace
Fixes: https://github.com/instructure/canvas-lms/issues/1323

This lets open source users continue putting their own plugins with npm 
deps In gems/plugins. They will still have to have a forked version
Of yarn.lock though since that will be different for them than a
“Default” install.

Also, this means that everyone will see a bunch of warnings like this
Every time they yarn install:
Warning: gems/plugins/academic_benchmark is a dir… no package.json
Warning: gems/plugins/account_reports is a dir.. has no package.json
Warning: gems/plugins/canvas_geoip is a …, but has no package.json
Warning: gems/plugins/demo_site is a directory, but has no package.json
Warning: gems/plugins/instructure_misc_plugin is … has no package.json
Warning: gems/plugins/moodle_importer is a d.., but has no package.json
Warning: gems/plugins/qti_exporter is a dir…, but has no package.json
Warning: gems/plugins/respondus_soap_endpoint is … no package.json
Warning: gems/plugins/simply_versioned is a …, but has no package.json


Test plan:
* yarn install should work

Change-Id: Ie65c8faf8b1022210cfb7eda8c25107facfe83b5
Reviewed-on: https://gerrit.instructure.com/158043
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-07-20 21:20:56 +00:00
Ryan Shaw e09c9f9afa Downgrade node-sass to fix styling of flashMessage
Fixes: SIS-3125, COMMS-1328

In g_instructure.scss, we have some scss that looks like:

#flash_message_holder, #flash_message_buffer {
  …
  li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
    …

In recent versions of node-sass that gets output as:
#flash_message_holder li, 
#flash_message_buffer li {
  ...
}

Instead of how it should be:
#flash_message_holder li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error), 
#flash_message_buffer li:not(.ic-flash-info, .ic-flash-success, .ic-flash-warning, .ic-flash-error) {
  ...
}

Change-Id: I6aad4a6793228c97114220f5f2b2ec85ac9ae61d
Reviewed-on: https://gerrit.instructure.com/157921
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-19 19:46:03 +00:00
Clay Diffrient 2dc1d7fa86 Add a way to generate better js coverage
This should pick up coverage from both karma and jest
in Canvas proper.  It should also pick up coverage from anything under
packages/*

closes CORE-1265

Test Plan:
  - Run `COVERAGE=true yarn test`
     - Coverage reports (coverage-final.json) should generate in all
       packages such as (canvas-planner) as well as in coverage-karma
       and coverage-jest
  - Run `yarn run test:coverage`
     - coverage-js folder should be generated.  Opening index.html
       should show the full coverage report
  - Remove coverage-{js, karma, jest} and
    packages/canvas-planner/coverage as well as .nyc_output to get back
    to a clean state
  - Run `RUN_TESTS_FIRST=true yarn run test:coverage`
     - All tests should run and generate the appropriate report just
       like the last time in coverage-js

Change-Id: I50744b8977e0683e079af5bdd2865dbcd6ad9066
Reviewed-on: https://gerrit.instructure.com/146098
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-07-17 14:19:03 +00:00
Ryan Shaw 4e012e178e Upgrade tinymce to 4.8.0
Fixes: CORE-1518

Test plan:
when using newest version of Microsoft Edge:
In the RCE, add a table.
After adding the table, attempt to edit the table.
You should be able to edit tables using the RCE when using MS Edge

Change-Id: Ibbc38ac11c6fbb808a31e16a84fe24a87a979e5b
Reviewed-on: https://gerrit.instructure.com/157456
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-17 02:04:59 +00:00
Ryan Shaw f9d51ffc39 Remove html-react-parser dependency
‘html-react-parser’ causes yarn all kinds of fuss when it tries to 
update stuff because it says it wants at least react 15. This approach 
does the same thing we were using it for but without that package.json
dependency. This fixes some problematic stuff in our yarn.lock


Test plan:
* the permissions page should have the same perf as it did before
  (Or slightly better)

Change-Id: Id7ce3e1b5e51c077b9d51ffa15ac94ee158f3ee5
Reviewed-on: https://gerrit.instructure.com/156895
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-16 19:04:47 +00:00
Ryan Shaw 6774f9f22c Upgrade tinymce to latest (4.7.13)
closes: CORE-1620

while I was upgrading all the package.json dependencies I noticed that
that the version of tinyMCE we are using is out-of-date

test plan:
* automated tests that deal with tinyMCE should pass
* smoke test the editor to make sure it looks/works the same as before

Change-Id: Ia7913f195d0a61aee2ac770ebcbf303ffad794fa
Reviewed-on: https://gerrit.instructure.com/156310
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-10 19:06:58 +00:00
Ryan Shaw 3fdd3938d2 [yarn.lock] update :allthethings
closes: CORE-1621

This is just the regular commit to update all the npm dependencies.
It is the result of running `yarn upgraded-and-dedupe`

Test plan:
* automated tests should pass
* in the review of this, look closely at yarn.lock and see if there is
  anything that you think might cause problems (eg: a duplicated lib
  or something else funky like that)

Change-Id: I6fdd04f5aa7294464015293fbb3bc0d4a61eeb73
Reviewed-on: https://gerrit.instructure.com/155302
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-07-06 20:45:35 +00:00
Ryan Shaw 55726526a2 Fix <Pagination> perf for accounts w/ many users
This commit fixes it for master. g/155833 is the one that we will need
to warmfix/hotfix

Closes: CORE-1576

Test plan:
* using production assets (so you are getting the minimized/optimized
  Version of react w/o propType checking)
* in an account with tons of users or courses
* go to /accounts/x and /accounts/x/users
* type some stuff in the search box
* it should not be unbearably janky

Change-Id: I6a5e9be770a9bf9d49cf7f1d5d11df935a5fc24f
Reviewed-on: https://gerrit.instructure.com/155847
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-07-05 17:20:54 +00:00
Ryan Shaw 8bfa6c58ff Upgrade axios from 0.16 to 0.18
This is so all of our pages that use axios can share the same one

Test plan:

* the selenium tests, which test pages using axios, should pass.

Change-Id: I24d15fb7fa282891b80fadb91d06d9dfa019b5d1
Reviewed-on: https://gerrit.instructure.com/155300
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-26 22:46:24 +00:00
Ryan Shaw 485e14c5d9 tinymce-a11y-checker: upgrade to 1.6.0 w/ instUI5
Closes: CORE-1436

this commit upgrades us to the latest tinymce-a11y-verision, which uses
all instUI 5 components. So that means that we are no longer using
Instui 4 anywhere in canvas’s yarn.lock. yay!

Test plan:
* check to make sure the a11y checker works the same as before
* specifically run in prod mode in Spanish or some other language and
  with a custom theme applied and:
  * make sure that the stuff in the A11y checker is translated correctly
  * make sure the buttons and stuff in the a11y checker are themed
    correctly (the same as they used to be)

Change-Id: I22c6d49a682b395a75b8323727890596d568afa0
Reviewed-on: https://gerrit.instructure.com/154547
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-26 22:43:23 +00:00
Ryan Shaw 57943ae226 fix the `yarn upgrade-and-dedupe` command
Change-Id: Iea9b5ad18493dba2c25e695889d06a98bc26c368
Reviewed-on: https://gerrit.instructure.com/155301
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-06-26 20:26:04 +00:00
Ryan Shaw 5ddaf88785 instUI upgrade: upgrade ui-core in package.json
Closes: CORE-1494 CORE-1493 CORE-1492 CORE-1437

most things have already been upgraded to instUI 5
by pulling them in from their respective split-out
@instructure/ui-* repos. The last remaining things
are things like <Select> and <AutoComplete>
where if you pull them from their
new package you'll get a new component with a new
API.

They are still avaiable at ui-core but will
log deprecation warnings. So we should hopefully
be able to merge this without much trobule and
get the teams that own each page that uses something
from ui-core still to upgrade their stuff so the
deprecation warnings go away before instUI 6

Test plan:
* after you check this out, search the repo for 'ui-core'
* you'll find some pages that have:
  import Select from '@instructure/ui-core/lib/components/Select'
  eg: the CoursesToolbar, the NewCourseModal and usersToolbar in the
      user/course search stuff.
* make sure those selects work the same as they did before
* you will see deprecation warnings telling you not to get Select from
  ui-core and that you should get it from ui-menu in the browser console

Change-Id: I7b8a68584ef738caf4e4daca346c5f503afeebfd
Reviewed-on: https://gerrit.instructure.com/151789
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Rohan Cheeniyil <rcheeniyil@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-06-21 17:40:21 +00:00
Clay Diffrient 9f545a5c66 Add release tracking and source map uploading to sentry
This makes it so our sentry instance can be much more detailed
in the data that it collects

Change-Id: If44ea7bc54646988d681e6ad775951eb0e35436a
Reviewed-on: https://gerrit.instructure.com/154010
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-06-15 19:40:36 +00:00
Jeremy Neander 1479a5c937 spec: increase the timeout of canvas-rce specs
Also:
 * update mocha-jsdom to eliminate a spec issue
 * fix some specs

test plan:
 * Verify Jenkins passes

Change-Id: Ib486336306719b5ca4160e15843a0aac084c5c92
Reviewed-on: https://gerrit.instructure.com/153972
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-15 17:11:19 +00:00
Clay Diffrient babb0706ca Add raven to grab errors from test runs
closes CORE-1532

Test Plan:
  - Run tests with SENTRY_URL environment variable set
  - It should attempt to send data to sentry
  - Build works otherwise

Change-Id: Ib802851a7b3ac8626033436f60399f134a8425b3
Reviewed-on: https://gerrit.instructure.com/153878
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-14 20:43:00 +00:00
Jeremy Neander 7efc1a5a38 spec: revert yarn workspace commit
test plan:
 * Verify Jenkins passes

Reverts //gerrit.instructure.com/153283

Change-Id: Id148bc7197c85ea15dcc7f2c9035a0fd8cde4803
Reviewed-on: https://gerrit.instructure.com/153800
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-06-14 03:09:58 +00:00
Ryan Shaw 346458c2c9 return the right exit code in yarn workspace-run
... & fix failing package specs
closes:  CORE-1523


Test plan:
* run `yarn workspace-run test`
* it should actually run all the specs for each
  workspace (package/gem/plugin/client-app)
* if there is a failing spec it should actually
  exit with a non-zero exit code and fail the build

Change-Id: Ie09d0a3dfa343013bf7ee09e11132ef529f1b932
Reviewed-on: https://gerrit.instructure.com/153283
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-13 22:58:29 +00:00
Landon Gilbert-Bland a9dde08b7e Fix performance of new permissions page
There are several "improvements" here that make things more performant:

  * No longer using instui buttons. They have proven to be much slower
    then raw html buttons
  * No longer using instui flexbox/flexitem. Doing this in the CSS also
    proved to be much faster
  * Caching icons in LocalStorage so that we don't have to render the
    same svg 400 times
  * Not rendering the MenuItems for buttons for every button in the
    table. Only creating and rendering this component when the button is
    clicked. Note that in the trays we are still creating all the
    MenuItems on every button, otherwise there is problems with focus
    being able to escape the tray, and the performance penaltites are
    not as bad there cause there are significantly fewer buttons

Fixes COMMS-1160

Test Plan:
  * Make sure everything still works (permission button, permission
    tray, role tray, etc). Pay special attention to focus management, as
    there was a lot of hacked together stuff to get focus working
    properly when you changed a setting on any of the buttons (in the
    tray and on the table).
  * Spot check voiceover, it should be better in the tray now. Make sure
    you have the "group items within" and "speak column and row numbers"
    selected in the voiceover utility > web options.
  * Make sure performance is acceptable in the following situations.
    Note that performance will be slightly better when this is run in
    react production mode:
      - Initial Page Load
      - Searching roles
      - Searching Permissions
      - Add tray
      - Permissions Tray
      - Role tray
      - Switching between account and course tabs

Change-Id: Ic488d51ebdc031c2498d234f5d014d6368f1f84b
Reviewed-on: https://gerrit.instructure.com/153197
Tested-by: Jenkins
QA-Review: Sara Chadwick <schadwick@instructure.com>
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Landon Gilbert-Bland <lbland@instructure.com>
2018-06-13 16:25:14 +00:00
Michael Brewer-Davis b1e8404fce fix expand/contract all buttons in new sLMGB
closes OUT-2232

Test plan:
- enable non-scoring rubrics
- load student LMGB with multiple outcome groups,
  outcomes, and outcome results
- verify that expanding and contracting the groups
  and outcomes works as expected
- verify that after contracting a group and then
  re-expanding, the outcomes within the group
  are contracted
- verify that the expand all and contract all buttons
  at the top of the page are enabled and disabled
  at the appropriate times
  - expand all: should be enabled when any element
    is contracted
  - contract all: should be enabled when any element
    is expanded
- verify that the expand all/contract all buttons
  work as expected

Change-Id: Ifbe02e900459faed8d411afb2bb9410a885a2237
Reviewed-on: https://gerrit.instructure.com/152103
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-06-06 20:07:47 +00:00
Ryan Shaw e415eaa961 Use yarn workspaces
Run `script/nuke_node.sh` to clean everything up
Run `yarn install` it should install everything for everything
Run `yarn build` and `yarn test` they should work exactly as before

Change-Id: I11a27ff2d705c6cbb3b3f9029dd8b32138706146
Reviewed-on: https://gerrit.instructure.com/151356
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-06-04 20:02:02 +00:00
Steven Burnett e8e65cb54b fix minor issues with imports
Test Plan:
- tests pass and permissions still load

Change-Id: If459e7f1c54cb64d740366e2a8af9d5bac02b88f
Reviewed-on: https://gerrit.instructure.com/152206
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-06-01 17:49:26 +00:00
Ryan Shaw 0bd21c9ef9 Make all instUI 5 packages available
in the commits that follow, we start using these new packages so this 
commit has just been split out into its own so we don’t need to worry 
about commit order in the others. It does no harm to make them available
now, before they are used.

Change-Id: I553ce5ca1a81bddd17a5de428a04d424375f62e2
Reviewed-on: https://gerrit.instructure.com/151766
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-30 20:35:08 +00:00
Ryan Shaw 060e9b14c5 Put parse-link-header back in package.json
…since we use it in our code

It used to be there, but somehow someone deleted it on accident

Change-Id: Id516fdb8507887ffed9450869654fc42a4afc415
Reviewed-on: https://gerrit.instructure.com/151898
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-30 19:57:52 +00:00
Ryan Shaw 63990e024c Use ui-icons instead of inst-icons for icon font
closes: CORE-1434

Test plan:
* all the icons should look the same as they did before
* make sure that icons that should flip for RTL (like the icons on 
  The course/user search pagination arrows, the icon to open the
  Submission details tray in new gradebook, the “>” icons to expand
  a submenu for the menus in new gradebook, etc)

Change-Id: I490d2dcd91b1b7ca2a116a1416718cd797f74901
Reviewed-on: https://gerrit.instructure.com/149482
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-29 20:57:04 +00:00
Brent Burgoyne 85d103df1b fix unnecessary pagination display on user search
if it ever gets in a state where the last page is unknown, then
the state we would never changed back in future searches with
a known last page, causing pagingation to show on single page results.

closes CORE-1461

test plan:
- code review of passing tests should be sufficient

Change-Id: I2067417cca71dbe2e690f60e0205ca4bd0121edf
Reviewed-on: https://gerrit.instructure.com/151752
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-29 20:36:19 +00:00
Ryan Shaw 900b40c78d upgrade instUI to 5.10.0 and dedupe
Test plan:
* see https://instructure.design/#CHANGELOG for what changed.
  nothing looks important to us

Change-Id: Ib3477fa160e6f7a6b8039b1c719bbbf2cee11e8e
Reviewed-on: https://gerrit.instructure.com/151522
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-25 20:07:14 +00:00
Augusto Callejas c4c9e764df Configurable proficiency ratings page
closes OUT-1856, OUT-1858, OUT-2239, OUT-2148

This adds configurable proficiency ratings on the account rubrics page.
Persisting these changes will occur in a future patchset (2252).
Validating order will be in a separate patchset (2240).

test plan:
  - with the "non-scoring rubrics" feature flag off, the account rubrics
    page should appear without the proficiency ratings tab
  - with the "non-scoring rubrics" feature flag on, the accounts rubrics
    page should appear with the proficiency tab, if visiting with an
    account with "manage_outcomes" permission (e.g. account admin)
  - create an account role that has "Create and edit assessing rubrics"
    permission enabled but "Manage learning outcomes" disabled by going
    to the account page, click on the "Permissions" link in the left menu,
    then select the "Account Roles" tab to then be able create the role
    and enable the permission above.
  - create an account user by going to the account page and then click
    on the "People" link in the left menu to then be able to
    click on "+ New User". you'll use the email address entered in
    the next step.
  - make that user an account admin by going to the account page,
    click on the "Settings" link in the left menu, then select the
    "Admins" tab, then click on "+ Account Admins". select the new
    role from the drop down menu and enter the email address you used
    in the preivous step
  - confirm with the feature flag enabled, that visiting the account
    rubrics page does not appear with the proficiency tab, if visiting
    with an account without "manage_outcomes" permission (e.g. masquerade
    as the user created above)
  - on the proficiency tab, test error handling:
    * description is required
    * points is required, should be a valid number
    * when saving changes, all fields with errors should be labelled
      with an error text, with the first field receiving focus

Change-Id: Ic52ef9fe9c58cfb215216b3a505ef1fb4b851c68
Reviewed-on: https://gerrit.instructure.com/150841
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-24 22:11:09 +00:00
Ryan Shaw efb76cf2fb Upgrade yarn from 1.6.0 to 1.7.0
if you are having problems after this commit you need to either:
“brew upgrade yarn”
Or
“apt-get install yarn” 
Or 
Rebuild your docker container
Or do whatever else you use to manage software version

Change-Id: I8428112b4a44c28edd2608124bff9e01a8e960d9
Reviewed-on: https://gerrit.instructure.com/151423
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-05-24 21:37:04 +00:00
Michael Brewer-Davis 7e70b17d1a new student learning mastery gradebook
closes OUT-1851

Test plan:
With non-scoring rubrics disabled, verify that student learning
mastery gradebook loads normally and is unchanged.

With non-scoring rubrics enabled, verify that new student
learning mastery gradebook loads and matches mockups

Change-Id: If805bc50115a0c8cd0f4b516f6541ab900991eae
Reviewed-on: https://gerrit.instructure.com/150423
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-24 21:23:07 +00:00
Marc Phillips 489b5d6ecf Add require_scopes field to DevKey Management
Can now set whether a developer key require scopes or not.
Legacy behavior of scopes is to allow dev keys to have
access to all endpoints, this allows for the continuing
behavior.

Fixes: PLAT-3345

Test Plan:
 - Go to a create/upate a key
 - Notice the require scopes checkbox
 - Click the require scopes checkbox so that it is
   toggled off
 - Scopes ui should be removed and saving the key
   persists the state
 - attempt to access an endpoint using the changed
   endpoint that had scopes, it should be able to act
   like a legacy key
 - go back to the key management modal and flip the
   require scopes back to on.
 - attempt to access an endpoint that does not have a
   scope for the dev key, should fail
 - for a legacy key, the scopes ui should be off when
   first editing.

Change-Id: I0a53ff8a44b80081b518d780a8288f4cc4c36027
Reviewed-on: https://gerrit.instructure.com/150216
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
2018-05-23 22:23:17 +00:00
Ryan Shaw 4fb263498c upgrade InstUI from 5.8.1 to 5.9.0
Closes:  CORE-1451

Test plan:
* look at https://instructure.design/#CHANGELOG to see if anything
  Looks interesting.
  (I couldn’t see anything that should affect us)

Change-Id: I1cee6c0db65c64fb5f827efbce8d32c03fe1b5a6
Reviewed-on: https://gerrit.instructure.com/151206
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-23 20:49:45 +00:00
Clay Diffrient 0c56a80cc5 Give more memory to karma when it's running
This should make it so our post-merge build starts working again
and reporting new coverage information.

closes CORE-1435

Test Plan:
  - Run `COVERAGE=true yarn run test:karma`
  - It should not fail because of memory issues

Change-Id: I6e103352fa25e130d0ba8072a77c9d81ac11bb85
Reviewed-on: https://gerrit.instructure.com/150666
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-05-23 16:43:37 +00:00
Ryan Shaw 5441e760e9 @inst/ui-icons -> inst-icons in course user search
This introduces @instructure/ui-icons and converts just the account
Course user search stuff to use them instead of the old
‘instructure-icons’ package

Note here is the magic regex I used:
Find: (instructure-icons/lib/)(Line|Solid)(/Icon.*)(Line|Solid)
Replace: @instructure/ui-icons/lib/$2$3

test plan:
* the icons in the course/user search stuff should look/behave (as in,
  Have same tooltips/screnreader labels/etc) the same as before.

Change-Id: I22573aaaad239a9ceef4b5c1c0a610c3e5b7b586
Reviewed-on: https://gerrit.instructure.com/149287
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-17 20:06:33 +00:00
Ryan Shaw a16325e791 Upgrade instUI from 5.7.0 to 5.8.1
Closes: CORE-1417

Even though the PSA that instUI put out about needing to update asap
doesn’t affect us because we already always set the `dir` attribute
on the <html> tag, this upgrades us to that new version so there is
no confusion

Test plan:
* automated builds should pass
* nothing should actually change since there is nothing significant
  In this upgrade other than the new thing that adds the dir=“ltr” 
  attribute for you if you haven’t already

Change-Id: Id7a471265c49c595c7a71a54258218d4062be7b6
Reviewed-on: https://gerrit.instructure.com/150156
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-14 19:14:17 +00:00
wdransfield 3f2326b682 Developer key scopes UI (functioning skeleton)
Closes PLAT-3314

Test Plan
- Enable new developer key FFs
- Navigate to the developer keys page of an account
- Verify all scope groups are rendered in the new
  scopes list component.
- Verify the filter allows filtering by scope
  group name.
- Verify the "Read Only GET" checkbox causes
  all scopes that use GET to be checked.
- Go crazy testing checkboxes and make sure they all work
  logically (i.e. selecting the group level checkbox
  checks all scopes in the group).
- Verify that each group shows a list of methods for
  all selected scopes.
- Verify you can still create developer keys in root accounts
  and site admin.

Change-Id: I5df402ca06740e8a1ff37c21b63d2d6d58720182
Reviewed-on: https://gerrit.instructure.com/149242
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2018-05-14 16:00:00 +00:00
Ryan Shaw 895cf6dba6 Make it so permissions opts-in to use prettier now
if you set your editor to eslint --fix on save, which is already safe 
be doing, it will also pass anything in this whitelist of dirs to
Opt-in to be prettier formatted too. So you don’t have to wait until
we prettier all the things later and can have consistency among your 
now

Test plan:
* gergich should complain if something in app/jsx/permissions is not
  Prettier formatted

Change-Id: I438d11f25b10ed58e53656e110aa0d1e7fed5660
Reviewed-on: https://gerrit.instructure.com/149583
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-05-09 15:08:32 +00:00
Ryan Shaw 3948fa015e Upgrade InstUI to 5.7.0 from 5.4.1-dev.1
Closes: CORE-1378

(Relevant) Change log / things to test:
Bug Fixes
ui-forms: Preserve FileDrop event during onDrop (e45b70d)
ui-i18n: Fix moment version dependency (b6289c2)
ui-overlays: Fix a11y issues in Tooltip and Popover (352b8ca)
Features
ui-forms,DateInput: Add support for disabled days (c1067ad)
ui-icons,IconX: Updated IconX to be a little smaller (1bdcd86)
ui-layout,View: Add style prop white list (incl backgroundImage) (d8a35ab)
ui-overlays,Tray: Replace timeout with requestAnimationFrame (ddd9096)

Change-Id: I4cc63f322e53bc2bb744d2a11bbdcfab9fbe88dc
Reviewed-on: https://gerrit.instructure.com/149270
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-08 14:39:13 +00:00
Jeremy Neander 0db6896f79 maintain precision of grades in grade input
fixes GRADE-1098

test plan:
 1. Create an Assignment
    a. with Display Grade as Percentage
    b. worth 9.5 points
 2. Open New Gradebook
 3. Grade a student on this assignment twice
    a. once with 55 (interpreted as percentage)
    b. again with 55% (explicit percentage)
 4. Verify grade is 55%
 5. Verify score is 5.225

Change-Id: Ie48ec7d5b787e864bfd3379e8dc6a4dbebebc2e5
Reviewed-on: https://gerrit.instructure.com/148848
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2018-05-03 18:36:03 +00:00
Jeremy Stanley b4e52fff98 switch to uglifyjs-webpack-plugin
Closes: CORE-1361

Dev test plan: it should be possible to build production assets
without consuming 50GB of memory

QA test plan:
* run RAILS_ENV=production bundle exec rake canvas:compile_assets
* run app in prod mode eg: RAILS_ENV=production bundle exec rails s
  (Or however you do it with pow or whatever)
* look at the devtools and make sure you are seeing minified code and it
  no errors or 404s

Change-Id: I247080851c9df0c74b6c59432bc7086ea625df4b
Reviewed-on: https://gerrit.instructure.com/146336
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-02 21:36:55 +00:00
Ryan Shaw 8f05a581c1 Fix so we don’t include 2 copies of all InstUI stuff
If we are going to use a dev build of instUI we have to do this
To make sure everything still shares the same version.

We need to be very careful with our updates to yarn.lock that there
is only ever 1 entry per inst-ui package in the same major version
range. Otherwise our client code will get super bloated and things
will start breaking in subtle unexpected ways (from having 2 copies
of same lib on the page)


Change-Id: Iab90131bae9e10a954ca2d5aef049a90eefb9a39
Reviewed-on: https://gerrit.instructure.com/148809
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-01 19:59:23 +00:00
Ed Schiebel 77935f7a54 Add DateTimeInput to planner
The user can now enter a due date and time.

refs ADMIN-297

test plan:
  - load the planner
  - create a new to do
  > expect the time to default to 11:59pm
  - save
  > expect the due time of 11:59 to be shown in the planner
  - edit the item, change the time, save
  > expect the new time to show up in the planner
  - edit the item, delete the date, tab out of the date text box
  > expect a "you must provide a date and time" error message
  > expect the Save button to be disabled
  - pick a date
  > expect the error message to go away
  - save
  > expect the to do to be in the planner at the given date and time

Change-Id: I6759cca675b59acfc200574a1e313f75e1cfda2e
Reviewed-on: https://gerrit.instructure.com/145147
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Christi Wruck
2018-05-01 16:29:51 +00:00
Brent Burgoyne f91658d4bf move canvas-rce to canvas-lms/packages/canvas-rce
closes CORE-994
refs RECNVS-398
refs CORE-1224
closes CORE-1237

test plan:
- yarn install
- smoke test rce
- tests pass

Change-Id: Ieaff024fa89879fac3e7edf99381f46de921cce2
Reviewed-on: https://gerrit.instructure.com/145671
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-01 13:46:18 +00:00
Ryan Shaw 8db2c527b1 Get slickGrid to work in RTL
Closes: CORE-1226

This gets both the old gradebook and the new gradezilla gradebook to
work in RTL.

Test plan:
* in both old gradebook and new gradezilla gradebook:
* go to the gradebook in normal LTR interface
* everything should work exactly as before
* turn on the RTL feature flag either in your user settings or by
  turning int on in accounts/x/settings and then setting your lang
  to arabic

Specific things to test:
* try it on both the old gradebook and the new gradezilla gradebook
* try it on a really large gradebook with tons of rows and columns
* try a really small gradebook with less columns than there is screen
  width
* try it in different browsers. Since each browser has different
  scrollLeft handling in RTL, I normalized it. but verify that it
  works in each
* try resizing and reordering columns
* borders and other styles should be flipped to the opposite side in RTL
* make sure keyboard shortcuts (like the left, right, top, down arrow
  keys) work and move you in the right direction in both LTR and RTL
  (Eg: if you are on “assignment 2”, right arrow goes to “assignment 3”
  In LTR but in RTL it goes back to “assignment 1”)
* try to think of other places that might have used the .r<column index>
  or .l<column index> classnames to make sure the use the new, RTL-aware
  ‘.b’ and ‘.f’ (those stand for “back” and “front”) classnames

This change started from this pull request:
https://github.com/mleibman/SlickGrid/pull/666
but there was a lot that still needed to be done there and we needed
change things to handle our frozen columns.

Some interesting trivia:
* in RTL, different browsers have different ways of handling scrollLeft.
  they all show the element scrolled all the way to the right by default
  (So you see the first columns) but chrome tells you scrollLeft is some
  large number to reflect how far from the left you’d have to scroll to
  get there if you scrolled all the way to the right like it should.
  Safari says scrollLeft is 0 by default and then as you scroll left to
  to see the rest of the columns, it counts down and shows
  a negative number. And IE does something else.
  So you have to do some trickery to normalize them all to be a
  consistent value, and that is why this pulled in that NPM module

Change-Id: Id00025db0918cbc2d354e96af88023e70e041e58
Reviewed-on: https://gerrit.instructure.com/144672
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-04-30 21:20:54 +00:00
Ed Schiebel 3662e42ec6 Keep to do in a course with other course items
fixes ADMIN-917

test plan:
  - have a student with a course assignment on some date
  - have the student add a to do to the course on the same date
  > expect the planner to show the assignment and the todo in the same
  > grouping

Change-Id: Ice5b796935bfe3f69d05db509696fb2ce7b38cf3
Reviewed-on: https://gerrit.instructure.com/147161
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Christi Wruck
2018-04-25 14:55:21 +00:00
Mysti Sadler 77171b991e Use "build" script for packages pre-install
refs ADMIN-761

When we added canvas-planner to the packages
directory, we set up a prebuild script to
build everything we needed for Canvas that
would run during yarn install.  This causes
canvas-planner to have to do a lot that it
doesn't need to do when we just want the npm
packages to be installed (for the sync-
translations build or for other purposes)
so we're setting a specific build step
instead

Test Plan
- Specs pass

Change-Id: I72a0dc52cd9be1255985d69921d9910ba12e9ffe
Reviewed-on: https://gerrit.instructure.com/147565
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2018-04-20 18:02:34 +00:00
Ryan Shaw 524a8865f4 Get i18n-js and i18nliner from npm, not vendor
closes:  CORE-1201

test plan:
* the qunit & selenium tests that we have around this should still pass
  (except for that one that had to be changed because the spec was 
  actually expecting the wrong thing and the old code was erroneous)
  
* load the app in fully production build and make sure translations 
  still work

Change-Id: Id06c38f60c1670fb93e85d5479ec747035c1158b
Reviewed-on: https://gerrit.instructure.com/143456
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-04-19 21:34:33 +00:00
Derek Bender 11b30e7fea upgrade yarn to 1.6.0
Change-Id: Icc59c9c43fea079196d9a0dc29b23ac0f1da74c7
Reviewed-on: https://gerrit.instructure.com/147047
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2018-04-19 20:31:06 +00:00
Ryan Shaw 3ffc72eda6 Ensure code sent to browsers is es5
…so it works in safari10 & IE11

Closes: CORE-1280

test plan:
* run yarn
* go into a file in node_modules that is used in a webpack bundle 
  (Eg: node_modules/react-dom/index.js) and change a `var` to a `const` 
  or a `let` and a `function` to an arrow () => function.
* run `yarn webpack-production`
* it should fail with errors

Change-Id: Ic1589d3c1cc266eb5be22cb4716465818d0e98b6
Reviewed-on: https://gerrit.instructure.com/146496
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-04-19 16:11:15 +00:00
Clay Diffrient 3640b3b0cd Bump canvas-rce to v3.1.0-hotfix.0
closes CORE-1288

Test Plan:
  - Add an image to a page using the RCS
  - Select that image in the RCE
  - Select another image from the RCS
  - The image should be replaced with the new one

Change-Id: I83af646010d0cc3579d6d58c4da8081084f6a9af
Reviewed-on: https://gerrit.instructure.com/147106
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-04-18 23:00:52 +00:00
Clay Diffrient 9b74f11a59 Update Add People modal to Inst-UI 5.0
closes CORE-1125

Test Plan:
  - Go to the account level courses page
  - Go to the + for adding people to one of the courses
  - Activate your screen reader
  - You should not be able to escape out of the modal
    that is now open.

Change-Id: I023928990504acb4d02a912381b1fe96733932e6
Reviewed-on: https://gerrit.instructure.com/145765
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-04-05 22:09:28 +00:00