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

[MergeDups] Unify sense-reference info #3490

Merged
merged 3 commits into from
Jan 8, 2025
Merged

[MergeDups] Unify sense-reference info #3490

merged 3 commits into from
Jan 8, 2025

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Dec 16, 2024

There already exists a type (MergeTreeReference) to cover the info extracted from the draggableId of both our DragSense and SidebarDragSense. So rather than manually constructing it -- e.g.,

      draggableId={JSON.stringify({
        wordId: props.wordId,
        mergeSenseId: props.mergeSenseId,
        isSenseProtected: props.isProtectedSense,
      })}

-- add a senseRef: MergeTreeReference prop for both *DragSense components. The above then becomes simply draggableId={JSON.stringify(props.senseRef)}.

This will also allow for easily adding fields to MergeTreeReference and have them immediately available when we use

const src: MergeTreeReference = JSON.parse(res.draggableId);

This change is Reviewable

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.54%. Comparing base (4d79491) to head (572d009).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3490      +/-   ##
==========================================
+ Coverage   74.71%   83.54%   +8.82%     
==========================================
  Files         285       51     -234     
  Lines       10996     5178    -5818     
  Branches     1337      632     -705     
==========================================
- Hits         8216     4326    -3890     
+ Misses       2398      692    -1706     
+ Partials      382      160     -222     
Flag Coverage Δ
backend 83.54% <ø> (-0.18%) ⬇️
frontend ?

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
Collaborator

@andracc andracc left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 8 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec enabled auto-merge (squash) January 8, 2025 18:09
@imnasnainaec imnasnainaec merged commit 293e202 into master Jan 8, 2025
18 checks passed
@imnasnainaec imnasnainaec deleted the sense-ref branch January 8, 2025 18:19
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