Commit Graph

326 Commits

Author SHA1 Message Date
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
Clay Diffrient 8ddff7aef4 Use new inst-ui menu for more options
closes CORE-1122

Test Plan:
  - Go to the account level user page
  - Using a screenreader go to the "More People Options"
    button at the top.
  - Open the menu
  - VO should trap you inside that menu

Change-Id: Ic6626882625a4d034d09c96d8556c2e3c9922e9a
Reviewed-on: https://gerrit.instructure.com/145743
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:22 +00:00
Clay Diffrient c55ff773d7 Make screenreaders alert when search results are loaded
closes CORE-1116
closes CORE-1117

Test Plan:
  - Enable a screenreader
  - Go to the new account level user/course search
  - Search for something
  - The screenreader should indicate to you when results have finished loading
  - This should work for Users and Courses

Change-Id: I4e81a86fb9e9340d3acbdab3e8f28fcbfb42d2cd
Reviewed-on: https://gerrit.instructure.com/145634
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:17 +00:00
Cameron Matheson fa70851608 upgrade to apollo 2.1
closes RECNVS-377

Test plan:
  make sure student context cards work

Change-Id: Ib306e0be5d51f68afad0ff112bf745d9e0ad1d5b
Reviewed-on: https://gerrit.instructure.com/145501
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-04-03 22:05:07 +00:00
Clay Diffrient 0a7c024852 Bump canvas-rce to 3.1.0
closes CORE-1012
closes CORE-1074
closes CORE-722

Test Plan:
  * Changes from 3.0.3
    - Smoke test of RCE, potential UI issues
      (This was adding support for tinymce@4.7.x)
  * Changes from 3.1.0
     - Upload an image
     - Notice that the image thumbnail loads without
       needing a page refresh

Change-Id: I0a0320b487c93b49346c1d2d730c375738b1fa2b
Reviewed-on: https://gerrit.instructure.com/143497
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-03-30 20:46:29 +00:00
Ryan Shaw 33a5bd5a0a Upgrade instUI from 4.7.3 to 4.8.0
Fixes: CORE-1105 CORE-1106 CORE-1174

Test plan (for CORE-1105 CORE-1106):
* using the keyboard, go to /accounts/x/users
* you should be able to hit “enter” to click on the “Act As” or 
  “Send Message” icon links

Test plan (for CORE-1174):
* set your feature flags so you use the RTL layout
* the navigation tray, RCE a11y checker, etc should pop in from
  the opposite side of the page than the did in normal LTR layout

Change-Id: I25d664bfd94970f4bbb37ba8ebe5c72cc9e5b3ff
Reviewed-on: https://gerrit.instructure.com/144969
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-03-27 20:03:14 +00:00
Ryan Shaw d8014ed53c make feature flags for Right To Left layout
Closes: CORE-1154

There are 2 feature flags here. One a specific user (internal
employees, sales people, contractors, etc) can turn on to see where we
are and what would still need to be done. And the other is for an
account to be able to turn on to let the users in their account that
have their language set to an RTL language (eg: Arabic, Farsi or Hebrew)
see the interface in RTL

This commit is part of a chain of commits. you'll need to apply the ones
that follow-on after this to see most of the actual Right To Left
features, this commit is mainly just to create the feature flag.

Test plan:
* go to your user settings page
* you should see a feature option for Force RTL Layout”
* it should show that it is “in development”
* it should should be hidden: eg: only appears for site admins and not
  For normal users
* turn it on

(if you have this checked out along with the others that follow beind
  this commit)
* navigate around canvas, most things on most pages should be RTL
* you should be able to get an idea of how much more work and what
  Kind of changes we’d still need to make to get it 100%

* now turn off that user feature flag, and go to your account's settings
* turn on the "allow users from RTL languages to see RTL layout"
  account-level feature flag.
