profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/simonista/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Simon Williams simonista Instructure Austin, TX

jenseng/i18nliner 21

I18n made simple

simonista/sexysaxman 1

playing with hubot

simonista/canvas-lms 0

The open LMS by Instructure, Inc.

simonista/dotfiles 0

@holman does dotfiles

simonista/gem-problem 0

a problem with local gem dependency chains

simonista/geryon-bot 0

A twitterbot I made that tweets the red world. Inspired by Anne Carson's amazing translation/poem Red Meat: Fragments of Stesichoros.

simonista/i18nliner 0

I18n made simple

simonista/ims-lti 0

A Ruby library to help implement IMS LTI tool consumers and providers

simonista/json_schemer 0

JSON Schema validator. Supports drafts 4, 6, and 7.

push eventinstructure/canvas-lms

Robin Kuss

commit sha f38a25119b5506891820a1e5aaa811b33bbd0436

spec: adding timeout to hopefully unflake Closes LS-2224 Test Plan: no flakiness in jenkins Change-Id: I4c5088e4a559a0b4a33c603c8295a2d04748846f Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264990 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Eric Saupe <eric.saupe@instructure.com> QA-Review: Eric Saupe <eric.saupe@instructure.com> Product-Review: Robin Kuss <rkuss@instructure.com>

view details

push time in 20 hours

push eventinstructure/canvas-lms

Gary Mei

commit sha 77e686b40f098075b14078bf6f1b850ffe85f672

allow student annotations on anonymous/moderated assignments The submission type 'student_annotation" was throwing a 403 error when a student would attempt an annotation because it was looking for versioned attachment that didn't exist. Just added some logic to handle this specific submission type. flag=annotated_document_submissions closes EVAL-1607 Test Plan: - create a course with a teacher and student enrolled - create a moderated student annotation assignment - create an anonymous student annotation assignment - as the student attempt to view, annotate, and submit the document in each assignment - ensure there are no errors thrown while annotating and submitting - as the teacher view the assignment in speedgrader and ensure you can annotate and grade the submission - ensure moderated grading works as expected - ensure student is unable to see annotations or comments until grade is posted in the anonymous assignment - ensure teacher is unable to see students identity through annotation comments in the anonymous assignment Edge Case: Anonymous Instructor Annotations (add this option to both assignments) - ensure grader annotations are anonymous Change-Id: I9d9bd9a5daa9d7cf165c4434b55ac515c519c789 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263379 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Adrian Packel <apackel@instructure.com> Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com> QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com> Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>

view details

push time in a day

created taginstructure/analytics

tagrelease/2021-05-12.25

The official analytics package for Instructure's Canvas LMS.

created time in a day

push eventinstructure/canvas-lms

Jackson Howe

commit sha a386d399ac385b22f11e8fe19dc94364174fc6e0

Add important info section to k5 resources Under the resources tab of k5 dashboard, add a section called `Important Info`. This shows the syllabus content from each homeroom course. Renames everything called `Syllabus` to `Important Info` in homeroom courses. Shows an edit button next to important info to users with edit permissions. Only shows the title of the homeroom course if there's more than one homeroom being displayed. Shows loading skeletons for all sections under resources tab. Adjusts styling of apps and staff info sections to make them look better. closes LS-1769 flag=canvas_for_elementary Test plan: - As a teacher, go to a homeroom course. Expect course nav to have an `important info` button. - Go to important info page (i.e. /assignments/syllabus). Expect page title, breadcrumbs, sidebar, and page content to all read `important info`, not syllabus. - Expect help text to read `You can add important information here that you want to display under the Resources tab in your homeroom` when syllabus is blank. - Add some syllabus content. - Go to dashboard resources tab. - Expect to see some loading skeletons for each section. - Expect to see syllabus rce content on load. - Expect to see edit button that takes you to the syllabus iff you are a teacher/admin. - Expect not to see the homeroom title. - Enroll in another homeroom and add some syllabus content. - Expect to see both important infos on the resources tab with a homeroom name above each (since there's more than one). - Delete the syllabus content from both homerooms. Expect the important info section to be entirely gone. Change-Id: Iaaed03976108fc0d9878e0ab6da4d8f88876c12f Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264712 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jeff Largent <jeff.largent@instructure.com> QA-Review: Jeff Largent <jeff.largent@instructure.com> Product-Review: Peyton Craighill <pcraighill@instructure.com>

view details

push time in a day

push eventinstructure/canvas-lms

Xander Moffatt

commit sha 37b24d28054b2ea254604e58d94c78f3574ea466

AGS: only submit once when files are included closes INTEROP-6729 flag=none test plan: * follow instructions from g/264251 to set up AGS requests * make these changes to the JSON body from that commit's test plan: * remove submission_type, new_submission, submission_data * add this to the extension object: ``` "content_items": [ { "type":"file", "title":"test submission", "url":"https://www.w3.org/TR/PNG/iso_8859-1.txt" } ] ``` * send the request multiple times, checking the submission's attempt each time * it should only ever go up by 1 Change-Id: I3377c98025b577e901be5ea6db174d0b8d0b3336 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264545 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Mysti Lilla <mysti@instructure.com> QA-Review: Evan Battaglia <ebattaglia@instructure.com> Product-Review: Xander Moffatt <xmoffatt@instructure.com>

