Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph manual points editing #2220

Merged
merged 48 commits into from
Mar 15, 2024
Merged

Graph manual points editing #2220

merged 48 commits into from
Mar 15, 2024

Conversation

bgoldowsky
Copy link
Contributor

@bgoldowsky bgoldowsky commented Mar 5, 2024

See PT-185581730

Adds the ability to create manual points, and edit all points on a graph.

Implementation notes:

  • For dragging points, some existing existing code was updated. In CODAP, this allows dragging points but they revert to their original position afterwards. It was nonfunctional in CLUE because it was expecting graph dots to be simple <circle> elements; CLUE's are now <g> elements containing two circles for the main dot and the highlight. I updated that, as well as replacing case selection with cell selection as the basis for dragging selected points.
  • Related code that allows selecting points by dragging a rectangle was also updated/fixed to respect cell selection and work with multi-layer graphs.
  • Autoscaling is improved and slightly refactored so that (a) the graph will autoscale after you drag points around (if autoscaling is enabled and axes are not locked), and (b) it will wait until you are done dragging before attempting this.
  • Some undo tweaks are included in this PR, but it does not attempt to fix undo/redo behavior in general for dragging. Specifically, many undo/history records are created for each drag 'event'.
  • The qa-config-subtabs local unit is updated to include the new buttons, so that they can be tested there.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 84.38438% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 83.49%. Comparing base (661c7c5) to head (9828047).

Files Patch % Lines
src/plugins/graph/components/background.tsx 67.03% 26 Missing and 4 partials ⚠️
src/plugins/graph/utilities/graph-utils.ts 50.00% 11 Missing and 2 partials ⚠️
src/plugins/graph/models/graph-model.ts 94.73% 3 Missing ⚠️
...ns/graph/components/graph-toolbar-registration.tsx 93.10% 2 Missing ⚠️
...c/plugins/graph/models/data-configuration-model.ts 66.66% 2 Missing ⚠️
...omponents/utilities/editable-label-with-button.tsx 92.30% 1 Missing ⚠️
src/plugins/graph/d3-types.ts 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2220      +/-   ##
==========================================
+ Coverage   83.42%   83.49%   +0.06%     
==========================================
  Files         688      689       +1     
  Lines       34075    34276     +201     
  Branches     8836     8888      +52     
==========================================
+ Hits        28428    28619     +191     
- Misses       5352     5357       +5     
- Partials      295      300       +5     
Flag Coverage Δ
cypress 73.24% <86.14%> (+0.12%) ⬆️
cypress-regression 73.24% <86.14%> (+0.12%) ⬆️
cypress-smoke 29.97% <3.71%> (-0.14%) ⬇️
jest 51.80% <23.12%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cypress bot commented Mar 5, 2024

1 flaky test on run #11660 ↗︎

0 95 5 0 Flakiness 1

Details:

null
Project: collaborative-learning Commit: 98280479ff
Status: Passed Duration: 09:08 💡
Started: Mar 14, 2024 4:46 PM Ended: Mar 14, 2024 4:55 PM
Flakiness  cypress/e2e/functional/teacher_tests/teacher_curation_spec.js • 1 flaky test

View Output

Test Artifacts
verify document curation > verify starring and unstar Test Replay Screenshots

Review all test suite changes for PR #2220 ↗︎

The relevant information and methods are now all in the model layer.
Cypress test was failing due to drags
not getting updated.
@bgoldowsky bgoldowsky marked this pull request as ready for review March 11, 2024 20:31
Copy link
Member

@scytacki scytacki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I didn't look super close at all of the graph changes because I'm not that familiar with that code.

I did find one React component defined inside of another which can cause problems. But it seems to be working so you don't need to fix it right away.

src/components/utilities/editable-label-with-button.tsx Outdated Show resolved Hide resolved
@scytacki scytacki added the pending QA review A PR that is waiting for QA to review it before merging. label Mar 12, 2024
@scytacki
Copy link
Member

The story has passed QA, I'll update this PR and merge it.

@scytacki scytacki added approved QA review and removed pending QA review A PR that is waiting for QA to review it before merging. labels Mar 15, 2024
@scytacki scytacki merged commit 7acae49 into master Mar 15, 2024
24 of 25 checks passed
@scytacki scytacki deleted the 185581730-add-points branch March 15, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants