Commit Graph

798 Commits

Author SHA1 Message Date
Ubuntu d385f2c513 [i18n] update locales with new translations
Change-Id: Id38b6d4572458728c3c2d6a7c8708df7df51e1bd
Reviewed-on: https://gerrit.instructure.com/148892
Tested-by: Jenkins
2018-05-02 07:42:39 +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 f46193782d fix out of sync canvas-rce yarn.lock
Change-Id: Id726cff696b9451a3a59d467b9bfac9e38a9561e
Reviewed-on: https://gerrit.instructure.com/148742
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
2018-05-01 15:42:55 +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
Jon Willesen e82ebd3363 keep dashboard from scrolling when tray closes
Instead of fixing the existing code, I ported it over to the new
animation framework. The core problem was stale information about the
fixed element's position. Now the animations keep track of the scroll
position of the fixed element they're specifically interested in
(although there's only one for now).

closes ADMIN-926

test plan:
- scroll behaviors of scrolling into the past and fetching new activity
should be the same.
- opening and closing the tray should not cause the scroll position to
jump, whether by saving, deleting, or canceling.
- The scroll position should be maintained if the new focus is on the
screen. Otherwise the focused element should be scrolled into view.

Change-Id: I5b6f1069dda3354aafdb156cd9660257f942b77d
Reviewed-on: https://gerrit.instructure.com/146236
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-26 19:42:21 +00:00
Jon Willesen e651f9f4ef fix focus after deleting a planner item
This works around INSTUI-1141
fixes ADMIN-945

test plan:
- The bug was most easily reproduced in Chrome.
- Have some planner items.
- Create and delete a to do item several times and see that the prior
item reliably receives focus after the delete.

Change-Id: I7fc00b9c3fa01de8fe7c35b035b5340d1429b67e
Reviewed-on: https://gerrit.instructure.com/146172
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-26 16:24:45 +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
Ubuntu 1dfcd74747 [i18n] update locales with new translations
Change-Id: Ibb657eae3538317b098b7880552a914dceb9cac4
Reviewed-on: https://gerrit.instructure.com/147637
Tested-by: Jenkins
2018-04-20 16:52:32 +00:00
Jon Willesen 97e617e8f4 improvements to loading past on desert page
This does two things (because they were both simple):
- keep focus on the "load prior items" button when it is pressed to load
past items from the desert page.
- show a loading spinner when you're loading past items from the
desert page.

fixes ADMIN-907

test plan:
- press the load prior dates button. It should retain focus after load.
- load past items from the desert page. It should replace the desert
with a loading indicator.

Change-Id: If03d854903a33ef7d842f90e09cc4fd27b97ba99
Reviewed-on: https://gerrit.instructure.com/147247
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-18 21:30:03 +00:00
Jon Willesen edde8b3d0e announce sr loading on planner dashboard
fixes ADMIN-910

note: sometimes the screenreader is busy saying something else,
especially when the page initially loads. In the dev tools, you can
check the `body .flash_screenreader_holder` div to see that the alerts
are being inserted into the DOM properly. Whether it will actually read
the loading text probably depends a lot on their specific screen reader
settings.

test plan:
- check that screen readers announce "loading" when items are loading,
past or future (with the above caveats)

Change-Id: Id53dd1c220ac99aba1045ca0c9681f49af2c69a6
Reviewed-on: https://gerrit.instructure.com/147171
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-18 17:00:16 +00:00
Ubuntu f8390e8c04 [i18n] update locales with new translations
Change-Id: I6f6cd744e24a4ff6c7c928e24df28584fedcd27f
Reviewed-on: https://gerrit.instructure.com/147132
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2018-04-17 21:51:05 +00:00
Jon Willesen 0fa4012da2 conditionally hide load prior items button
fixes ADMIN-909

test plan:
- if there are past items to load, you should be able to tab to the
load prior items button
- if all past items are loaded, the load prior items button should be
missing.

Change-Id: Ibbe46802a26ae09419fe7c26e7861a586698e7e6
Reviewed-on: https://gerrit.instructure.com/147189
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-17 21:46:07 +00:00
Ed Schiebel 929798ca3e Fix responsive planner layout bugs
fixes ADMIN-906

test plan:
  - have a user in a course with assignments.  have some new ativity,
    and something graded, and something completed, and something with
    a long title/name, and something graded with feedback
  - load the planner
  >  expet the graded+feedback pills not to stick out the right edge
     of planner
  - gradually  make the browser narrower
  > expect "show 1 completed item" to wrap and not get trunctated
  - keep making the browser narrower until it switches to the tablet
    layout
  > expect the assignment with the long title to be on 1 line, truncated
  > with an ellipsis, and not wrap.
  - if the browser is narrow enough, the feedback pill and the due date
    will run together. there's nothing to do about that other than limit
    the width of the planner

Change-Id: I23823773bf8f418b7ca4bab7aa572e6c5dceec82
Reviewed-on: https://gerrit.instructure.com/145613
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Mary Jane Anderson <manderson@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
2018-04-06 19:45:06 +00:00
Mysti Sadler 16a4effc9b Ensure canvas-planner docker build runs
refs ADMIN-761

Test plan
- N/A

Change-Id: I277386f93133515c11fe981c06ddafd1071ec82d
Reviewed-on: https://gerrit.instructure.com/146083
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
QA-Review: Mysti Sadler <mysti@instructure.com>
2018-04-05 23:34:06 +00:00
Dan Minkevitch d74bbe69a9 Hide New Activity button from Screenreader
Closes ADMIN-782

Test Plan:
* As a student in a course with Student
  Planner enabled
* When on the Student Planner (List View Dashboard)
* With items that trigger the display of the New Activity
  button
* A screenreader should not navigate to or detect
  the New Activity button (since its primary function
  is a change in visual display)

Change-Id: I45d0db0431c76f7c9eb472a2baef9817eecaa776
Reviewed-on: https://gerrit.instructure.com/145737
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2018-04-04 20:36:09 +00:00
Jon Willesen 64738d6db2 dashboard fallback focus when deleting first item
Moves the focus management on deleted items from the manager to the new
animation stuff.

fixes ADMIN-784

test plan:
- In the dashboard list view, have a to do item at the beginning of the
list. One way to do this is to create one with a date before the
existing items.
- Delete the item at the beginning of the list. Focus should go to the
triple dot menu button.
- Have a to do item in the middle of the list.
- Delete the mid-list item. Focus should still go to the prior item.

Change-Id: I22869e37c5e9af5f87893d4f117c92b459739d8a
Reviewed-on: https://gerrit.instructure.com/145645
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-04 18:56:45 +00:00
Mysti Sadler 57577f343b Update canvas-planner to use plannable_date
fixes ADMIN-130

Test plan
- Specs pass

Change-Id: I588f2f8b5db00d97560da31124a2ea6014f61e06
Reviewed-on: https://gerrit.instructure.com/145083
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-04-03 19:39:44 +00:00
Jon Willesen 2cde41d12c fix focus when clicking list view load more button
This should only set focus when the load more button is clicked.
Loading more by scrolling does not set the focus.

fixes ADMIN-780

test plan:
- have a bunch of future items in dashboard list view
- click the load more button to load more items
- focus should go to the item before the newly loaded items

Change-Id: Ib9e7054956060f47eed33c8d2c8d9bfa4f030f41
Reviewed-on: https://gerrit.instructure.com/145173
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-03 16:40:44 +00:00
Jon Willesen de86f6553e dashboard list view fills screen on initial load
closes ADMIN-894

test plan:
- Have a bunch of future items
- Have a tall browser window and see that multiple loads occur to fill
up the screen. Zooming out helps to increase the tallness of your
browser. Firefox seems to do this well; Chrome switches to tablet view.
- Should work on all the browsers

Change-Id: I1ccd62c43ec1e2a7ee53907b466df2dbd6d0429c
Reviewed-on: https://gerrit.instructure.com/144913
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-04-03 16:40:18 +00:00
Ed Schiebel f7be7df9a6 Implement responsive dashboard
Replace container query css with Responsive component

This commit changes planner from using the instui containerQuery based
data-media-* attributes to the new Responsive component. When it's
complete, the wide-screen planner should look just like it did before,
though all the responsive changes have been removed in prep for building
the new designs in upcoming commits.

While updating the specs, I also cleaned up a few xpath
contains-text expressions.

closes ADMIN-871

test plan:
  - The planner should look just like it did before in normal desktop
    view.

Change-Id: I39cd99b6a29eb01bca25392f77ca96acd3d56c7e

Implement responsive dashboard

also refactored the Indicators into their own component directory

fixes ADMIN-872

test plan:
  - load the planner
  - shrink your browser's width
  > see that it reconfigures itsef to look like the tablet design
  - click the New Activity button
  > ensure that it scrolls to the next previous new activity

Change-Id: I73966fe1b1eefa69d0f0df404bb6da6d89a25471
Reviewed-on: https://gerrit.instructure.com/144279
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Mary Jane Anderson <manderson@instructure.com>
2018-03-31 14:09:15 +00:00
Jon Willesen cbd39bb1f4 replace waypoint with event handling autoloading
On the dashboard list view, instead of triggering the loading of
future items when a waypoint comes into view, make it respond to
attempts to scroll into the future, like we do with scrolling into the
past. This makes it nicer for screenreader and keyboard only users so
they can actually reach the load more button.

Note that this change affects the initial load: it won't keep loading
until the window is full. There is another ticket to handle this:
ADMIN-894

closes ADMIN-892

test plan:
* make sure attempts to scroll into the past and future still work via
scroll wheel, touch events.
* make sure you navigate to the load more button via tab and
screenreaders

Change-Id: Id0af1682bfec67f29f7e392672ae49812f4ad19a
Reviewed-on: https://gerrit.instructure.com/144549
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-28 21:39:06 +00:00
Jon Willesen 028169d345 correct animation for load prior dates button
When clicking on the load prior dates button in the dashboard list view,
the focus should stay on the button and the button should stay in view.
This means the scroll position will jump to the top of the page when the
new items are loaded.

If intead the window is scrolled to load the past by the scroll wheel
or keyboard scrolling buttons, the scrolling position should be
maintained and not jump to the top.

closes ADMIN-781

test plan:
- have lots of items in the past
- make sure loading past items behaves as above

Change-Id: Ib1e38e9eb487da56d395ae7f0ce3cf747defcb21
Reviewed-on: https://gerrit.instructure.com/144390
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-28 21:38:54 +00:00
Jon Willesen 247143529c refactor the dashboard list view's animations
This is the first step of separating out the animations from the dynamic
ui manager so it's easier to add new animations, understand when
animations occur, and see all of the steps involved in the animation in
one place.

For this first pass, only the new activity animations have been
separated out. The rest will be separated from the manager in future
commits.

closes ADMIN-808

test plan:
- The new activity button scrolling animations should still work as
before.

Change-Id: I04a30440db5d9b080605ffe71bfcfc4a64015386
Reviewed-on: https://gerrit.instructure.com/143196
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-28 21:38:38 +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
Dan Minkevitch e80e190e9f Add account setting to set default dashboard view
Closes ADMIN-634

Test Plan:
* As an admin
* With the student planner feature flag disabled
* Set the account's Default Dashboard View setting to 'activity'
* Masquerade as a newly created user in that account
* View their dashboard
* It should match the account's setting
* Repeat the process above, but enable the student planner feature
  flag and make sure the new user for testing the
  dashboard is a student
* It should still work as above

Change-Id: Ic9a99c5710ac0eeca22afaf4a5c76f3c542ce65f
Reviewed-on: https://gerrit.instructure.com/138160
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Christi Wruck
2018-03-27 16:13:54 +00:00
Ed Schiebel 28a247ae3e Update planner per new design
closes ADMIN-837

Visual Updates include:
  - Replacing note icon with user avatar for user created to do items
  - replacing checkbox with caret for "show completed items"
Internal updates:
  - replaced user id in the store with the current user object so I
    could render the Avatar
  - refactored some more of the complex prop types

test plan:
  - open the planner
  > it looks like the design attached to the ticket. (except for the
  > button to open the grades tray, which doesn't exist yet)

Change-Id: Ic7285fd6f0cb45ed0c262832b0769dd3f9f248ea
Reviewed-on: https://gerrit.instructure.com/142736
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Mary Jane Anderson <manderson@instructure.com>
2018-03-15 19:56:36 +00:00
Ed Schiebel 905a8998e3 Fix new activity button so it stays put.
fixes ADMIN-812

test plan:
  - have a user with new activity in the past
  - load the planner as the user
  - click the new activity button
  > expect the buton to stay in place, and not scroll down at all while
  > the new activity is loaded
  - click again and be sure the button still doesn't move.

Change-Id: I390d168c859ff80008781ce647fd134e78336744
Reviewed-on: https://gerrit.instructure.com/143421
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-03-14 19:31:46 +00:00
Jon Willesen 453be50504 change timing of maintainViewportPosition call
Makes it so this call can happen after the UI update. Then the
animations don't have to worry so much about the timing of it.

closes ADMIN-851

test plan:
- when scrolling into the past, the viewport position is maintained
as before.
- when clicking new activity, the scrolling is still animated as before.

Change-Id: I773f8731775796b434b1e5768f8a600a091b8f9a
Reviewed-on: https://gerrit.instructure.com/143400
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-14 16:28:38 +00:00
Jon Willesen ee891dae47 refactor new activity button's additional offset
This is a small, independant preparation step for the larger refactor.

closes ADMIN-850

test plan:
- scrolling to new activity should still work as before.

Change-Id: I65375977ae3924cb425edc33bb649354b4803052
Reviewed-on: https://gerrit.instructure.com/143267
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-13 19:51:58 +00:00
Ed Schiebel b6ef529792 Fix spacing issues in the planner
fixes ADMIN-279

test plan:
  - load the planner
  > expect it to look like the mockup attached to the ticket

Change-Id: I76a43ff4c3085425e0b816dade9b34d40f927da7
Reviewed-on: https://gerrit.instructure.com/142609
QA-Review: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Mary Jane Anderson <manderson@instructure.com>
2018-03-12 17:05:00 +00:00
Jon Willesen f49455a3c5 new activity button visibility
toggles rendering of the new activity button based on
- whether there is new activity to load still
- whether the top-most new activity indicator is above the screen

closes ADMIN-744

test plan:
- have some planner items with new activity that will show up in
separate page fetches.
- loading the first page with new activity, the new activity button
should stay visible no matter the scroll position.
- with all new activity items loaded, the new activity button should
be visible only when a new activity item is scrolled above the window.

Change-Id: If2bb6a378d866bdd0e676115d1c19ae3aabcb46c
Reviewed-on: https://gerrit.instructure.com/141048
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-06 22:59:46 +00:00
Jeremy Neander 24ce45f2b1 update canvas-planner yarn.lock
test plan:
 * ensure Jenkins passes

Change-Id: I919293d0fe86db0eee028289ed13ceaedb4e0a3a
Reviewed-on: https://gerrit.instructure.com/142681
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-03-06 20:45:53 +00:00
Ed Schiebel f1f8fdde70 Bump instui version to be in sync w/ canvas
4.7.1 -> 4.7.2 is easy peasy

closes ADMIN-825

test plan:
  - jenkins is happy.

Change-Id: Ib1f4027a6267f91df3ea6cb70b7c2da71fb1f68f
Reviewed-on: https://gerrit.instructure.com/142453
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-03-05 21:00:27 +00:00
Jon Willesen 7030256618 new activity button scrolls to offscreen indicator
This makes the new activity button just scroll to an indicator above the
current scroll position, if one exists. If there isn't one, it does its
previous behavior of loading the past and then scrolling to the new
indicator.

Note that the visibility rules for the new activity button have not
changed in this commit. You still need to have an unloaded new activity
item in order to see the new activity button. This commit just changes
the new activity button's behavior. The visibility will be addressed in
a separate commit.

This commit also removes setting focus when simply loading future or
past items. The focus should stay where it is.

closes ADMIN-745

test plan:

- with a new activity indicator above the screen, click on
the new activity button. The view should scroll the blue dot so it
appears just below the new activity button without loading more data.

- with no new activity indicators above the screen, click on the new
activity button. It should load more past items and then scroll to the
most recent new activity.

- when scrolling to or loading new activity, focus should be set to the
course link with the new activity (the link the indicator is next to).

- loading the future or the past should not change keyboard focus.

Change-Id: I565a164aeb85546ad12250f8d027b30f003834fa
Reviewed-on: https://gerrit.instructure.com/140252
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-02-26 14:01:51 +00:00
Ed Schiebel ec05f824fc Put finishing touches on planner under canvas
- update README with new instructions
- update how canvas runs sub-package tests
- remove planner's test server

closes ADMIN-742

test plan:
  - when jenkins runs, check to see that planner's tests run too

Change-Id: I2493b65f580c76b28f225f1330e99e1ceb1378b4
Reviewed-on: https://gerrit.instructure.com/139882
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-02-21 17:49:03 +00:00
Ed Schiebel 265e72ffb2 Fix ISO date formatting when the local is ar
moment has a bug, in that moment.format() doesn't generate a correct
ISO8601 string when the locale is ar.  This fix works around that.

fixes ADMIN-728

test plan:
  - log in as a student with some todos in the planner
  - set her language to Arabic (6th from the bottom)
  - open the planner
  > expect the planner to load. no network errors
  > expect the todos to be on the correct dates dates and the
  > times to be correct (if you're in chrome, you can translate the page)
  - go to the card dashboard
  > expect the todo sidebar to look right too.

Change-Id: I1d0dc3ea7c3a7e6d8265918f1f66b14bd1761206
Reviewed-on: https://gerrit.instructure.com/141000
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-02-21 17:48:43 +00:00
Mysti Sadler 8cb422f205 Only load one dashboard component at a time
fixes ADMIN-574

Test plan
- Ensure only the API calls for the current
  dashboard are called on page load
- Ensure each dashboard can properly load
  when you select a new one
- Ensure that if you turn off the to do feature
  that after the setting has saved properly (it
  takes a few seconds) that the option disappears
  from the drop down and the view changes to card
  view if list view was selected
- Load up the planner dashboard and then switch to
  another dashboard and ensure API calls are NOT made
  to load future or past items for the planner when
  scrolling

Change-Id: Ibb5f640440179a667a128993a6effd3f898e8465
Reviewed-on: https://gerrit.instructure.com/138566
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-02-15 16:52:04 +00:00
Jon Willesen ab9b3edfeb make new activity indicators animatable
closes ADMIN-743

test plan:
- new activity and missing indicators still show up as expected
- they have the right screen reader text
- specs pass

Change-Id: Ic7ca8df63dab28667256438afd94a379c0e75499
Reviewed-on: https://gerrit.instructure.com/139870
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Minkevitch <dan@instructure.com>
2018-02-14 22:19:58 +00:00
Ed Schiebel 89720ff5b0 Retain override info on editing planner note
editing a note lost its override info, so the UI didn't show it as
complete. That's fixed.
There was also an issue with deleting a completed item from planner
causing an error finding the new thing to focus. That's fixed with this
change also.

fixes: ADMIN-693

test plan:
  - create a couple todos on 2 different dates
  - check the complete checkbox on one
  - edit this todo and change it's date
  > expect this todo's complete checkbox to remain checked
  - delete this item
  > expect no errors in the console and focus to be on the next item in
  > the planner

Change-Id: I1747c3b1a7c04ab523f12dac2b97232d6ab65f23
Reviewed-on: https://gerrit.instructure.com/139992
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-02-14 19:36:06 +00:00
Ed Schiebel 473a834fde Show dashboard To Dos in user's profile timezone
fixes ADMIN-727

test plan:
  - have a course in Mountain Time, with a teacher in MT.
  - log in as the teacher and create an assignment due at  1pm some day.
  - log in as a user with a profile timezone set to Atlantic Time
    (Canada)
  - load the card dashbaord
  > expect the assignment's due date to show up at 4pm
  - load the list dashboard
  > expect the assignment's due data to also be 4pm

  - open the planner dashboard
  - create a to do
  > expect the date to default to today
  - save
  > expect the todo to show up in the planner on today
  - click the todo to edit it
  > expect the date field to still show the same date

Change-Id: I43c8985f11354bd06b5b8af6b64eeb7eb8bb02fd
Reviewed-on: https://gerrit.instructure.com/140523
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2018-02-14 19:29:24 +00:00
Mysti Sadler c83f195bb5 Don't lose data in Tray on state update
refs ADMIN-752

Test plan
- Open the update tray while the planner is
  still loading opportunities
- (Very quickly) type something in the title
  field
- Wait a few seconds for everything to finish
  loading and ensure the title is not lost
  and ensure the date field doesn't error
- Focus is still being lost at final planner
  render, further ticket needed

Change-Id: I8366d13959e1285b930e5ee434d616575a8b3daa
Reviewed-on: https://gerrit.instructure.com/140377
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-02-08 20:00:37 +00:00
Mysti Sadler 902ec4e3ac Fix selenium failures for Planner sidebar
Fixes ADMIN-752

Test plan
- Load up the planner and while the opportunities
  are still loading, open the sidebar menu
- Ensure it does not close when the opportunities
  finish loading
- Ensure you can still load a new item in the
  sidebar when one is already open in the sidebar

Change-Id: I822a3ca7e845cb876e87cc393bb072964cce3173
Reviewed-on: https://gerrit.instructure.com/140220
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-02-07 20:39:13 +00:00
Jon Willesen 7c12090ab0 fix focus location when dismissing an opportunity
fixes ADMIN-685

test plan:
- dismiss first opportunity, last opportunity, and middle opportunities
  and make sure focus goes to the right place.
- dismiss the only opportunity when there is one and focus should go to
  the close button.
- deleting items in the main view should similarly still set focus to
  the right place item. For now it gives up if you delete the only item.
  This will be fixed in a separate ticket.

Change-Id: I14159892ac1af9dd207c0c558f4f063944c048cb
Reviewed-on: https://gerrit.instructure.com/139867
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-02-06 21:12:26 +00:00
Ryan Shaw 97510022cd don’t cp all of canvas-planner’s node_modules dir
this is to prevent canvas from copying everything in canvas-planner’s
node_modules dir into /node_modules/canvas-planner/node_modules

this will mimic the exact same behavior that pushing it to the npm
repository and pulling it from there in canvas’s package.json

test plan:
* do `ls node_modules/canvas-planner/node_modules/jest*`
* you should get: ls: node_modules/canvas-planner/\
  node_modules/jest*: No such file or directory

Change-Id: Ie428b3d0a5d6cc1d9bec89ae00adb3d451dfc916
Reviewed-on: https://gerrit.instructure.com/139907
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-02-05 22:13:31 +00:00
Ryan Shaw 68126c6504 update canvas-planner/yarn.lock
Change-Id: I9946241b3ee03ef9a405f282a8f87089c9a50a66
Reviewed-on: https://gerrit.instructure.com/139868
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-02-05 21:18:41 +00:00
Ed Schiebel 40b876493e Move planner under canvas-lms
closes: CORE-949

this also upgrades us to use what was on canvas-planner master
as of 1pm on 2/1/2018 (specifically 9569cc1)

test plan:
* canvas planner should work
* all automated builds should pass

Change-Id: Iecce81d640c8aacb79189e2b26946613a03d25f2
Reviewed-on: https://gerrit.instructure.com/135947
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-02-02 23:58:48 +00:00