view details

push time in a day

push eventinstructure/canvas-lms

Martin Yosifov

commit sha 21406641e6593111de36f7a36efae04a3c91c43e

Enable move outcome option closes OUT-4006 flag=improved_outcomes_management Test plan: - Make sure you have Account/Course with groups and outcomes - Go to Account > Settings > Feature Options - Enable Improved Outcomes Management FF - Go to Account > Outcomes - Select outcome group via TreeBrowser then click on Kebab menu next to individual outcome and select Move option - Modal should display with title “Move {Outcome title}” and message “Where would you like to move this outcome?” - Click the Cancel button -> modal should close and focus should return to the outcome kebab menu. - Open the Move Outcome modal again. The Move button should be disabled. Select group to move the Outcome to. The move button should become enabled. - Click the Move button. Modal should close and message should display '"{Outcome title}" has been moved to "{Group Name}".' - Reload the page and confirm that the outcome was successfully moved to the new group - Go to Course > Outcomes and repeat the above tests. Change-Id: I936b707a52192c474df8e814c29d5cbeb3a43de4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264401 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Pat Renner <prenner@instructure.com> Reviewed-by: Pablo Gomez <pablo.gomez@instructure.com> QA-Review: Manoel Quirino <manoel.quirino@instructure.com> Product-Review: Jody Sailor

view details

Jonathan Guardado

commit sha 05ea9930de9f87e3b455632e732e5f6e3739c0b0

Teacher edits course v2 The ManageCourseTray component used for the V1 edit mode was removed; instead a href is now being used to redirect the user to the course settings path, also the application layout has been modified to remove from the UI the breadcrumb and home tab of the nav menu when user is in k5 mode. fixes LS-2179 flag=canvas_for_elementary Test Plan: - With K5 mode enable, go to a course as a teacher of that course - Click on the “Manage Subject” button at the top left corner: - Expect to be redirected to the course setting page - On the course settings page: - Expect the Home tab not to be on the nav menu. - Expect the breadcrumb not to be on the screen; instead a button "Back to Subject" should be in its place. - Click on the "Back to Subject" button -Expect to be redirected to the home course page Change-Id: Ic949c3395dc7e6cf43dd43fe2583c1e23f5c3e72 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264764 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jeff Largent <jeff.largent@instructure.com> QA-Review: Jeff Largent <jeff.largent@instructure.com> Product-Review: Peyton Craighill <pcraighill@instructure.com>

view details

Eric Saupe

commit sha 46b4a0ce2e9e856675d910336e6a0899a4a23ad0

Allow courses to sync enrollments with a homeroom course Having a course sync enrollments from the homeroom it is associated with while in K5 mode will make it easier to manage many courses that are part of the same homeroom group. This adds a nightly sync as well as a manual trigger from within the subject courses to sync enrollments from the attached homeroom course. flag = canvas_for_elementary closes LS-2181 test plan: - Turn K5 mode on for an account - Create a course and set the course to be a homeroom course in the course settings - Enroll a teacher and a student in the homeroom course - Create another course - In the course settings, select Sync enrollments from homeroom - Select the first course in the dropdown - Save the settings - Verify the enrollments have been copied from the homeroom course Change-Id: I30416d72d2d2b0f5be5826cc1fa86baab5d217c5 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264491 Reviewed-by: Nate Armstrong <narmstrong@instructure.com> QA-Review: Nate Armstrong <narmstrong@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Product-Review: Peyton Craighill <pcraighill@instructure.com>

view details

Cody Cutrer

commit sha 4714915683c61a37bb2941430fb57ca055551551

allow requiring MFA per-auth-provider closes FOO-1520 test plan: * go to auth providers page; notice that there are no MFA settings * set MFA to optional on the account * there should now be a checkbox on the auth providers page for each provider to make it required * make it required for canvas auth * ensure your login is explicitly associated with canvas auth * log in to canvas again via canvas auth * it should make you set up MFA Change-Id: Ied6068ad282bde831964259bdd39721bf81c87fe Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264543 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>

view details

Jacob Burroughs

commit sha 5d8b20e9e7a8b65a032038efe429778453ef18de

Invalidate enabled tabs for release notes Change-Id: I031e01cd3eae97b652677144802f39a2c36bc698 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264932 Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>

view details

Drake Harper

commit sha 752221196f63faaf3a7b08d57d31e175727708ea

fix child having key prop in PronounInput Test Plan: -verify error is not showing in console in account settings page closes VICE-1482 flag=none Change-Id: If47e8c9a2c01e0b5b74b8d6a24edefc0a9a52328 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264931 Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com> QA-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com> Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>

view details

Jeff Largent

commit sha 0ff0eab7dd59b4353e800e7ed853f974a4df682a

Don't focus today button when weekly planner becomes visible fixes LS-2222 flag = canvas_for_elementary Test plan: - Log in as a student with the K-5 dashboard enabled - Tab to the tabs on the Dashboard, use the arrow keys to switch to the Schedule tab - Expect focus to remain on the tabs and not be moved to the "Today" button - Do the same with the tabs on a K-5 subject course Change-Id: I8fc3e84551895b6b7832a8d82f5d6a6cae111aea Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264898 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>

view details

Pablo Marti-Gomez

