refs FOO-2835
flag = none
there are no behavioral changes, only what was necessary to do the
upgrade, see inline comments for explanation where it was warranted
Change-Id: I737f31a210365f190ddb606e96e8eb84e2359e0d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294133
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
refs SEC-4437
flag = none
[pin-commit-respondus_lockdown_browser=8746ff2ccfd6e9ac1d7280687c88e9fa67c0f693]
[pin-commit-multiple_root_accounts=7b11533084764b3a34f390e9a75df26e9dd871f9]
rationale in the script file and more context in the accompanying ticket
~ test plan ~
edit package.json and modify one of the explicit workspace dependencies
such as @instructure/ready to have a specifier other than "*", run the
script and verify it exits with 1
yarn --silent workspaces info --json | \
node script/yarn-validate-workspace-deps.js 2>/dev/null
Change-Id: I6624ada67a21d433477a7ad4d36acf5801853b7a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282948
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
This commit displays all dates in pace_plans in its course timezone.
It required a couple changes to some of our date-time handling
utilities so we could specify a timezone.
closes LS-2938
flag=pace_plans
test plan:
- put your course in different timezone
- in a course with a pace plan, do to /courses/:id/pace_plans
- open projected dates
- play around in the start date input
- type in a new date
- pick a new date in the calendar
> expect the date shown in the textbox to reflect
what you entered or picked
> expect the calendar to highlight the right date
when you pop it open
- try a couple timezones, some +hours, some -hours
> expect DateInputs elsewhere in canvas still work
- there's one in the student planner +todo item tray
Change-Id: I117b5553ffc8f076ef2143dd4d6d25f809eddb7f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282536
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Refs FOO-2347
flag=none
There's still a sneak code path through the jquery
date-time picker that forces DatetimeField to use
tz.parse to guess at what the user selected. And as
is the theme through all of these picker fixes, tz.parse
very often can't handle the formatted output it is given.
So this tries to close that hole once and for all by
having the picker onSelect action recreate the inputdate
metadata that DatetimeField can use in lieu of trying to
parse.
This also changes the hasMeridiem() function in timezone
to use the browser Intl library rather than tz's locale
inferences.
Test plan:
* See original ticket steps to reproduce
* In particular, use the popup calendar date picker
to select dates in various months from now to the
middle of next year
* NOTE that some of the following locales do not have
Intl support on all browsers so the resulting display
may fall back to English, but the correct date should
still be selected in all cases.
* Locales of interest:
en English (United States)
en-AU English (Australian)
fr Français (French)
hu Magyar (Hungarian)
pl Polski (Polish)
nn Nynorsk (New Norwegian)
el Ελληνικά (Greek)
uk український (Ukrainian)
Change-Id: I2aa4bad55eb77b86e9158bc0f445301c0cb060e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275062
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
refs FOO-1891
DateTime parsing and formatting is now provided by the package datetime,
which is now the only module that interfaces with the timezone package.
Date math and utilities can now reside in the @canvas/datetime package,
which are free to utilize the parse and format routines as necessary.
* packages/datetime: base parse & format routines
* packages/datetime-moment-parser: a transitive dep of
packages/datetime; used exclusively by it
* ui/shared/datetime: canvas-specific math & utilities
* ui/shared/timezone: deprecated and set to be removed later
Like datetime-moment-parser, datetime is configured in an initializer to
provide it with parameters coming from Canvas locale files as it is
no longer privy to that information.
CHANGES
-------
- date-time-moment-parser package has been renamed to
datetime-moment-parser for consistency with the rest of the codebase
- hasMeridian has been renamed to hasMeridiem in the datetime package
and will be renamed elsewhere in a later patch
- tests that rely on datetime formatting using locale-specific formats
must now explicitly configure the datetime package with those formats
using the API `getI18nFormats` exported by the initializer, which the
tests do have access to, unlike the regular codebase
- conversely, tests no longer have to stub I18n phrases using the
I18nStubber module merely to format datetimes
TEST PLAN
---- ----
The patch has no logical changes so the test suite should suffice, but
if you insist you can verify that any datepicker widget still works OK
using a locale other than en_US.
Change-Id: I8706556e329e8d931c4673d8f24582fc60a72565
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266897
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>