canvas-lms/package.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

449 lines
17 KiB
JSON
Raw Normal View History

AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
{
"name": "canvas-lms",
"license": "AGPL-3.0",
AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
"version": "0.0.0",
"engines": {
"node": ">=18.0.0",
"yarn": "^1.19.1"
},
"private": true,
"workspaces": {
"packages": [
"gems/plugins/*",
"packages/*",
"ui/engine",
"ui/shared/*"
]
},
"dependencies": {
"@apollo/client": "^3.4.16",
"@fullstory/browser": "^1.4.10",
"@instructure/brandable_css": "^3",
"@instructure/canvas-media": "*",
"@instructure/debounce": "^8",
"@instructure/emotion": "^8",
"@instructure/media-capture": "^9.0.0",
"@instructure/outcomes-ui": "2.0.0",
"@instructure/react-crop": "^5.0.1",
"@instructure/reactour": "https://github.com/instructure/reactour#b908434fe544703e26bc67c67c4111252c401f92",
"@instructure/ready": "*",
"@instructure/ui-a11y-content": "^8",
"@instructure/ui-a11y-utils": "^8",
"@instructure/ui-alerts": "^8",
"@instructure/ui-avatar": "^8",
"@instructure/ui-badge": "^8",
"@instructure/ui-billboard": "^8",
"@instructure/ui-breadcrumb": "^8",
"@instructure/ui-buttons": "^8",
"@instructure/ui-calendar": "^8",
"@instructure/ui-checkbox": "^8",
"@instructure/ui-date-input": "^8",
"@instructure/ui-date-time-input": "^8",
"@instructure/ui-decorator": "^8",
"@instructure/ui-dialog": "^8",
"@instructure/ui-drawer-layout": "8",
"@instructure/ui-editable": "^8",
"@instructure/ui-file-drop": "^8",
"@instructure/ui-flex": "^8",
"@instructure/ui-focusable": "^8",
"@instructure/ui-form-field": "^8",
"@instructure/ui-grid": "^8",
"@instructure/ui-heading": "^8",
"@instructure/ui-i18n": "^8",
"@instructure/ui-icons": "^8",
"@instructure/ui-img": "^8",
"@instructure/ui-link": "^8",
"@instructure/ui-list": "^8",
"@instructure/ui-media-player": "^9.0.0",
"@instructure/ui-menu": "^8",
"@instructure/ui-metric": "^8",
"@instructure/ui-modal": "^8",
"@instructure/ui-motion": "^8",
"@instructure/ui-navigation": "^8",
"@instructure/ui-number-input": "^8",
"@instructure/ui-overlays": "^8",
"@instructure/ui-pagination": "^8",
"@instructure/ui-pill": "^8",
"@instructure/ui-portal": "^8",
"@instructure/ui-progress": "^8",
"@instructure/ui-radio-input": "^8",
"@instructure/ui-rating": "^8",
"@instructure/ui-react-utils": "^8",
"@instructure/ui-responsive": "^8",
"@instructure/ui-select": "^8",
"@instructure/ui-simple-select": "^8",
"@instructure/ui-spinner": "^8",
"@instructure/ui-svg-images": "^8",
"@instructure/ui-table": "^8",
"@instructure/ui-tabs": "^8",
"@instructure/ui-tag": "^8",
"@instructure/ui-text": "^8",
"@instructure/ui-text-area": "^8",
"@instructure/ui-text-input": "^8",
"@instructure/ui-themes": "^8",
"@instructure/ui-time-select": "^8",
"@instructure/ui-toggle-details": "^8",
"@instructure/ui-tooltip": "^8",
"@instructure/ui-top-nav-bar": "^8",
"@instructure/ui-tray": "^8",
"@instructure/ui-tree-browser": "^8",
"@instructure/ui-view": "^8",
"@instructure/uid": "^8",
"@instructure/updown": "^1.3",
"@microsoft/immersive-reader-sdk": "^1.1.0",
"@peculiar/asn1-schema": "^2.3.6",
Add internal CA upload to LDAP authentication providers This will allow an admin to specify an internal CA that they would like to trust when connecting to their configured LDAP instance. It also allows an admin to explicitly opt in to TLS certificate verification prior to our enforcement date. closes AE-180 flag=none test plan: - with the `verify_ldap_certs` flag disabled: - verify LDAP connections succeed with bad certs - upload a CA certificate - verify LDAP connections still succeed with bad certs - define the `ldap_validate_tls_cert_enforcement_date` setting - verify the "Verify TLS Certificate" checkbox is visible, and editable - verify the help text appears - enable the checkbox - verify connections fail with bad certs - verify connections succeed if the cert was issued by the uploaded CA - clear the `ldap_validate_tls_cert_enforcement_date` setting - verify the "Verify TLS Certificate" checkbox is hidden - with the `verify_ldap_certs` flag enabled: - verify LDAP connections do not succeed with bad certs - upload a CA certificate - verify LDAP connections succeed if the cert was issued by the uploaded CA - define the `ldap_validate_tls_cert_enforcement_date` setting - verify the "Verify TLS Certificate" checkbox is on, but disabled - verify the help text is hidden - clear the `ldap_validate_tls_cert_enforcement_date` setting - verify the "Verify TLS Certificate" checkbox is hidden Change-Id: I41536261bdc7e5554cbf5b9915638ced996192f3 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315294 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Isaac Moore <isaac.moore@instructure.com> Product-Review: Isaac Moore <isaac.moore@instructure.com> Reviewed-by: Jacob Burroughs <jburroughs@instructure.com> Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-04-13 12:19:01 +08:00
"@peculiar/x509": "^1.9.3",
"@popperjs/core": "^2.9.2",
"@sentry/cli": "^2.21.5",
"@sentry/fullstory": "^1.1.7",
"@sentry/react": "^7.81.0",
"@tanstack/query-sync-storage-persister": "^4.36.1",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-persist-client": "^4.36.1",
"@types/b-spline": "^2.0.4",
"@types/dagre": "^0.7.52",
"@types/jquery.cookie": "^1.4.32",
"@types/react-dnd": "2.0.36",
"@types/twitter-text": "^3.1.2",
"@types/uuid": "^9.0.0",
"@vitest/coverage-v8": "^1.0.4",
"apollo-cache": "^1.3.2",
"apollo-cache-inmemory": "^1.6.3",
"apollo-cache-persist": "^0.1.1",
"apollo-client": "^2.6.4",
"apollo-link": "^1.2.3",
"apollo-link-error": "^1.1.1",
"apollo-link-http": "^1.5.5",
"apollo-link-state": "^0.4.2",
"apollo-utilities": "^1.3.2",
"axios": "^0.21.1",
"axios-cache-adapter": "^2.7.0",
"b-spline": "^2.0.2",
"backbone": "1.1.1",
"big.js": "^5.0.3",
"browserslist": "^4.19.1",
"canvas_offline_course_viewer": "https://github.com/instructure/canvas_offline_course_viewer.git#1.2.0",
"chart.js": "^3.9.1",
"chartjs-adapter-moment": "^1.0.0",
"classnames": "^2.2.5",
"color-slicer": "0.8.0",
"coverage-istanbul-loader": "^3.0.5",
"create-react-class": "^15.6.3",
"cross-fetch": "^4.0.0",
"crypto-js": "^4.1.1",
"d3": "3.5.17",
"dagre": "^0.8.5",
add submission comment emojis 🎉 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
2022-03-02 08:06:40 +08:00
"emoji-mart": "^3.0.1",
Add page for managing internal settings 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>
2022-05-02 22:45:52 +08:00
"export-from-json": "^1.6.0",
"final-form": "^4.20.2",
"formdata-polyfill": "^3.0.9",
"fullcalendar": "https://github.com/instructure/fullcalendar.git#1108dd1c991a029ec6fd7de3337737ec5295ba97",
"graphiql": "^0.14.2",
"graphiql-explorer": "^0.4.2",
"graphql": "^14",
"graphql-request": "^6.1.0",
"graphql-tag": "^2.8.0",
"i18n-js": "^3",
"ic-ajax": "~2.0.1",
"ic-tabs": "0.1.3",
"immer": "^3",
"immutability-helper": "^3",
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-04-10 09:20:00 +08:00
"immutable": "^3.8.2",
"invariant": "^2.2.2",
"is-valid-domain": "^0.0.11",
"jquery": "https://github.com/instructure/jquery.git#1.7.2-with-AMD-and-CommonJS",
"jquery-getscrollbarwidth": "^1.0.0",
"jquery-ui-touch-punch": "^0.2.3",
"jquery.cookie": "^1.4.1",
"jquery.elastic": "1.0.0",
"localforage": "^1.10.0",
"location-origin": "^1.1.4",
"lodash": "^4.17.21",
"md5": "^2.2.1",
"mediaelement": "https://github.com/instructure/mediaelement.git#master",
"mime": "^4.0.1",
"minimatch": "~3.0.4",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"nanoid": "^3.1.10",
"newless": "^0.3.0",
"normalize-scroll-left": "^0.2",
"page": "^1.11",
"parse-decimal-number": "1.0.0",
"parse-link-header": "^1",
"prop-types": "^15",
"qs": "^6.6.0",
"querystring": "0.2.1",
"react": "^16.13.1",
"react-apollo": "~3.0.1",
"react-dnd": "6.0",
"react-dnd-html5-backend": "6.0",
"react-dom": "^16.13.1",
"react-final-form": "^6.5.3",
"react-identicons": "^1.2.5",
"react-immutable-proptypes": "^2.1.0",
"react-lazy-load": "^4.0.1",
"react-modal": "^3",
"react-popper": "^2.2.5",
"react-redux": "^5.1.1",
"react-router-dom": "^6.16.0",
upgrade react-token-input so it supports react 16 closes: CORE-1885 Test plan: * make sure the token input that appears when you edit assignment due date Overrides on the assignment overrides page still works Like it did before. Here’s it’s original test plan: new due dates selection UI - on assignments, quizzes & discussions pages - with DA on and off - assign various due dates/(un)lock dates to source sections, individuals, and everybody - these should create overrides that properly take students/sections and dates - validations should work for all dates as normal and not let empty overrides get created (with no students or sections) - the names of overrides should properly update as students change - as more overrides get created, saving assignments should not slow down significantly - the student/section selector should be intuitive * the “new grading period set” form should work as it did before. Here’s it’s original test plan: A new button "+ Add Grading Period Set" is on the Grading Period Sets page. This allows a new set to be named and associated with as many terms as needed. To begin, visit the Grading page for an account (e.g. /accounts/1/grading_standards) and click "+ Set of Grading Period" and within this form ensure the following: 1. Given no name in the "Set name" field, when clicking the "Create" button a flash message is displayed and the set is not saved 2. Given no enrollment terms in the "Attach terms", when clicking the "Create" button a flash message is displayed and the set is not saved 3. Given a name and at least one attached enrollment term, when clicking the "Create" button an AJAX call successfully persists to the database and the new set is displayed on the page along with a successful flash message 4. When the form is open, the "+ Set of Grading Periods" button is disabled 5. When the form is in the process of creating a new set, the "Create" and "Cancel" button is disabled 6. Clicking close at any other time closes the form and re-enables the "+ Set of Grading Periods" button and all data in the form is cleared Change-Id: Ibb0290202b5dcf00ec42a4bb6d1c3d2e3d7a3b2b Reviewed-on: https://gerrit.instructure.com/164492 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-09-14 23:20:08 +08:00
"react-tokeninput": "^2.5.0",
"react-transition-group": "^1",
"react-use": "^17.3.1",
"redux": "^4.0.1",
"redux-actions": "^2.6.4",
"redux-promise": "^0.6",
"redux-saga": "^0.16.0",
"redux-thunk": "^3.1.0",
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 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: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"reselect": "^4.0.0",
"shallow-equal": "^1.2.0",
"spin.js": "2.3.2",
"swfobject": "^2.2.1",
"tablesorter": "^2.28.5",
"timezone": "npm:@instructure/timezone@1.0.28",
"tinycolor2": "1.4.1",
"twitter-text": "^3.1.0",
"use-debounce": "^3",
"use-media-set": "^1.1",
"uuid": "^3.2.1",
"velocity-animate": "^1.5.0",
"webpack-retry-chunk-load-plugin": "^3.1.1",
"yarn-deduplicate": "^3.0.1",
"zustand": "3.7.2"
},
AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
"devDependencies": {
"@apollo/react-common": "~3.0.1",
"@apollo/react-components": "~3.0.1",
"@apollo/react-hoc": "~3.0.1",
"@apollo/react-hooks": "~3.0.1",
"@apollo/react-ssr": "~3.0.1",
"@apollo/react-testing": "~3.0.1",
Upgrade to babel 7 & allow any js file to be themeable closes: CORE-2699 CORE-2700 UIDEV-99 This commit gets canvas-lms itself upgraded to babel 7. To do that we also had to upgrade jest to v24. We had already got canvas-rce and canvas-planner on jest24/babel7 but now this gets everything to babel 7. so you will see a lot of things removed from yarn.lock since we don’t don’t have to have different versions of everything for babel and jest The other major thing this does is make it so any JS file in canvas can become an @instructure/ui-themeable themeable component. This means you no longer should have to put your css in app/stylesheets for any new react components that you are writing. Test plan: 1. Make sure that the perf of `yarn build:js` is on-par with what it was before. We pass everything through the themeable babel transform now so there is a chance it is slower. If it is majorly slower, we’ll have to figure something out. 2. run a production weback build. The common (or any bundle for that matter should get output exactly the same as it did before) things to manually qa check: * in a NODE_ENV=production enviornment, go to /accounts/site_admin/developer_keys * click the "+ Developer Key" button, it should open the modal. (there are selenium tests that do this, but it was one thing that had to be fixed to get jenkins to pass) * on a course that is set up as a master course, click on the thing that opens the blueprint courses tray. * verify that when you click "Associations" and "Sync History" links in that tray, that they dynamically load the webpack chunk for the modal contents for that thing and then the modal is shown (again, there are selenium specs that test that exact thing but it is always good to manually test it too) Change-Id: I802584228962b54480a500f8fe422f45c2dcac4c Reviewed-on: https://gerrit.instructure.com/183965 Tested-by: Jenkins Reviewed-by: Clay Diffrient <cdiffrient@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-06 05:20:27 +08:00
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/parser": "^7",
"@babel/plugin-proposal-class-properties": "^7",
babel independence(3): jest 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>
2022-01-25 23:25:15 +08:00
"@babel/plugin-proposal-optional-chaining": "^7",
"@babel/plugin-transform-modules-commonjs": "^7",
"@babel/plugin-transform-react-constant-elements": "^7",
"@babel/plugin-transform-react-inline-elements": "^7",
"@babel/plugin-transform-runtime": "^7",
"@babel/preset-env": "^7",
"@babel/preset-react": "^7",
"@babel/preset-typescript": "^7",
"@instructure/browserslist-config-canvas-lms": ">=2",
"@instructure/i18nliner": "^3",
"@instructure/i18nliner-canvas": "^1.3",
"@instructure/i18nliner-handlebars": "^2",
"@instructure/i18nliner-runtime": "^1.0.2",
"@prettier/plugin-ruby": "^1.5.2",
"@sheerun/mutationobserver-shim": "0.3.2",
"@testing-library/dom": "^8",
"@testing-library/jest-dom": "^5",
"@testing-library/react": "^12",
"@testing-library/react-hooks": "^5",
convert group edit JQueryUI dialog to InstUI modal This commit covers the teacher/admin view of editing user groups. Need to look into removing the old code in a followup change. closes FOO-909 flag = none test plan: - Verify the test plan in the following gerrit still plays out: - https://gerrit.instructure.com/c/canvas-lms/+/247628 - You'll need a student created group set and an admin created group set to test all the angles - Student Group Set - Create a group and remember its state - Go to edit said group - Verify the Group Name field is populated - Verify the Joining select is populated with prior choice - Edit the Group Name and Joining select dropdown - Verify the group collection is refreshed with your newly updated group - Go to edit the group and verify your changes saved successfully - Admin Group Set - Create a group and remember its state - Go to edit said group - Verify the Group Name field is populated - Verify the Group Membership Limit is populated - Verify as you did with the Student Group Set - Ensure the group has a member count - Edit the group and set the Group Membership Limit lower than your member count - Verify you get a descriptive error - The updated group modal should behave as it did before and be accessible and keyboard navigable Change-Id: I6bd4c6983239c9ed779fa41d297dab81c364fcbe Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250185 Reviewed-by: Ahmad Amireh <ahmad@instructure.com> QA-Review: Ahmad Amireh <ahmad@instructure.com> Product-Review: Ahmad Amireh <ahmad@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-10-15 06:41:17 +08:00
"@testing-library/user-event": "^12",
"@types/enzyme": "^3.10.16",
"@types/enzyme-adapter-react-16": "^1.0.9",
Poll for publishing status updates in Pace Plans Updates Pace Plans to check for the status of delayed publishing jobs on a continual basis to know when publishing is done for real. closes LS-2759 flag = pace_plans Test plan: - Enable Pace Plans feature flag and course settings - Make sure you have delayed_job running - Go to a course with a new or existing Pace Plan - Make some changes to the pace plan and click "Publish" - Expect to see the publishing status in the upper-right part of the screen show "Publishing plan..." - In the Dev Tools network tab, check to see that requests are being made to the /api/v1/progress/<id> every 3 seconds - Expect the status to change to "All changes published" once the delayed job has finished - Do something to introduce delay into the delayed job (set a breakpoint, add a sleep, etc...) - Make some more changes to the plan and click "Publish" again - Refresh the page to reload Pace Plans - Expect the publishing status to be "Publishing plan..." on initial load as well until the job completes Extra credit: - Make the publish job error out by changing the publish code or something - Make some changes and publish again - Verify that the status changes from "Publishing plan..." to "All changes published" when the Progress API returns with a "failed" status (actually showing the error will be handled with another ticket) - Verify that the `pacePlans.publishingProgress` object in the Redux store's state contains a `failed` workflow_state and an errorm message Change-Id: Iaf1db5b1c35627e15d8e1b6c534fc1e23b8e4409 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276530 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: Peyton Craighill <pcraighill@instructure.com>
2021-10-22 01:58:16 +08:00
"@types/fetch-mock": "^7",
"@types/jquery": "^3.5.6",
"@types/jqueryui": "^1.12.16",
Add new Pace Plan picker component This change adds a new fly-out drop-down component for selecting a type of pace plan to work with, replacing the old two components. As part of this change, the "selectedPlanType" state was replaced with "selectedContextType" and "selectedContextId". The change also contains some refactoring to ensure that all IDs are treated as strings everywhere (instead of "number | string"). closes LS-2591 flag = pace_plans Test plan: - Enable pace plans on a course (account-level feature flag and course-level setting) - Ensure the course has several enrollments and at least a couple of sections - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the pace plans page in the course - Expect to see a single drop-down defaulting to "Course Pace Plan" - Expect to see all sections listed alphabetically under "Sections" - Expect to see all students listed alphabetically by sortable_name under "Students" - Click on "Course Pace Plan", expect to see a network request in dev tools for latest_draft_for?context_type=Course&context_id=<id> (with the ID of the course) - Click on a section, expect to see a network request in dev tools for latest_draft_for?context_type=Section&context_id=<id> (with the ID of the section) - Click on a student, expect to see a network request in dev tools for latest_draft_for?context_type=Enrollment&context_id=<id> (with the ID of the enrollment) - Expect to get error messages for these requests, since the associated API endpoint doesn't exist yet Change-Id: Iae03d6e3e853bf2c1fe5d0638ab1ae8e79f146e1 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272802 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Nate Armstrong <narmstrong@instructure.com> QA-Review: Nate Armstrong <narmstrong@instructure.com> Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-09-03 00:08:08 +08:00
"@types/lodash": "^4.14.72",
"@types/parse-link-header": "^1.0.0",
"@types/qs": "^6.9.8",
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 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: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"@types/react": "^17.0.19",
"@types/react-dom": "^17.0.9",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitest/ui": "^1.0.4",
"@yarnpkg/lockfile": "^1.0.2",
"array-flat-polyfill": "^1.0.1",
"axe-core": "~2.1.7",
"babel-eslint": "^10",
"babel-jest": "^28",
"babel-loader": "^9.1.3",
"babel-plugin-transform-react-remove-prop-types": "^0.4",
"babel-plugin-typescript-to-proptypes": "^2.1.0",
modernize canvas_quizzes fixes FOO-1409 flag = none no more client_apps, canvas_quizzes now lives as part of canvas-lms proper inside app/jsx/, which makes the build leaner and leaves us with one less thing to reason about logical changes: - converted from AMD to ES modules - upgraded to recent react + react-router - dropped RSVP in favor of native Promises - used CanvasModal instead of home-grown Dialog - removed dead code; notifications in particular were fishy as there had no dependents at all and did not even show up in the graph - ported tests to Jest, added more unit ones and two integration ones - removed "config.onError" and now throws errors where appropriate - disabled console statements in non-dev :: test plan :: - create a (old-school) quiz containing all types of questions - as 3 distinct students, take the quiz and try to randomize your answers at this point it's helpful to have a reference to compare the screens; I replicated the quiz on my production sandbox for this - go to /courses/:id/quizzes/:id/submissions/:id/log - verify it looks OK - click on a specific question in the stream and verify the question inspector widget works OK - go back to stream and push "View table" - verify the table and its controls are OK - go to /courses/:id/quizzes/:id/statistics - verify it looks OK - click on ? in the discrimination index chart and verify it displays a dialog with help content - click on "X respondents" in one of the charts and verify it displays a dialog with the respondent names - verify the interactive charts do interact as expected (no logic changed here so just a quick glance) - link to "View in SpeedGrader" for essay-like questions works Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Simon Williams <simon@instructure.com> QA-Review: Simon Williams <simon@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
2021-01-02 07:58:12 +08:00
"chai-assert-change": "^2.0.0",
"change-case": "3.0.1",
"concurrently": "^4",
2022-01-19 06:25:07 +08:00
"core-js": "^3.20.3",
"core-js-builder": "^3",
"css-loader": "^3",
"ember-template-compiler": "^1.8.0",
"enzyme": "^3",
"enzyme-adapter-react-16": "^1.15.7",
"enzyme-to-json": "^3.3.4",
"eslint": "^7",
"eslint-config-airbnb": "^18",
"eslint-config-prettier": "^6",
"eslint-plugin-babel": "^5",
"eslint-plugin-eslint-comments": "^3.0.1",
"eslint-plugin-import": "^2",
Upgrade to babel 7 & allow any js file to be themeable closes: CORE-2699 CORE-2700 UIDEV-99 This commit gets canvas-lms itself upgraded to babel 7. To do that we also had to upgrade jest to v24. We had already got canvas-rce and canvas-planner on jest24/babel7 but now this gets everything to babel 7. so you will see a lot of things removed from yarn.lock since we don’t don’t have to have different versions of everything for babel and jest The other major thing this does is make it so any JS file in canvas can become an @instructure/ui-themeable themeable component. This means you no longer should have to put your css in app/stylesheets for any new react components that you are writing. Test plan: 1. Make sure that the perf of `yarn build:js` is on-par with what it was before. We pass everything through the themeable babel transform now so there is a chance it is slower. If it is majorly slower, we’ll have to figure something out. 2. run a production weback build. The common (or any bundle for that matter should get output exactly the same as it did before) things to manually qa check: * in a NODE_ENV=production enviornment, go to /accounts/site_admin/developer_keys * click the "+ Developer Key" button, it should open the modal. (there are selenium tests that do this, but it was one thing that had to be fixed to get jenkins to pass) * on a course that is set up as a master course, click on the thing that opens the blueprint courses tray. * verify that when you click "Associations" and "Sync History" links in that tray, that they dynamically load the webpack chunk for the modal contents for that thing and then the modal is shown (again, there are selenium specs that test that exact thing but it is always good to manually test it too) Change-Id: I802584228962b54480a500f8fe422f45c2dcac4c Reviewed-on: https://gerrit.instructure.com/183965 Tested-by: Jenkins Reviewed-by: Clay Diffrient <cdiffrient@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com>
2019-03-06 05:20:27 +08:00
"eslint-plugin-jest": "^22",
"eslint-plugin-jsx-a11y": "^6",
"eslint-plugin-lodash": "^6",
"eslint-plugin-notice": "^0.8",
"eslint-plugin-prettier": "^3",
"eslint-plugin-promise": "^4",
"eslint-plugin-qunit": "^4",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^1",
"exports-loader": "^0.7",
"fast-glob": "^3.2.4",
"fetch-mock": "^7",
"file-loader": "^4",
catch and report on rogue imports fixes FOO-2422 this patch codifies the access rules between modules in the new UI file structure: packages/ can be accessed by everyone ui/shared/ can only be accessed by Canvas packages and features ui/features/ can only be accessed by boot ui/boot/ can only be accessed by entrypoint ui/index.js can only be accessed by Rails additionally, the specifiers used for importing may no longer be arbitrary; generally, every enapsulated folder must use relative specifiers for intra-imports, and bare specifiers for inter-imports ui/features/a/a.js => ui/features/a/b.js [via] ./b.js ui/features/a/a.js => ui/shared/a/a.js [via] @canvas/a/a ui/features/a/a.js => packages/a/a.js [via] a/a the rules are defined in the webpack config file, there are currently 37 violations that we have to address, for now I added a plugin to ignore them (see frontend_build/existingEncapsulationErrors.json) violations are reported with a detailed description of what exactly caused the violation, what is being violated, along with a suggestion on how to address it - see https://github.com/instructure/esmac for the tool that applies the rules - see https://github.com/instructure/webpack-encapsulation-plugin for the webpack implementation of that tool ~ test plan ~ ~~~^ ^~~~ \m/ edit frontend_build/existingEncapsulationErrors.json and remove entries from there, or alternatively just disable the IgnoreErrors plugin to get all the errors displayed, then rerun webpack against the offending source file to view the error report - for example: npx webpack --entry=$PWD/packages/backbone-identity-map/index.js # or, if u chose to disable the plugin npx webpack the messages should be clear and helpful; there are currently 4 scenarios for access violation, and 4 scenarios for specifier mismatche Change-Id: Ibae4245122e2c015ccbd47d73ac8689e0a386d86 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275200 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>
2021-10-02 07:28:20 +08:00
"find-up": "^5.0.0",
"gglobby": "0.0.3",
"glob": "^7",
"graphql-tools": "^4",
"gulp": "^4",
"gulp-file": "^0.4",
"gulp-filter": "^6",
"gulp-insert": "^0.5",
"gulp-load-plugins": "^2",
"gulp-rename": "^2",
"gulp-rev": "^9",
"gulp-sourcemaps": "^2",
"gulp-uglify": "^3",
"handlebars": "1.3.0",
"happy-dom": "^12.10.3",
"imports-loader": "^0.8",
"istanbul-merge": "^1.1.1",
"jest": "^29.7.0",
"jest-canvas-mock": "^2",
"jest-config": "^28",
"jest-environment-jsdom": "^29.7.0",
"jest-fetch-mock": "^3.0.3",
"jest-junit": "^7",
"jest-localstorage-mock": "^2",
"jest-moxios-utils": "^1",
"jsdom-global": "^3.0.2",
"json-loader": "^0.5.7",
"karma": "^6.4.2",
"karma-chrome-launcher": "^2",
"karma-coverage-istanbul-reporter": "^2",
"karma-junit-reporter": "^1",
"karma-qunit": "~1.2.1",
"karma-selenium-grid-launcher": "^0.3.0",
"karma-sourcemap-loader": "^0.3",
"karma-spec-reporter": "^0.0.32",
"karma-verbose-reporter": "^0.0.6",
"karma-webpack": "^5",
"lint-staged": "^9",
rework handlebars dependency on brandable_css refs FOO-1116 right now in order to build the javascript, we must run brandable_css first for the specific purpose of injecting into handlebars templates their corresponding stylesheet file with the checksum as reported by brandable_css this patch moves things around such that Rails provides this mapping of "handlebars template" to "CSS variant file checksums" in a global variable (Rails is privy to this information already), webpack then at build time injects only a reference to that mapping into the template, then our runtime brandable-css JS helper will resolve that reference from the mapping and request the correct file based on the current user's variant [1] rails assigns window.BRANDABLE_CSS_HANDLEBARS_INDEX with content like this: [ [ "new_styles_normal_contrast", "new_styles_high_contrast", ... ], { "0c": ["0f4f01ab86", 0, 0, "e3e7211701", 3, ... ], ... } ] the structure of the mapping is explained in brandable_css[1], it is a bit overtuned to reduce the size as much as possible since this is included for ALL pages even though the templates in question may never be rendered (right now it's ~1.5kB and should never grow) [2] webpack asks @canvas/brandable-css to loadStylesheetForJST using the contrived id for that file (frontend_build/i18nLinerHandlebars.js:92) [3] brandable-css/index.js will decode that structure to arrive at the exact URL for the stylesheet for that template for the current user variant with this , we should be able to optimize "rake canvas:compile_assets" to run both brandable_css and webpack in parallel, which will greatly mitigate the performance decrease from moving from node-sass to dart-sass == test plan go to some assignment's syllabus page, edit the file app/stylesheets/jst/courses/Syllabus.scss with something fun like: #syllabus .day_date { background: $fire; } rerun `npx brandable_css`, reload the page and verify it's on fire, optionally change your setting to enable High Contrast mode, reload the syllabus page and verify the color changes (it picks up the other variant stylesheet) [1]: https://github.com/instructure/brandable_css/pull/4/commits/80af6e70af6ad60312187f256c2457d33ca75202 Change-Id: Ie48cc71d4837ee02313b2d45a9ad2944725acad2 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268615 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: August Thornton <august@instructure.com> QA-Review: August Thornton <august@instructure.com> Product-Review: August Thornton <august@instructure.com>
2021-07-08 08:03:09 +08:00
"loader-utils": "^1",
"merge-stream": "^2",
catch and report on rogue imports fixes FOO-2422 this patch codifies the access rules between modules in the new UI file structure: packages/ can be accessed by everyone ui/shared/ can only be accessed by Canvas packages and features ui/features/ can only be accessed by boot ui/boot/ can only be accessed by entrypoint ui/index.js can only be accessed by Rails additionally, the specifiers used for importing may no longer be arbitrary; generally, every enapsulated folder must use relative specifiers for intra-imports, and bare specifiers for inter-imports ui/features/a/a.js => ui/features/a/b.js [via] ./b.js ui/features/a/a.js => ui/shared/a/a.js [via] @canvas/a/a ui/features/a/a.js => packages/a/a.js [via] a/a the rules are defined in the webpack config file, there are currently 37 violations that we have to address, for now I added a plugin to ignore them (see frontend_build/existingEncapsulationErrors.json) violations are reported with a detailed description of what exactly caused the violation, what is being violated, along with a suggestion on how to address it - see https://github.com/instructure/esmac for the tool that applies the rules - see https://github.com/instructure/webpack-encapsulation-plugin for the webpack implementation of that tool ~ test plan ~ ~~~^ ^~~~ \m/ edit frontend_build/existingEncapsulationErrors.json and remove entries from there, or alternatively just disable the IgnoreErrors plugin to get all the errors displayed, then rerun webpack against the offending source file to view the error report - for example: npx webpack --entry=$PWD/packages/backbone-identity-map/index.js # or, if u chose to disable the plugin npx webpack the messages should be clear and helpful; there are currently 4 scenarios for access violation, and 4 scenarios for specifier mismatche Change-Id: Ibae4245122e2c015ccbd47d73ac8689e0a386d86 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275200 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>
2021-10-02 07:28:20 +08:00
"micromatch": "^4.0.4",
"mkdirp": "^1.0.4",
Pass correct locale to Planner Sometimes ENV.LOCALE and ENV.MOMENT_LOCALE are different (zh-Hans v zh-cn or mi v mi-nz). We were passing the former to planner, but moment needs the full locale, including language and region identifiers, and formatMessage copes with the full locale just fine, so we really need to pass in the latter or moment eventually blows up. So mi-nz month names would successfully parse, had to both bump our version of moment and tweak the canvas customized mi-nz locale data. to test, you'll have to run yarn to update moment, then build with RAILS_LOAD_ALL_LOCALES=1 yarn build Note on the changes to timezoneSpec.js: - some of the specs were parsing dates like "Mon, Aug 3", which are being interpreted in the current year, when Aut 3 is not a Monday. Resolved this by using MockDate to pretend today is 2/1/2015 - moment does not always interpret the Chinese characters for evening as implying PM. I'm assuming canvas will never need that particular construct and commented out the failing string. - there's one date-time that's getting the date totally wrong. - Fixed grammatically incorrect instances of '8月 3, 2015' to ''8月 3日, 2015' - fix cases where the year is coming after the month and day, which would never really happen fixes ADMIN-1331 test plan: - have a student in course so planner is enabled. - go to /profile/settings and Edit - change the Language to Reo Māori (Aotearoa) and "Update Settings" - go to the planner dashboard - click on + to create a new todo > expect you can create a todo. If you want, you can repeat with any of the languages listed in the ticket just to prove ^that wasn't a fluke. Change-Id: I9ba069ef61529088ab92271d7857998df6bbc409 Reviewed-on: https://gerrit.instructure.com/161206 Tested-by: Jenkins Reviewed-by: Ryan Shaw <ryan@instructure.com> Reviewed-by: Mysti Sadler <mysti@instructure.com> Reviewed-by: Jeremy Stanley <jeremy@instructure.com> QA-Review: Anju Reddy <areddy@instructure.com> Product-Review: Ed Schiebel <eschiebel@instructure.com>
2018-08-18 03:21:04 +08:00
"mockdate": "^2.0.2",
"moment-timezone-data-webpack-plugin": "^1.5.0",
"moxios": "^0.4",
"msw": "^2.0.12",
"nyc": "^13",
"prettier": "^2.2.1",
"qunitjs": "^1.23.0",
"react-moment-proptypes": "^1.4.0",
"react-test-renderer": "^16",
"redux-devtools-extension": "^2.13.2",
"redux-logger": "^3.0.6",
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-17 02:25:14 +08:00
"sass-direction": "^1",
"script-loader": "^0.7",
"sinon": "^7",
"stream-browserify": "^3",
"style-loader": "^0.23",
"stylelint": "^10",
"terser-webpack-plugin": "5.3.3",
"through2": "^3",
"timezone-mock": "^1.3.1",
"tinymce": "^5",
"ts-node": "^10.9.1",
"typescript": "^5.3.2",
"vitest": "^1.0.4",
"waait": "^1",
"webpack": "^5",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4",
"webpack-esmac-plugin": "^4.0.0",
"webpack-manifest-plugin": "^5",
catch and report on rogue imports fixes FOO-2422 this patch codifies the access rules between modules in the new UI file structure: packages/ can be accessed by everyone ui/shared/ can only be accessed by Canvas packages and features ui/features/ can only be accessed by boot ui/boot/ can only be accessed by entrypoint ui/index.js can only be accessed by Rails additionally, the specifiers used for importing may no longer be arbitrary; generally, every enapsulated folder must use relative specifiers for intra-imports, and bare specifiers for inter-imports ui/features/a/a.js => ui/features/a/b.js [via] ./b.js ui/features/a/a.js => ui/shared/a/a.js [via] @canvas/a/a ui/features/a/a.js => packages/a/a.js [via] a/a the rules are defined in the webpack config file, there are currently 37 violations that we have to address, for now I added a plugin to ignore them (see frontend_build/existingEncapsulationErrors.json) violations are reported with a detailed description of what exactly caused the violation, what is being violated, along with a suggestion on how to address it - see https://github.com/instructure/esmac for the tool that applies the rules - see https://github.com/instructure/webpack-encapsulation-plugin for the webpack implementation of that tool ~ test plan ~ ~~~^ ^~~~ \m/ edit frontend_build/existingEncapsulationErrors.json and remove entries from there, or alternatively just disable the IgnoreErrors plugin to get all the errors displayed, then rerun webpack against the offending source file to view the error report - for example: npx webpack --entry=$PWD/packages/backbone-identity-map/index.js # or, if u chose to disable the plugin npx webpack the messages should be clear and helpful; there are currently 4 scenarios for access violation, and 4 scenarios for specifier mismatche Change-Id: Ibae4245122e2c015ccbd47d73ac8689e0a386d86 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275200 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>
2021-10-02 07:28:20 +08:00
"wrap-ansi": "^7.0.0",
"wsrun": "^5",
"xsslint": "instructure/xsslint#babel7",
"yaml-loader": "^0.5"
},
"optionalDependencies": {
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-links": "^6.5.9",
"@storybook/addon-storyshots": "^6.5.9",
"@storybook/builder-webpack5": "^6.5.9",
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/react": "^6.5.9"
},
"browserslist": [
"extends @instructure/browserslist-config-canvas-lms"
],
"repository": "instructure/canvas-lms",
"scripts": {
"test": "yarn test:packages && if [ \"$COVERAGE\" = \"1\" ]; then yarn test:jest:coverage --runInBand; else yarn test:jest --runInBand; fi && if [ \"$COVERAGE\" = \"1\" ]; then yarn test:karma; else yarn test:karma:concurrently; fi",
"test:coverage": "script/generate_js_coverage",
"test:watch": "concurrently --names \"jest,karma\" \"jest --watch .\" \"yarn test:karma:watch\"",
"test:vitest": "vitest run --color",
"test:vitest:watch": "vitest watch --color",
"test:vitest:coverage": "vitest run --color --coverage",
"test:jest": "jest --color",
"test:jest:coverage": "NODE_OPTIONS=\"--openssl-legacy-provider --max_old_space_size=5120\" jest --color --coverage --testTimeout=30000",
fix audio player and video player sizing closes LA-729 flag=rce_enhancements The original intent for the audio player was to size it so the buttons just fit. This ignored the fact that it's rendered w/in an iframe, so popup menus are clipped. This change sizes the player to leave room for those popups. While the ticket was written against the audio player, the same issues may occur in the video player, either for portrait videos or videos < 400px wide when closed captions are present. The original code for sizing the video player shrank the width to fit thea video's size, which clipped the buttons. This change sets a minimum width for the player and letter-boxes the video. test plan: - in the new rce - add an audio file > expect it to be wide enough to show all the buttons and tall enough for the speed and volume popups - add a vertical video > expect the video sized to fit in the available space in the Computer tab of the Upload Media modal - Submit to upload > expect the player to be wide enough to show all the buttons - click the fullscreen button > expect the video to be the height of the screen and letterboxed - restore to windowed size > expect the video to return to its letterboxed size - click the video, then the Options button - change the video's size > expect the video to remain letterboxed - add a horizontal video > expect the video sized to fit in the available space in the Computer tab of the Upload Media modal - submit to upload > expect the player to be sized to the size of the video - fullscreen > expect the video to be letterboxed in the fullscreen player (if the aspect ration of the video !== that of your monitor, or fill the screen if they match) - for the horizontal video, select Opitons and change the size to be "medium" or "custom" and < 400px wide and add subtitles > expect the video to be letterboxed in a 400px wide iframe. Change-Id: Ib5d08dbd7796985d00f656e38a642ab92939d614 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238432 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Alex Anderson <raanderson@instructure.com> QA-Review: Robin Kuss <rkuss@instructure.com> Product-Review: Ed Schiebel <eschiebel@instructure.com>
2020-05-26 23:37:35 +08:00
"test:jest:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
"test:jest:watch": "jest --color --watch",
"test:jest:build": "if [ \"$COVERAGE\" = \"1\" ]; then yarn test:jest:coverage --maxWorkers=3 --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL; else yarn test:jest --maxWorkers=3 --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL; fi",
"test:karma": "yarn run test:karma:watch --single-run",
"test:karma:concurrently": "concurrently --names \"coffee,jsa,jsg,jsh\" \"JSPEC_GROUP=coffee yarn test:karma:headless\" \"JSPEC_GROUP=jsa yarn test:karma:headless\" \"JSPEC_GROUP=jsg yarn test:karma:headless\" \"JSPEC_GROUP=jsh yarn test:karma:headless\"",
"test:karma:headless": "yarn run test:karma --browsers ${KARMA_BROWSER:-ChromeHeadlessNoSandbox}",
"test:karma:watch": "node --max-old-space-size=4096 ./node_modules/.bin/karma start",
"test:karma:watch:headless": "yarn run test:karma:watch --browsers ${KARMA_BROWSER:-ChromeHeadlessNoSandbox}",
"test:packages": "if [ \"$COVERAGE\" = \"1\" ]; then yarn workspace-run-serial test:coverage; else yarn workspace-run-serial test; fi",
"test:packages:parallel": "if [ \"$COVERAGE\" = \"1\" ]; then yarn workspace-run test:coverage; else yarn workspace-run test; fi",
"build": "yarn run build:css && yarn run build:js",
"build:watch": "concurrently --raw \"yarn build:css:watch\" \"yarn build:js:watch\"",
"build:css": "brandable_css",
Harvard RCE tweaks - not directly related to the RCE, but now preload the 3 lato-exended font variants likely to be used on the page. this keeps font loading from blocking - the big change is to make it possible to limit the number of RCEs that will fully render on page load. This should address the loading issues for quizzes with many essay questions (the sample quiz from Harvard had 30 + other questions) For now, the necessary property is only being set on the take-quiz page closes: MAT-355 flag=rce_enhancements,flag=rce_limit_init_render_on_page test plan: account flag. - create a legacy quiz with > 5 essay questions. Feel free to have other questions in there too if you like - preview or take the quiz > expect all 6 RCEs to be created on the page - you could use React dev tools or document.querySelectorAll('.rce-wrapper').length === 6 - turn the "RCE Limit number of RCEs initially rendered on th page" account feature flag on - take the quiz again > expect only the first 5 RCEs to be fully rendered - scroll down to the bring the 6th into view > expect it to be fully realized - while scrolled to the bottom, refresh the page > not that the 6th RCE is in view, expect it to be fully realized also Change-Id: Idd76a56c4ea69e45a4f1cc28e3cd8561b40c2403 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/270075 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Weston Dransfield <wdransfield@instructure.com> Reviewed-by: Jon Scheiding <jon.scheiding@instructure.com> Product-Review: Ed Schiebel <eschiebel@instructure.com>
2021-07-27 23:13:08 +08:00
"build:css:compressed": "SASS_STYLE=compressed brandable_css",
"build:css:watch": "brandable_css --watch",
"build:js": "yarn run webpack-development",
"build:js:watch": "yarn run webpack",
"build:packages": "yarn workspace-run build:canvas",
Initial pace plans import This change brings in the basic pace plans frontend with styled-components and several other smaller libraries replaced with InstUI 7 components. It also adds the 'reselect' library as a direct dependency (which we already had through @instructure/outcomes-ui) and 'tsc-files' for type-checking of staged TS files on commit. There were also some tweaks to typescript and eslint configs, mostly to get both up to speed with the typescript code. Finally, this also adds a `pace_plans` endpoint to `courses_controller` to bootstrap the frontend-- this will get moved to `pace_plans_controller` once it has been merged. It's also worth noting that no frontend tests are included with this change-- the existing tests were written with enzyme and are heavily snapshot-based, so we will be replacing those with @testing-library/react tests in later updates (in keeping with current testing best practices at Instructure). closes LS-2431, LS-2432, LS-2433, LS-2434, LS-2452 flag = pace_plans Test plan: - Set up a course with at least one module and several module items - Turn on the pace_plans feature flag in the account associated with that course - Turn on the "Enable pace plans" setting in course settings - Create a pace plan for the course via the Rails console: c = Course.find<id> pp = c.pace_plans.create! workflow_state: 'active' c.context_module_tags.each_with_index do |t, i| pp.pace_plan_module_items.create! module_item: t, duration: i*2 end - Go to the course as a teacher or admin - Expect to see a "Pace Plans" link in the course navigation - Click it, expect the pace plan you created earlier to load and render - Expect to be able to pick dates, change durations, and toggle checkboxes (although saves will fail, since there is no API yet). - Expect to not see the "Pace Plans" course nav link when the feature flag or course setting is off - Expect /courses/<id>/pace_plans to return a 404 when the feature flag or course setting is off - Expect to not see the "Pace Plans" course nav link as a student - Expect /courses/<id>/pace_plans to display an "Unauthorized" page as a student Change-Id: If4dc5d17f2c6a2109d4b4cb652c9e9ef00d7cc33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271650 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: Jeff Largent <jeff.largent@instructure.com>
2021-08-18 05:14:24 +08:00
"check:js": "tsc --checkJs -p tsconfig.json",
"check:ts": "tsc -p tsconfig.json",
"check:ts:watch": "tsc --watch -p tsconfig.json",
"lint:packages": "eslint packages --cache --ext '.js,.jsx,.ts,.tsx'",
"lint:staged": "lint-staged",
"lint:style": "stylelint './app/**/*.{css,scss}' './packages/**/*.{css,scss}'",
"lint:xss": "node ./script/xsslint.js",
"lint": "eslint ui --cache --ext '.js,.jsx,.ts,.tsx'",
"postinstall": "yarn dedupe-yarn; test -n \"$DISABLE_POSTINSTALL\" || (yarn build:packages && ./script/install_hooks)",
"webpack:analyze": "NODE_ENV=production NODE_OPTIONS=\"--openssl-legacy-provider --max_old_space_size=8096\" SKIP_SOURCEMAPS=1 WEBPACK_ANALYSIS=1 WEBPACK_PEDANTIC=0 webpack",
"webpack": "gulp rev 1> /dev/null & NODE_OPTIONS=\"--openssl-legacy-provider --max_old_space_size=5120\" webpack --progress --color --watch",
"webpack-development": "NODE_OPTIONS=\"--openssl-legacy-provider --max_old_space_size=5120\" webpack --color",
"webpack-production": "NODE_ENV=production NODE_OPTIONS=\"--openssl-legacy-provider --max_old_space_size=5120\" webpack --color",
"workspace-run": "r() { wsrun --fast-exit --exclude-missing --report -c $@; exit $?; } && r",
"workspace-run-serial": "r() { wsrun --fast-exit --exclude-missing --collect-logs --report --serial -c $@; exit $?; } && r",
"jspec": "./spec/jspec.sh",
"jspec-watch": "./spec/jspec.sh --watch",
"a11y-report": "./spec/jspec.sh --a11y",
"upgrade-and-dedupe": "rm -rf yarn.lock node_modules && yes 1 | yarn install --flat --production --ignore-scripts && git checkout package.json && yarn install && git add yarn.lock",
"upgrade-instructure-ui": "script/upgrade-instructure-ui",
"dedupe-yarn": "yarn yarn-deduplicate",
"clean": "yarn workspace-run-serial clean",
"storybook": "start-storybook -p 6006 --no-dll --static-dir ./public/javascripts,./public",
"test-storybook": "yarn jest --roots .storybook --testMatch **/storybook.test.js"
},
"resolutions": {
"jquery": "https://github.com/instructure/jquery.git#1.7.2-with-AMD-and-CommonJS",
"graphael": "https://github.com/instructure/graphael.git",
"@apollo/react-testing": "3.0.1",
"@apollo/react-common": "3.0.1",
"@apollo/react-components": "3.0.1",
"@apollo/react-hoc": "3.0.1",
"@apollo/react-hooks": "3.0.1",
"@apollo/react-ssr": "3.0.1",
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
AMD Conversion "Trivial" JavaScript / CoffeeScript changes -------------------------------------------------- For the most part, all javascript was simply wrapped in `require` or `define`. The dependencies were found with a script that matched regexes in the files, it errs on the side of listing too many dependencies, so its worth double checking each file's dependencies (over time, anyway). i18n API changes -------------------------------------------------- No longer have to do I18n.scoped calls, just list i18n as a dependency with the scope and it's imported already scoped require ['i18n!some_scope'], (I18n) -> I18n.t 'im_scoped', 'I'm scoped!' JS bundling now done with r.js, not Jammit -------------------------------------------------- We don't use jammit to bundle JS anymore. Simply list dependencies for your JS modules in the file and RequireJS handles the rest. To optimize the JavaScript, first make sure you have node.js 0.4.12+ installed and then run: $ rake js:build The app defaults to the optimized build in production. You can use non-optimized in production by putting ?debug_assets=true in the url just like before. You can also test the optimized JavaScript in development with ?optimized_js=true. Significant changes -------------------------------------------------- These files have "real" changes to them (unlike the JavaScript that is simply wrapped in require and define). Worth taking a really close look at: - app/helpers/application_helper.rb - app/views/layouts/application.html.erb - config/assets.yml - config/build.js - lib/handlebars/handlebars.rb - lib/i18n_extraction/js_extractor.rb - lib/tasks/canvas.rake - lib/tasks/i18n.rake - lib/tasks/js.rake Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7 Reviewed-on: https://gerrit.instructure.com/6986 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-11 00:31:45 +08:00
}
}