commit sha 2ac3633a09c0ce5c894fdc93c492e49c1b6debe1

Add search functionality to Find Outcomes Modal closes OUT-4155 flag=improved_outcomes_management Test Plan: > With Improved Outcomes Management flag ON > Account level - Access to Outcomes - Click on Find - Select an Outcome Group - Run multiple searches: - When searching the button `Add All Outcomes` should get disabled - It should only search strings with a length >= 3 chars - When running a search and loading more results the new results should be under the scope of the search - When changing the search string the results should be consistent to the new search - When clearing the search the original results should be displayed without any pagination > Repeat the process at Course Level Limitations: - When clearing the search the text input should be cleared immediately but there might be a delay when reloading the outcomes. - When the search returns outcomes that contain long descriptions the rendering might take a while and a lag might be introduced. Both limitations will be fixed on: OUT-4448. Change-Id: I0a96a92fb633c0401351e9cfb7dc372dc9e5df4a Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263008 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Martin Yosifov <martin.yosifov@instructure.com> Reviewed-by: Pat Renner <prenner@instructure.com> QA-Review: Martin Yosifov <martin.yosifov@instructure.com> Product-Review: Jody Sailor

view details

Ed Schiebel

commit sha 98e03aa2b31878a64d196b9c8bc293fe4e5de62b

Move a11y checker dependency into canvas-rce closes MAT-129 flag=none The tinymce-a11y-checker was a dependency of canvas-lms and given to the RCE thru some fancy initialization shenanigans. This change puts it in the new RCE, but leaves it in canvas for the old rce. We can remove it with MAT-54 when the old rce is removed. test plan: - open a page with the rce - click the a11y checker button in the status bar. > expect the a11y checker to open. Make sure it still works in the old RCE - edit config/feature_flags/00_standard.yml and set rce_enhancements.environments.development.state: allowed - restart your canvas server - from /accounts/site_admin/settings page, feature options tab turn RCE Enhancements off - load a page with the rce > expect the a11y checker to work Change-Id: I9d9202ee1c9a254e14bcc14298330f8a9ab8a7d4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264851 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Jeff Largent <jeff.largent@instructure.com> Reviewed-by: Jeff Largent <jeff.largent@instructure.com> Product-Review: Ed Schiebel <eschiebel@instructure.com>

view details

Guilherme Baron

commit sha 0bb71d9123266753eea9e9017b224a34490d0712

Upgrade tinymce-a11y-checker to v3.0.0 closes MAT-123 Test plan: - make sure rce a11y validation works properly Change-Id: I494dcb821c9f14145913e329f9c975b2425ae774 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264840 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Juan Chavez <juan.chavez@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> Product-Review: Guilherme Baron <gbaron@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com>

view details

Caleb Guanzon

commit sha ea8bbf13065731bd32a82771f146ae6f0827ca30

rename new disc. to redesign discussions flag=react_discussions_post fixes VICE-1475 test plan: - verify change satisfies ticket Change-Id: I56afdc47b428bb492f27eb7c9cc97ef89fc42e39 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264936 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com> QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com> Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>

view details

Nate Armstrong

commit sha 97ab02e8d74dc987e0776f9f1d7f549b666e9e82

Don't add extra space when inserting images fixes MAT-107 flag=none test plan: - Insert images using the RCE - Verify that a space after the image is not added - Make sure selecting image options and selecting around the image still behaves fine Change-Id: I7c8943e91541c764ce9452fc03db59d35aa0504f Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264812 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Gary Mei <gmei@instructure.com> QA-Review: Gary Mei <gmei@instructure.com> Product-Review: Nate Armstrong <narmstrong@instructure.com>

view details

Jacob Burroughs

commit sha a6ea5fa1b284369beea52d704782d260cf4a7f35

Release notes unread tracking Fixes FOO-1757 Fixes FOO-1758 Change-Id: I4c16ee82372751daee146172f70f91336a5fa310 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264578 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Charley Kline <ckline@instructure.com> Product-Review: Charley Kline <ckline@instructure.com> QA-Review: Charley Kline <ckline@instructure.com>

view details

Eduardo Escobar

commit sha d388358e26d1db73a8a57c12dde35aeab53e7403

add explanation for assignments in unpublished modules an icon with a text are displayed when the course belongs to an unpublished module to improve the user experience. fixes EVAL-1550 flag=none test plan: - create a course with at least one student enrolled. - enable the feature flag "Assignment Enhancements - Student" for the course created. - create an assignment and add it to an unpublished module. - act as a student and open the assignment through assignments. - an icon with a text is displayed to inform the user why the assignment is locked. Change-Id: I69f4cc3fb9a2b3573f1104804f096352e3794d59 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264370 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Adrian Packel <apackel@instructure.com> Reviewed-by: Edwin Ramirez <edwin.ramirez@instructure.com> QA-Review: Edwin Ramirez <edwin.ramirez@instructure.com> Product-Review: Jody Sailor

view details

Mauricio Ribeiro

commit sha 9019eda2c2d4604a4cefabee5fd6a87b117129ed

