refs LS-3318
flag=none
confetti-js is a great package, but unfortunately has a few issues for
upcoming work. The public repo hasn't responded to issues in ~2 years
so it is unlikely that our open PR will be accepted.
see https://github.com/Agezao/confetti-js/pull/38
Instead we have opted to create our own generator based on this
package's work. It has been significantly simplified for our usage, as
well as providing two new benefits:
1. Opacity on confetti particles is no longer applied
2. Image elements are now cached to prevent unnecessary requests on each
animation frame
test plan:
- navigate to the confetti storybook
- things should look very similar to before, the only visual
difference should be a lack of particle opacity
qa risk: low
Change-Id: Icb0232b3d3dec8580ff79a73637a3c8748a5c253
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297779
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Davis Hyer <dhyer@instructure.com>
inconsistent checking occurred if the user passed any sort of
config or additional rule to the openAccessibilityChecker command
because it didn't propagate those values appropriately
refs MAT-823
flag=none
test plan:
-add a `config: {disableContrastCheck: true}` to the
checkAccessibility and openAccessibilityChecker call sites
-create a contrast ratio violation in an RCE
>observe that the would-be violation is not flagged when
the a11y checker tray is opened
Change-Id: Ice576eb2fd601ab7110d7f248c309ea3281fb7ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297685
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Joe Hernandez <joe.hernandez@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
fixes VICE-3037
Test Plan
1. Pull down code
2. `yarn install` since we added new packages
3. `yarn run storybook` to get storybook running
4. Visit localhost:6006 on your machine to test storybook
5. NOTE: Some stories are broken, but storybook should behave.
(Broken stories are most likely due to code drift)
Change-Id: Ic2e00a75146e433721ebf37a13df700169431cb8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/297094
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes MAT-493
flag=none
Test Plan:
- Start a new ios simulation in xcode/Simulator
- Open Safari and login to Canvas
- Open an audio or video file (eg: Pages)
- Verify the audio file does not go full-screen
Change-Id: Ida3afa5b96a228e00ba5204558636215739157fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282746
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: David Lyons <lyons@instructure.com>
Refs FOO-2801
flag=none
Turns out the updown package used a JS feature that is
not 100% supported by all the supported Canvas browser.
That was fixed in the package and this bumps the dep
version to pull it in to Canvas.
Test plan:
* If you were getting "TypeError: Object.hasOwn is
not a function" you should not get it any more.
Change-Id: Ibdaf313492c762a0b65143269be0054f06f4b908
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/296686
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Refs FOO-2929
flag=none
The replaces some of the functionality performed in the
ui/index.js entrypoint with the new "engine" which will
eventually hold all the startup helpers for standalone
entrypoints (that don't boot via ui/index.js). For
starters, we've done the loading of the translation file,
the backfill of ENV.LOCALE from the ENV.LOCALES list,
and the (possible) loading of locale polyfills for the
Intl subsystems that are in use.
Test plan:
* Canvas pages come up normally
* Try a locale that requires polyfilling
(recommend Welsh (Cymraeg) in Chrome browser)
* That should still work, you should see console
messages affirming that the locale was polyfilled
for the three Intl subsystems that we use
Change-Id: Ie9b386d5006a03372583240afca06190a4f23ee2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294705
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs DE-1265
JSDOM v16 removes setImmediate(), and this old version of msw uses it. Upgrade it to unblock the JSDOM v16 upgrade.
Change-Id: Ib891ef612620658d30ce23534735c00ac2a2d71c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295931
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Refs FOO-2997
flag=none
What do we still need this for? Nothing, I assert.
Test plan:
* build passes
* front-end is still solid
Change-Id: I65de5a59ba88e08b94e061bf7ded5e7208cec066
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295238
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Refs FOO-2835
flag=none
After running some performance comparisons, it doesn't look
like omitting the chunk hashes from their filenames (in order
to cache-bust after they change) makes any measureable
difference in run time or memory usage. And there were some
engineers surprised by not getting new chunks into their
browsers after making code changes, because the browser was
still using an old cached copy. So it seems best to just
always put the hashes on the chunk.
N.b.: in a production build, filenames for JS assets *always*
include hashes since the caching/CDN environment there is
much more complex.
This commit also sneaks down the max node.js heap size from a
gargantuan 8GB to "merely" 5GB, in response to smaller
memory requirements after the recent optimization work. It
may be able to go smaller yet, but best to be conservative
about that since overflowing the heap causes webpack to die.
Test plan:
* rm -rf public/dist/webpack*
* Run 'yarn webpack'
* Examine the public/dist/webpack-dev directory; the files
in there should all include hashes in their filenames
(i.e. something like qr_mobile_login-c-1f0c369571.js
instead of just qr_mobile_login-c.js)
Change-Id: I9a572aaf959676656c6f94bd3f9ff81a6cf1f1c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295185
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs FOO-2801
flag = none
[change-merged][build-registry-path=jenkins/canvas-lms/foo-2801]
gems/canvas_i18nliner is now a package @instructure/i18nliner-canvas and
lives in the same repo on github along with the 3 other i18nliner
libraries.. this was done to make it easier for maintainers to deal with
this code, since changing one part may break the other due to how
they're architected
the source on github: https://github.com/instructure/i18nliner-js
~ test plan ~
build is still OK, this only affects the generation of files, and those
i manually verified to be identical before and after
Change-Id: I78afa8a808f1699c10aced8466cfade066848bc9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294209
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>
refs FOO-2835
flag = none
there's no need for the custom IgnoreErrors plugin anymore since the
esmac plugin now has an option for bypassing specific violations
~ test plan ~
webpack build still reports on access control violations
Change-Id: I684ce4754f6afbf478daf27c3f6d1b9c4dfc161a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294369
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>
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 FOO-2835
flag = none
hoist tinymce to the top since we're using the same version as the RCE,
this way we don't end up with 2 separate installations
that strange CSS require() call has to be relative for a reason i don't
have neither time nor desire to unravel
there was a discrepancy in the noParse directive between our webpack
config in test and outside of test: the test one was excluding the
entirety of tinymce, which is fine for the main tinymce module but not
so for the "icons" one that the rce package depends on. This was working
OK because the test config was ignoring the top-level tinymce icons
module, which is never required, but now that it's getting required,
it fell apart. I kept to the non-test version where we exclude only the
main module "tinymce.js", as there's no value beyond that.
~ test plan ~
the RCE still works (e.g. in assignment edit page) and looks OK
Change-Id: I664930753189d8f3966ddec0d0340ba100af6ab3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294132
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>
refs FOO-2929
flag=none
Just some prep work for reworking the ui/boot code
into the new capabilities model.
Test plan:
* none (new dep only)
Change-Id: Ie46b9ddbd9bddec93b6f84c7709725d88573022b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292953
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
fixes FOO-2930
flag = none
this hasn't been used for quite some time and there's no good reason for
the code to stay, also I noticed it was used in test at some point but
again, no more
~ test plan ~
CI is ok
Change-Id: If4c5dab06d1b5a579d4475c5f3f33ab4f34c5c91
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/291699
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>
This adds a new page where Site Admin users can manage `Setting`s (aka,
"Internal Settings"). This can be done on the Site Admin settings page,
on the "Internal Settings" tab. Only Site Admin users see and may access
this tab.
The table displayed renders each setting and its value, and offers the
ability to edit or delete each setting. New settings may also be added.
Settings denoted internally as `secret` will be displayed, but their
values obscured. These settings may not be edited or deleted from the UI.
There is also a "Download as..." button that allows all internal settings
(except for secret ones) to be downloaded in JSON or CSV format.
closes DE-1136
flag=none
test plan:
- confirm that, as a site admin, you can add, edit, and delete internal
settings from the "Internal Settings" tab
(note: you can edit a setting by clicking on its value)
- confirm the table is sortable by clicking on the column headers
- confirm the table is downloadable by choosing either the JSON or CSV
options
- confirm that your changes are reflected in the database, and in
`Settings.get` once settings have been reloaded
- confirm that, as a non-site admin user, you can not see the Internal
Settings tab
Change-Id: Ia143bf40e85b43a1db2f6fcc2791718179c351c4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/290906
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
refs DE-989
flag=none
TEST PLAN:
confirm https://code-coverage.inseng.net/ is updated with new report
Previous versions of the JS coverage report we not including jest
tests, so this tweak adds them
Change-Id: Ic780ab9df0ab97eaf3d49cda5c6dbc8cebbb7607
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/288044
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Bobby Buten <bobby.buten@instructure.com>
Product-Review: Bobby Buten <bobby.buten@instructure.com>
closes EVAL-2302
flag=submission_comment_emojis
Test Plan:
1. Verify a 'Emojis in Submission Comments' Course Feature Flag exists
(needs to be enabled at SiteAdmin level before visible at account and
course level). Enable the feature at the SiteAdmin account.
2. In the Account settings for your root account (not the SiteAdmin
account), 'unlock' the feature. Then, go to settings for the root
account and verify there is a 'Blocked Emojis' section. Click the
emoji picker, select 😬, and then click 'Update Settings' at the
bottom of the page.
3. Enable the feature flag in a course.
4. At the following pages, verify that the submission comment textarea
now includes an emoji 'picker' (button that opens a menu to pick
an emoji) and a emoji 'quick picker toolbar' (three emoji buttons
below the textarea, that when clicked insert the pictured emoji into
the textarea. The icons shown include the most recently used emoji
and the two most popular emojis. By default, 👍, 👏, and 😀 are
shown.
Logged in as a student:
- "Assignment Enhancement — Student" page
- Submission Details page
- "Submit Assignment" page (with "Assignment Enhancement —
Student" disabled). Make sure to check the textarea for each
submission type (easiest way to do this is to create an
assignment and click the checkbox for every submission type).
Logged in as a teacher:
- Gradebook
- SpeedGrader
5. Verify the 😬 emoji is not available in the emoji picker at any of
those pages listed above.
6. Disable the feature flag and verify at the pages listed above that
the emoji 'picker' and emoji 'quick picker toolbar' are no longer
shown.
Change-Id: I2c790904927a897bfb0ac30091a5bafb291fd115
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286283
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Jody Sailor
refs DE-1083
Change-Id: I2df4456fd58878dbed4366f52e32acdccd141aa5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286065
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
refs FOO-2697
flag = none
those two packages were relying on canvas's babel.config.js but no more
test plan: the build phase of the CI is enough as there were no logical
changes
Change-Id: I7814796f36f1e30b4dd494a12f768f9dbafb4f1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286759
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
closes MAT-687
flag=none
test plan:
- Configure user account language to Vietnamese.
- Navigate to RCE instance.
- Add content with an a11y issue.
- Click a11y checker button.
> Verify that the a11y tray uses the specified
language.
Change-Id: Ie8256781a5f1af744f13009912415acb9363442b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286851
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jake Oeding <jake.oeding@instructure.com>
QA-Review: Jake Oeding <jake.oeding@instructure.com>
Product-Review: Juan Chavez <juan.chavez@instructure.com>
getTimezoneOffset returns some variations when the timezone shifts in
and out of Daylight Saving Time (DST), which creates some bugs when
selecting those days if the user time zone is equal or ahead of the
account time zone(ENV.TIMEZONE), so let’s calculate the offset
getting the time difference by passing the timezone to the
utcTimeOffset method.
When the user time zone is behind the ENV.TIMEZONE, this does not
work as the DST does not start and finish at midnight, so let's
continue using getTimezoneOffset for those cases.
fixes: LS-2972
flag= none
Test Plan:
Scenario 1:
1- Set your PC to a time zone that uses DST for example, select the
Salt Lake City UT in system preferences
2- Set your account timezone to Mountain time
3- Go to the calendar and click March 13
4- Expect the Datepicker has March 13
5- Create the event and expect it works as usual
6- Repeat the process for November 6
Scenario 2:
- Set your account timezone to a time zone behind your local tz, e.g.
"International date line west".
Repeat the process you did for scenario 1 (steps: 3-6)
Scenario 3:
- Set your account's time zone to one that is ahead of your local TZ,
e.g. "Budapest".
-Repeat the process you did for scenario 1 (steps: 3-6)
Change-Id: Ica7d342c9b29506b72761c63becd38f1ad74519c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285029
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
This fixes the issue where changes to any TypeScript file would result in
every TypeScript file in the project being linted.
flag=none
test plan:
- change a TypeScript file
- verify only the staged files are linted
Change-Id: Ic86a5a19ebe3c74d788d43bafcbae2cc016905d1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/286443
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit adds support for Sentry's APM tracing to the frontend. It
enables tracking of client-side performance metrics across different
pages in the app, so that performance can be further improved.
Settings included in this commit:
- `sentry_frontend_traces_sample_rate`, which controls the APM sample
rate (defaults to 0.0, meaning no transactions are collected)
flag=none
closes DE-997
test plan:
- confirm that there are no issues when the sample rate setting is not
set
- confirm that setting the sample rate setting to something greater than
0.0 results in traces being collected, viewable in the Performance
section of Sentry
- confirm that traces are not collected if the `sentry_disabled` setting
is `true`
- confirm that adjusting `sentry_frontend_traces_sample_rate` correctly
adjusts the quantity of transactions delivered to Sentry, and that
leaving it unset or set to 0.0 results in no transactions being sent
Change-Id: I38790d9efce2513b5d8ce957f8b763fcd8737b34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283692
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
refs DE-989
flag=none
TEST PLAN:
confirm https://code-coverage.inseng.net/ is updated with new report
Change-Id: I596ce0df04c920b096a875004bd765979dec344b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285861
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Bobby Buten <bobby.buten@instructure.com>
Product-Review: Bobby Buten <bobby.buten@instructure.com>
If FullStory is enabled for the current session, this integration will
associate the FullStory session URL with any errors sent to Sentry.
Additionally, it will add an event to the FullStory session indicating
there was a Sentry error, and providing a URL for easy access. If
FullStory is not enabled for the current session, this integration is not
enabled.
closes DE-996
flag=none
test plan:
- ensure that the appropriate values are provided in config/sentry.yml
- enable FullStory for a session by overriding methods in FullStoryHelper
- cause an unhandled exception to occur on the frontend
- verify that the event in Sentry contains FullStory context with a link
to the session URL
- verify that the FullStory session contains the Sentry Error event, with
a link to the Sentry event
- disable FullStory, and verify that frontend exception monitoring with
Sentry works as normal
Change-Id: I782930ecbea6f3e4afb23045d4087fe4c252875d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283151
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
This commit adds a rake task with support for uploading JS sources and
maps to Sentry. It makes use of `@sentry/cli` to perform the upload.
closes DE-995
flag=none
test plan:
- run a local Sentry instance with a project configured
- perform a full webpack build (with source map generation)
- invoke the rake task with all necessary arguments
- check Sentry, and observe that only JS and map files in the webpack-*/
directories have been uploaded
- manually cause a frontend error to occur, and observe that the issue
page displays correctly-mapped source code context
Change-Id: I679055a7bb04bc1e95a78f8c20b1b86dbabbd258
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283465
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
This brings out lint warnings and errors in SpeedGrader to 0.
It brings TypeScript to SpeedGrader.
This will make working in speed_grader.tsx easier.
test plan:
- all automated tests pass
flag=none
Refs EVAL-2220
Change-Id: If889723923f78061c9908ef780542debb1b289a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284307
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
This new version includes a fix to add consistency
to the header length check
Closes MAT-655
flag=none
Test Plan:
- Run a yarn install in Canvas and re-build JS
bundles
- Navigate to an RCE and insert a heading with length
121
- Verify the a11y checker notifies of the error
- Change the heading length to 120
- Verify the a11y checker does not complain about
the length
Change-Id: I0671fe7357a3bdd9f7fd327f57faaf13fec2cbe8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/285220
Product-Review: David Lyons <lyons@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
refs FOO-2697
flag = none
on "babel-plugin-transform-imports": the behavior of this plugin was
surprising to me in that it not only rewrote the specifiers to point to
the CommonJS instead of the ESM variants, but it actually changed the
specifiers to point to the exact file that exports the symbol through a
mixture of fs globbing and guesses.
Consider the following import:
import { DateTime } from '@instructure/ui-i18n'
Normally, you'd think we'll be loading the {main,module,browser} file of
the @instructure/ui-i18n package and refer to the `DateTime` symbol
exported by that file. With the plugin activated, however, the import
*itself* changes to:
import DateTime from '@instructure/ui-i18n/lib/DateTime.js'
This is no longer merely a variant rewrite in any way as we're no longer
loading the same file. This caused new problems to surface that up to
this point were not encountered, as now we're actually loading the
entrypoints as specified.
An example of this is in that specific package where it (its entrypoint)
loads a package `decimal.js` whose ESM variant doesn't work as-is but
its CJS variant does -- something neither we nor the InstUI team were
privy to as the plugin was simply clobbering this piece of information.
~ test plan ~
- jest suite runs and passes
Change-Id: I55d7db1ede742e0f588a84d54a761b7aba03729f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283543
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
This commit adds Sentry support to the frontend, so that exceptions on
the browser side will be reported to Sentry. It requires that
`frontend_dsn` be defined in `config/sentry.yml` and that the
`sentry_disabled` Setting be `false` or unset.
Future commits may add support for frontend APM, Fullstory linking, and
source map uploading.
Settings included in this commit:
- `sentry_frontend_errors_sample_rate`, which controls the sample rate of
error collection (defaults to 0.0, meaning no errors are collected)
flag=none
closes DE-967
test plan:
- confirm that there are no issues when `frontend_dsn` is not set
- confirm that setting `frontend_dsn` results in frontend exceptions
being caught
- check unhandled exceptions
- check exceptions caught by Canvas's React `ErrorBoundary`
- confirm that Sentry is not enabled on the frontend if the
`sentry_disabled` setting is `true`
- confirm that user context is associated with frontend exceptions
reported to Sentry
- confirm that adjusting `sentry_frontend_errors_sample_rate` correctly
adjusts the quantity of errors delivered to Sentry, and that leaving it
unset or set to 0.0 results in no errors being sent
Change-Id: I47af7006a7f12b54dcb3f0121331af6ca2509124
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282879
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
refs FOO-2697
flag = none
webpack config for karma is also independent now and no longer tied to
the main build config, you can find it under ui-build/webpack-for-karma
there are no notable changes outside of breaking that config into a few
files
~ TEST PLAN ~
+-=---------!
- karma/QUnit suite actually runs and passes
Change-Id: Iff474a3d0068441dc8a7c4de605765d936e8ab6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283377
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
refs FOO-2697
flag = none
stop relying on @instructure/ui-babel-preset and instead use exactly the
transforms that we still need today from Babel
transformations that appear to be no longer necessary:
- plugin-transform-destructuring
- plugin-proposal-decorators
- plugin-proposal-class-properties
- plugin-proposal-export-default-from
- plugin-proposal-object-rest-spread
- plugin-proposal-optional-chaining
- plugin-syntax-dynamic-import
- plugin-proposal-private-methods
- postcss et al (we only import 3-4 css sources and they all come from
node_modules, we don't use themeable on core)
transformations that i don't think are necessary:
- babel-plugin-transform-undefined-to-void: because if there is code
that is re-assigning `undefined`, the solution would be not to humor
it but to stop using it and perhaps file a lawsuit
babel deps were pinned to avoid semver upgrading, because upgrading
within the 7 line is already breaking us and i'll deal with that
another day
~ TEST PLAN ~
\ ---- ---- /
- you can run webpack locally and see no visual artifacts
Change-Id: I64eb9a7ac94e17f730686f579cf67cd8bd4e12f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283142
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Sean Scally <sean.scally@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Test plan:
- With the enhanced gradebook filters flag enabled
- Create an ad hoc filter and do not press Save
- When applied, the filter should take effect
- Reload the page
- The adhoc filter should no long appear
- Create, apply, and save a filter
- The filter should take effect
- Reload the page
- The saved filter should still appear and apply
- Create, apply, and save a filter
- Delete the filter
- Reload the page
- The adhoc filter should no long appear
To do in subsequent commit:
- More exact conformity to designs with save and rename UI
flag=enhanced_gradebook_filters
Closes EVAL-2171
Closes EVAL-2172
Closes EVAL-2173
Refs EVAL-1934
Change-Id: Id1c5be631b37e77e7a2f9a3bdd05d366ca44952f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283572
Reviewed-by: Eduardo Escobar <eduardo.escobar@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Eduardo Escobar <eduardo.escobar@instructure.com>
Product-Review: Jody Sailor
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>