* nothing should change for you, it should be LTR like normal
* set your language to either Arabic, Farsi or Hebrew
* now the interface should all be in right to left.
  (again, you'll need to have the follow-on commits to this to see all
  of the RTL changes)

* without either of the feature flags turned on, absolutely nothing
  should be different at all anywhere in the interface.

Change-Id: Ia78d86fa46d2d289b1913c5d1340546d7f6c3a1f
Reviewed-on: https://gerrit.instructure.com/143891
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-03-21 21:09:38 +00:00
Clay Diffrient 71c7ff7160 Handle dependent variables in the theme editor
After the theme editor refactor dependant variables were not
working.  This fixes it.  This also makes it so that
override files are handled properly.

closes CORE-1085

Test Plan:
  - Go to the theme editor with a new theme
  - Change the "Primary Brand Color"
  - "Primary Button" should change as well
  - Preview the changes
  - Change should be reflected after the preview loads
  - Repeat that again, the same behavior should occur.
  - Change the "Primary Button" color and preview
  - The two items should now be "unlinked" and they change
    independent of one another
  - Upload a js override
  - Preview changes
  - Upload a css override
  - Preview changes
  - Both the js and the css fields should be populated

Change-Id: I61572a3c5bdf4f63c82078dff492dc504d0af7bf
Reviewed-on: https://gerrit.instructure.com/142395
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-03-20 20:07:30 +00:00
Ryan Shaw d65246ba97 Convert last remaining code from instUI 3 to 4
updates all the instui components used for these alerts to 4.x
Closes: CORE-762 CORE-732

Change-Id: Ia5af600b5747bfbeca4015d30d2be900700a90ae
Reviewed-on: https://gerrit.instructure.com/143337
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-03-12 23:20:07 +00:00
Ryan Shaw ad45370766 Upgrade tinymce-a11y-checker to 1.4.0
test plan:
* in canvas, go to a page with a text editor (like a wiki page) and
  click the "a11y checker" button in the editor toolbar
* the widgets that appear in the trays on the right of the page should
  work. look at the trays, the buttons, the text inputs, etc.

Change-Id: I43476620c5a1d8cf666e20b9495dd499791a4ee4
Reviewed-on: https://gerrit.instructure.com/143347
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-03-12 23:19:47 +00:00
Ryan Shaw f4f60700b8 Upgrade mediaelement to latest master of our fork
Fixes: CORE-1091
show controls when they receive focus (#39)

if controls are visibly hidden, they should still be tabbable for
accessibility, and when they get keyboard-focused, they should become
visible again.
See: https://github.com/instructure/mediaelement/commit/0402b2b76

Change-Id: Ic655d43a64d111662f8d7368f21032664a8aee74
Reviewed-on: https://gerrit.instructure.com/142693
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-03-12 16:18:05 +00:00
Ryan Shaw 06d3ceb331 git rid of our vendor’ed fork of mediaelement
refs: CORE-24

test plan:
* this net result of this change should mean that we are using the exact
  same code as we were using before, just pulled from github directly
  in our package.json instead of vendored into our repo.
* testing the follow-on commits should show this worked correctly

Change-Id: Ie6d022d5fe8ed1a607f66f9d426c47ec7e8f5b14
Reviewed-on: https://gerrit.instructure.com/142381
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-03-12 16:17:43 +00:00
Ryan Shaw ec0ed12ffb Use node 8.10.0 instead of 8.9.4
Test plan:
* automated builds should pass
* docker stuff should work

Change-Id: I120e5689b6b219dc295517e92047cdf3f8b5d61e
Reviewed-on: https://gerrit.instructure.com/143022
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-03-09 18:56:22 +00:00
Clay Diffrient 497fe4d5ea Update to yarn 1.5.1
closes GH-1250

Test Plan:
  - Everything builds

Change-Id: Id51b8997f5ae1b53c24c2b4b616c6956833ed2b5
Reviewed-on: https://gerrit.instructure.com/142553
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
2018-03-08 19:53:13 +00:00