improve discussion entry reply permission add new checking for allowing repling a discussion entry baseed on reply permission closes VICE-1371 flag=react_discussions_post test plan: - Navigate to a discussion - Create a reply; - Reply the reply you've just created - Reply button should not render for your nested reply qa risk: low Change-Id: Iaaac3ad4c28312316a4ffa187e70f3020933baa4 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264944 Tested-by: Mauricio Ribeiro <mauricio.ribeiro@instructure.com> Reviewed-by: Matthew Lemon <mlemon@instructure.com> QA-Review: Matthew Lemon <mlemon@instructure.com> Product-Review: Matthew Lemon <mlemon@instructure.com>

view details

Omar Gerardo Soto-Fortuño

commit sha f2b18778a0d7336687df6bf643ac33d33043ef89

Fix issue showing Add Group Set without the permission Test Plan: - Option 1: Spec pass - Option 2: 1. Create a teacher based role that has the granular permissions "Groups - add/edit/delete" disabled. 2. Create a course and add a user to the course under the custom teacher role 3. Navigate to the people/groups page 4. Act as custom teacher 5. + Group Set button shouldn't appear flag=none Fixes VICE-1386 Change-Id: I9ffa76efc8a34d94c17260c6a6373f190e57fdaa Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264948 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Caleb Guanzon <cguanzon@instructure.com>

view details

Ed Schiebel

commit sha 36d6d3b68c5ab95259f3b516ce7b230afd4fa078

Update rce dependencies closes MAT-142 flag=none - the a11y checker has been updated - @instructure/ui-forms is a stale dependency - the update to installTranslations.js is to put a change back that got overwritten somewhere along the line. test plan: - it builds and passes jenkins Change-Id: I8827be86adccd58ec9ca53638b7eb7befd3468e1 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264915 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jeff Largent <jeff.largent@instructure.com> QA-Review: Jeff Largent <jeff.largent@instructure.com> Product-Review: Ed Schiebel <eschiebel@instructure.com>

view details

Nate Armstrong

commit sha 1ec8b211227a173629f5283e8153d6344e1a5e12

Remove redundant, flakey specs According to the flakey builds, current_progress.results was occassionally nil (though I rant them 300 times locally and never saw an error). I don't think it's worth testing insecure hosts at this level since the logic is contained in canvas_http.rb and adequately tested in canvas_http_spec.rb. closes MAT-61 flag=none test plan: jenkins build passes Change-Id: Ic9178e9315da6e0f6bd3f258b45607b03fceaa33 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264954 Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Nate Armstrong <narmstrong@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>

view details

Nate Armstrong

commit sha e10b8ff806e1992c449433fba9ace5c18d65e8f6

Fix Amara link Uses non-www version of the URL. fixes MAT-53 flag=none Test plan: - Visit https://www.amara.org/en/videos/create/ in a browser > note the 404 error - Visit https://amara.org/en/videos/create/ in a browser > note that it loads Change-Id: Ie9571eb83d3dd608d7163e7f7b84becfb842f74f Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264950 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: Nate Armstrong <narmstrong@instructure.com>

view details

Matthew Lemon

commit sha 53b1d83517e4b04df374c93e4803be8a008d5cd6

batch updates to discussion entry read states fixes VICE-1443 flag=react_discussions_post Test Plan: - Create a discussion and add a couple replies to it - Mark the replies as read - After about 3 seconds the replies should be marked as read Change-Id: I5c81078ff6c4f674260d662f5a3e42d34062dedb Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264939 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Tested-by: Mauricio Ribeiro <mauricio.ribeiro@instructure.com> Reviewed-by: Mauricio Ribeiro <mauricio.ribeiro@instructure.com> QA-Review: Mauricio Ribeiro <mauricio.ribeiro@instructure.com> Product-Review: Mauricio Ribeiro <mauricio.ribeiro@instructure.com>

view details

push time in a day

push eventinstructure/canvas-lms

Kai Bjorkman

commit sha 7db88f57f57349354a2f5d102e722e502e2f638c

set graded_at when late_policy_status changes closes EVAL-1317 flag=none Test Plan: - have a course with a few students enrolled with an assignment - manually change one student's status to 'missing' - manually change one student's status to 'late' - manually change one student's status to 'excused' - grade one student with a score - check in the ruby console that each corresponding submission got the the graded_at field set to the correct time Change-Id: I2ec1d2362c39ed861e3aed98b982a3e9ce36a899 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263709 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Adrian Packel <apackel@instructure.com> Reviewed-by: Syed Hussain <shussain@instructure.com> QA-Review: Kai Bjorkman <kbjorkman@instructure.com> Product-Review: Syed Hussain <shussain@instructure.com>

view details

Cody Cutrer

commit sha c198d6fa265a2cc7b80aaa6aac5287c93164080e

tell an API user where a user merged when masquerading failed Change-Id: If74671c53597930924a4cf6d82ddb40bf3311097 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263689 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jacob Burroughs <jburroughs@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>

view details

Jacob Burroughs

commit sha bca8bd46296c5353511d440cd5180a3b30df96df

Migrate to diplomat Change-Id: I82363dedbd2397830a9beadf33b1cc59123136c8 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263429 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Jacob Burroughs <jburroughs@instructure.com> Product-Review: Jacob Burroughs <jburroughs@instructure.com>

view details

Matthew Lemon

commit sha eb16a093d5b896406636fdc13e1ff1533c2b004d

update ComposeModalContainer test to use MSW fixes VICE-1379 flag=react_inbox Test Plan: - Specs Pass Change-Id: I72ee20c31f57663cae911bbb571e3561cb38968e Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263864 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Caleb Guanzon <cguanzon@instructure.com>

view details

Matthew Lemon

commit sha 0eb23a7f75899b9268f6ea6e95fd825ac0691648

remove old mocks stuff from inbox fixes VICE-1379 flag=react_inbox Test Plan: - Specs Pass Change-Id: I8aeb3255c9aca3267373bf8a3bc777d2aa36d696 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263869 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Caleb Guanzon <cguanzon@instructure.com>

view details

Matthew Lemon

commit sha c6e1c57c629e4ab975306470934692479afa5ddb

create NoSelectedConversation inbox component fixes VICE-1127 flag=react_inbox Test Plan: - run yarn storybook - open "No Selected Conversation" - You should see a letter icon and the message "No Conversations Selected" Change-Id: Ibe6e20146c5f6a2f761990221879d58a93e88321 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263880 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Caleb Guanzon <cguanzon@instructure.com>

view details

Xander Moffatt

commit sha dae478b2898902d933f10cd3aa4df6343892ddc8

rescue from feature flag undefined in specs * this prevents the need for checking for flag existence before calling feature_enabled?, or the need to add real flags to the stubbed flags in feature-flag-specific tests refs INTEROP-6573 flag=none [pin-commit-multiple_root_accounts=748b8bbe3d06c71f74e46e72bffd3fb17d388ea7] test plan: * specs Change-Id: Ic6a7d32c1aea10671e6929f87202513e00fe8715 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263798 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>

view details

Matthew Lemon

commit sha 88d4096605801b68ea7512a9a881b11fd59431f1

clean up DiscussionTopicContainer test warnings fixes VICE-1403 flag=react_discussions_post Test Plan: - Specs Pass Change-Id: Ib7702a56eaac973686cc8a66800993236d4fefc0 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263919 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Caleb Guanzon <cguanzon@instructure.com>

view details

Adrian Packel

commit sha 6a3e9c1730cb3193770c43bca2caa9bd064cefe8

Update text entry submission UI Update the workflow for text entry submissions in the enhanced student view: now we always show the RCE and set it to read-only mode as appropriate, instead of having separate editing and non-editing interfaces that and buttons to switch between them, and auto-save drafts as the user types instead of requiring the user to click a button to save the draft. closes EVAL-1468 flag=assignments_2_student Test plan: - Test the new student view with an assignment that accepts text entry submissions - Check that the RCE is always shown, even if the current attempt has no content or cannot be edited - If the user cannot edit the attempt (because, say, it's a previously-submitted attempt or the user's enrollment has concluded), the text view should be read-only - Changes should auto-save as you type them (technically after you've stopped typing for a bit) - The text "Saving Draft" will appear in the footer as you type, but don't be deceived by this false glamour; as noted above, we aren't necessarily saving the draft during this time - When the save successfully completes, the text "Draft Saved" should appear in the footer, and should remain shown until you make more changes, submit, or switch to a different attempt - Check that you can submit the assignment as before - Check that the contents of auto-saved drafts persist when you reload the page Change-Id: Ia83e2a79d3b2fee58d14c36a13506264e086ce8d Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263165 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Gary Mei <gmei@instructure.com> Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com> QA-Review: Syed Hussain <shussain@instructure.com> Product-Review: Syed Hussain <shussain@instructure.com>

view details

Kyle Rosenbaum

commit sha 72cba075d7252a635a772bde0569763accb73bf6

fix fatal: Not a valid object name master in linters test plan: -run linters on master branch Change-Id: I1ba84324ea54e5480dc9416fa5fa2bb944030aab Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263923 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Aaron Ogata <aogata@instructure.com> QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com> Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>

view details

Matthew Lemon

commit sha c67c828328e0f254eb9d45cd98a386679c6db895

clean up DiscussionsFullPage test warnings fixes VICE-1405 flag=react_discussions_post Test Plan: - Specs Pass - Run this test file, there should be no warnings Change-Id: Id89b21e4a190b5a6d954de8df6f5ff87d500e548 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263926 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Caleb Guanzon <cguanzon@instructure.com> QA-Review: Caleb Guanzon <cguanzon@instructure.com> Product-Review: Caleb Guanzon <cguanzon@instructure.com>

view details

Cody Cutrer

commit sha cba25100761ce6860a1440ee5785e4d5091eb27c

exclude deleted users from being found in general but still let site admins see them Change-Id: I643e365c26061e3f7c9e4835d5b6300d9cc424a8 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263659 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>

view details

Cody Cutrer

commit sha d139c912513b9a5048e50b4f755377cb323a0820

include merge info when showing a deleted user Change-Id: I53ef08e5c0c6b5d075140933a1c03e264ceecead Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263774 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>

view details

Jacob Burroughs

commit sha 5f02893cb5dbccdb7723a0f545ba371572dc5784

Fix diplomat recursion Since we cache by full key anyway, there is no good reason to convert it into a recursive hash only to convert it right back Change-Id: Ifb356e38a2ac5e6e0477ebc5913e0d9128622489 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263932 Reviewed-by: Ethan Vizitei <evizitei@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Jacob Burroughs <jburroughs@instructure.com> Product-Review: Jacob Burroughs <jburroughs@instructure.com>

view details

Matthew Lemon

commit sha 41f02da5ca5e273bf94f70ebcf4875ab77e68709

clean up DiscussionThreadContainer test warnings fixes VICE-1408 flag=react_discussions_post Test Plan: - Specs Pass - Run this test and note that there shouldn't be any warnings Change-Id: I3d22e5047a6c54ebc08a98fafce1816d24554828 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263933 Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com> QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com> Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>

view details

Cody Cutrer

commit sha 883ef0295042e944f6962c2810afc5e596fc0eb5

use SchemaCache for schema caching instead of lower level on the adapter itself, because it causes surprises when normally uncached methods are suddenly cached also extend schema caching to jobs nodes note that we can directly cache SchemaCache objects because it explicitly implements marshal_dump, which is how Rails intends it to be used (just with a file, instead of a cache store). Change-Id: Id61d14ccc1fa9b44435c25f68063bbc5b6ddbaed Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263004 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jacob Burroughs <jburroughs@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>

view details

Adrian Packel

commit sha ac4451bd136d89d8ef114170ece6d8a92211219f

Remove specious aria-labelledby attribute fixes EVAL-1630 flag=none Test plan: - Check that SpeedGrader still works - Check that there isn't actually an element identified by "speedgrader_attach_things_label" in the codebase Change-Id: Ib8221da39234a1a49b29a487cdd4efdaaec332ce Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263946 Reviewed-by: Syed Hussain <shussain@instructure.com> QA-Review: Adrian Packel <apackel@instructure.com> Product-Review: Syed Hussain <shussain@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>

view details

Matthew Lemon

commit sha 645ca10cb15354c1cb2a209bc7f1e89194e64412

refactor DiscussionThreadContainer component refs VICE-1228 flag=react_discussions_post Test Plan: - Specs Pass Change-Id: If503487ae9866738a1594f2a24f03d4393ac5c38 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263945 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com> QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com> Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>

view details

Jonathan Guardado

commit sha 539525c5b1a67dc404ee27c214cb4b382fe5d1a6

Typing a course date then hitting enter doesn't save the date When hitting enter, blur and submit events are triggered separately, making the form submission be done before updating the hidden inputs and that avoids these course dates fields being updated, to fix this the keyDown event was modified in the DateInput component to execute the callback function when hitting Enter fixes LS-2157 flag=none Test Plan: 1.Enable ‘New Course Availability UI’ flag at the account level 2.Open a course and go to settings 3.In the course settings, make sure the Participation is set to course. 4.In either of the date fields type a date. 5.Hit enter without clicking outside of the date box. 6.Expect the typed date get saved Change-Id: I3c2591e9129ac2e2b6eb611ed472076805ad167a Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263782 Reviewed-by: Jeff Largent <jeff.largent@instructure.com> QA-Review: Jeff Largent <jeff.largent@instructure.com> Product-Review: Jonathan Guardado <jonathan.guardado@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>

view details

Xander Moffatt

commit sha 0c73bbd428133532485db6327599506970a0e9c4

turn down basic outcomes file uploads from 10 to 1 * it's causing problems when google/office presigned S3 urls expire, and then expire for all 10 attempts, and gum up the job queue, since all 10 attempts need to run before passing to the next job refs INTEROP-6749 flag=none test plan: * specs Change-Id: Ic4f03d8da4f3918cd77e7184065682e07d570d83 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263950 Reviewed-by: Evan Battaglia <ebattaglia@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Xander Moffatt <xmoffatt@instructure.com> Product-Review: Xander Moffatt <xmoffatt@instructure.com>

view details

push time in a day

created taginstructure/analytics

tagrelease/2021-05-26.03

The official analytics package for Instructure's Canvas LMS.

created time in a day

Pull request review commentinstructure/instructure-ui

fix(emotion): add componentId to match with componenet name in docs (INSTUI-2997)

 const withStyle = decorator(       }       const themeOverride = getComponentThemeOverride(         theme,-        displayName,+        [displayName, ComposedComponent.componentId],

I think it should be setting the displayName to ComposedComponent.componentId || ComposedComponent.displayName, just in case it is missing from somewhere, but primarily using the componentId, yes.

Also, the static is missing at: Calendar.Day, InPlaceEdit, InlineListItem, InlineSVG, SVGIcon (all components with @makeStyle should have it, maybe even the others too, in case we want to use the componentId for something else too.)

HerrTopi

comment created time in a day

push eventinstructure/instructure-ui

HerrTopi

commit sha 436859a288f744cc2e0485eead0a9cad883446b9

chore: change netlify v7 url

view details

push time in a day

pull request commentinstructure/instructure-ui

fix(emotion): add componentId to match with componenet name in docs (INSTUI-2997)

We should add this to the template-app and template-component too.

HerrTopi

comment created time in a day

PR opened instructure/instructure-ui

Reviewers
INSTUI-3104 : fix Babel warning during build, update to newer syntax

see https://babeljs.io/docs/en/babel-plugin-proposal-class-properties#loose and https://babeljs.io/docs/en/assumptions#setpublicclassfields

+6 -5

0 comment

1 changed file

pr created time in a day

create barnchinstructure/instructure-ui

branch : fix_babel_warning

created branch time in a day

push eventinstructure/instructure-ui

Viktor Ohád

commit sha 9117be759feba416bd7c0bc0c211f0c7341fa6ad

chore: add _redirects file for netlify

view details

push time in 2 days

push eventinstructure/instructure-ui

Eszter Szabo

commit sha 24c71e7573ef25c97ef57745a84de1ba0d2a94ea

feat(ui-number-input): add inputMode prop to NumberInput Closes: INSTUI-3016 This will be put on the underlying input field to hint at intended usage

view details

push time in 2 days

delete branch instructure/instructure-ui

delete branch : INSTUI-3016-add-inputMode-props-to-NumberInput

delete time in 2 days

PR merged instructure/instructure-ui

feat(ui-number-input): add inputMode prop to NumberInput NumberInput V7

Closes: INSTUI-3016

This will be put on the underlying input field to hint at intended usage

+24 -2

0 comment

3 changed files

ke1k0

pr closed time in 2 days

push eventinstructure/instructure-ui

Eszter Szabo

commit sha f1db81933c1e76cab0cb31e9cef64caffd6c60fe

chore(canvas-high-contrast-theme,canvas-theme,instructure-theme,ui-theme-tokens): migrate to TS

view details

Eszter Szabo

commit sha cb1965bc5313625f0a64986012884394c6eaf82b

chore(ui-theme-tokens): resolve ts ignore comments from `ui-theme-tokens` package

view details

push time in 2 days

delete branch instructure/instructure-ui

delete branch : migrate-theme-packages-to-TS

delete time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

 import {   matchElementByLabel,   matchElementByText } from './matchers'+import { GenericFunction } from './bindElementToMethods'++export interface SelectorOptions {+  expectEmpty?: boolean+  exact?: boolean+  trim?: boolean+  collapseWhitespace?: boolean+  ignore?: string+  timeout?: number+  visible?: boolean+  customMethods?: Record<string, GenericFunction>+}  Sizzle.selectors.cacheLength = 1 -function querySelectorAll(...args) {+function querySelectorAll(...args: QueryArguments) {   const { element, selector, options } = parseQueryArguments(...args)--  let results = []-   if (selector) {-    results = findAllMatches(element, selector, options)-  } else {-    throwQueryError(element, selector)+    return findAllMatches(element, selector, options)   }--  return results+  throw buildQueryError(element, selector) } -function querySelector(...args) {+function querySelector(...args: QueryArguments) {   return firstOrNull(querySelectorAll(...args)) } -function querySelectorParents(element, selector, options) {-  let results = []+function querySelectorParents( // TODO type these to QueryFunction

I could not figure out how to make a function written this way to implement a type.

matyasf

comment created time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE  * SOFTWARE.  */-export function firstOrNull(result) {++export function firstOrNull<T>(result: T | T[] | null): T | null {   return Array.isArray(result) ? result[0] || null : null

another code that when properly typed would just result in tons of errors because of the missing null checks. If we refactor this we should do something like 'firstOrError'

matyasf

comment created time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

 async function _getQueryResult(   } } -function wrapQueryResult(...args) {-  return bindElementToUtilities(...args)+// TODO remove any return type+function wrapQueryResult<T>(+  results: T[],+  customMethods?: Record<string, GenericFunction>+): any {

again, this breaks type autocomplete, because it'd be buggy because of the weird bind

matyasf

comment created time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

  import { firstOrNull } from './firstOrNull' import { getQueryResult } from './queryResult'-import { parseQueryArguments } from './parseQueryArguments'+import { parseQueryArguments, QueryArguments } from './parseQueryArguments' import {   querySelectorAll,   querySelectorFrames,-  querySelectorParents+  querySelectorParents,+  SelectorOptions } from './selectors'+import { BoundType } from './bindElementToUtilities' -async function findWithLabel(...args) {+export type QueryFunction<T> = (+  element: Element | Document | DocumentFragment,+  selector: string | undefined,+  options: SelectorOptions+) => T[]++async function findWithLabel(...args: QueryArguments) {   const { element, selector, options } = parseQueryArguments(...args)   return find(element, `:withLabel("${selector}")`, options) } -async function findWithText(...args) {+async function findWithText(...args: QueryArguments) {   const { element, selector, options } = parseQueryArguments(...args)   return find(element, `:withText("${selector}")`, options) } -async function findWithTitle(...args) {+async function findWithTitle(...args: QueryArguments) {   const { element, selector, options } = parseQueryArguments(...args)   return find(element, `:withTitle("${selector}")`, options) } -async function find(...args) {-  return firstOrNull(await findAll(...args))+async function find(...args: QueryArguments) {+  // TODO remove "as any", but this will cause lots of TSC errors+  // the main reason is that the function params are bound in bindElementToMethods+  return firstOrNull(await findAll(...args)) as any

Sadly adding this here breaks autocomplete totally. But removing the "any" cast from here would make type checking buggy, since methods in 'helpers' and 'queries' have a parameter (the element its added to) that is added automatically with function.bind(). I dont think we can solve this without large refactorings

matyasf

comment created time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

 function fireEvent(element, event) { Object.entries(eventMap).forEach(([key, { EventType, defaultInit }]) => {   const eventName = key.toLowerCase() -  fireEvent[key] = (node, init = {}) => {+  // not nice, but this is a very weird code :/+  // eslint-disable-next-line @typescript-eslint/ban-ts-comment+  // @ts-ignore+  fireEvent[key] = (node: Element, init: Record<string, unknown> = {}) => {     const eventInit = { ...defaultInit, ...init }

Again, some really weird code (adding additional function properties to a function) that I could not type properly without refactoring

matyasf

comment created time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

 import { fireEvent } from './events'  import * as helpers from './helpers' import * as queries from './queries'-import { bindElementToMethods } from './bindElementToMethods'+import { bindElementToMethods, GenericFunction } from './bindElementToMethods' import { bindElementToEvents } from './bindElementToEvents' import { isElement } from './isElement' -function bindElementToUtilities(element, customMethods = {}) {+type QueryTypes = {+  [K in Extract<keyof typeof queries, string>]: typeof queries[K]+}+type HelperTypes = {+  [K in Extract<keyof typeof helpers, string>]: typeof helpers[K]+}++export type BoundType = QueryTypes & HelperTypes++function bindElementToUtilities<T>(+  element: T | T[],+  customMethods: Record<string, GenericFunction> = {}+): BoundType[] {   if (!element) {-    return element+    return null as any // just seems to happen deep in the recursion   } else if (Array.isArray(element)) {-    return element.map((el) => bindElementToUtilities(el, customMethods))-  } else if (typeof element.getDOMNode === 'function') {+    const boundElements = element.map((el) =>+      bindElementToUtilities(el, customMethods)+    )+    return boundElements as any // just seems to happen deep in the recursion+  } else if (typeof (element as any).getDOMNode === 'function') {     // eslint-disable-next-line no-param-reassign-    element = element.getDOMNode()+    element = (element as any).getDOMNode()   }-   if (!isElement(element)) {     throw new Error(       '[ui-test-queries] could not bind utilities to invalid DOM Element!'     )   }-   return {     ...bindElementToMethods(element, queries),-    ...bindElementToEvents(element, fireEvent),+    ...(bindElementToEvents(element, fireEvent) as any), // could not type this :/     ...bindElementToMethods(element, helpers),     ...bindElementToMethods(element, customMethods)-  }+  } as BoundType[] // would be nicer without this cast }

When this method is called from the outside it always return an Array. The other values (a single element or null) are returned only from deep inside the recursion, so I applied this hacky solution so it looks good from the outside and does not need a large refactoring

matyasf

comment created time in 2 days

Pull request review commentinstructure/instructure-ui

Convert ui-test-locator, ui-test-queries, debounce to TypeScript and type them

  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE  * SOFTWARE.  */-export function bindElementToMethods(element, methods) {-  return Object.entries(methods).reduce((bound, [key, fn]) => {-    if (typeof fn === 'function') {-      bound[key] = fn.bind(null, element) // eslint-disable-line no-param-reassign-      return bound-    } else {-      throw new Error(-        `[ui-test-queries] cannot bind to a non-function of type ${typeof fn}`,-        key-      )-    }-  }, {})++export type GenericFunction = (...args: any) => unknown | any++export function bindElementToMethods<T, K>(element: T, methods: K) {+  return Object.entries(methods).reduce(+    (bound: Record<string, K>, [key, fn]: [string, K]) => {+      if (typeof fn === 'function') {+        bound[key] = fn.bind(null, element) // eslint-disable-line no-param-reassign

This is why I could not type the added methods properly. This code adds the first parameter to the function automatically, I dont think we can remove it.

matyasf

comment created time in 2 days

push eventinstructure/instructure-ui

Eszter Szabo

commit sha 20120ad1875a8afa15c3cc21e84402465a4ed017

chore(ui-themes): remove ts comment ignore block from babel config Closes: INSTUI-3092

view details

Eszter Szabo

commit sha 4ac94fa55a879651cab5bb476273f1d0a2930541

chore(canvas-high-contrast-theme,canvas-theme,instructure-theme,ui-theme-tokens): migrate to TS

view details

Eszter Szabo

commit sha 61bb632c68b0d380e63ccd992c2e69b7dbdb1aea

chore(ui-theme-tokens): resolve ts ignore comments from `ui-theme-tokens` package

view details

push time in 2 days

push eventinstructure/instructure-ui

Eszter Szabo

commit sha 1189fe737fde105f1dd891d0f09894b15423531f

chore: resolve mocha type errors in tests Closes: INSTUI-3103

view details

Eszter Szabo

commit sha 9387d125f86dc190f096583911f62086713bdae4

chore: move `@types/mocha` dependency to `ui-scripts` Closes: INSTUI-3103

view details

Eszter Szabo

commit sha 6f1034f6712c20e0487dbb36256ac48856d6c288

chore(canvas-high-contrast-theme,canvas-theme,instructure-theme,ui-theme-tokens): migrate to TS

view details

Eszter Szabo

commit sha 492ab696cc06953da2cfdcf005a992abb274208d

chore(ui-theme-tokens): resolve ts ignore comments from `ui-theme-tokens` package

view details

push time in 2 days

push eventinstructure/instructure-ui

Eszter Szabo

commit sha 20120ad1875a8afa15c3cc21e84402465a4ed017

chore(ui-themes): remove ts comment ignore block from babel config Closes: INSTUI-3092

view details

push time in 2 days