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] Show (read-only) note on entries with a note #2960

Merged
merged 11 commits into from
Apr 15, 2024

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Feb 20, 2024

Resolves #1343

To test:

  • create a new project (or open a project that doesn't already have a bunch of potential duplicates)
  • enter two words with identical vernacular form and a note on at least one of them
  • Data Cleanup > Merge Duplicates

This change is Reviewable

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.29%. Comparing base (82f73c4) to head (09cd55a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2960      +/-   ##
==========================================
- Coverage   74.33%   74.29%   -0.05%     
==========================================
  Files         269      269              
  Lines       10323    10323              
  Branches     1217     1217              
==========================================
- Hits         7674     7669       -5     
- Misses       2299     2303       +4     
- Partials      350      351       +1     
Flag Coverage Δ
backend 82.92% <ø> (-0.11%) ⬇️
frontend 66.31% <100.00%> (ø)

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.

@imnasnainaec imnasnainaec requested a review from jmgrady April 11, 2024 17:10
Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 10 files at r1, 6 of 6 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


src/components/Buttons/NoteButton.tsx line 5 at r2 (raw file):

import IconButtonWithTooltip from "components/Buttons/IconButtonWithTooltip";
import EditTextDialog from "components/Dialogs/EditTextDialog";

I don't understand the reason for this change. I thought the purpose of components/Buttons/index.ts was so that all buttons would be imported from this location. If we are migrating away from that, then perhaps adding NoteButton to components/Buttons/index.tx does not make sense.

Currently, there are 19 instances (including the ones in this PR) that use this form and 43 instances that import from "components/Buttons". I personally prefer the latter because it is easier to read when there is a single import source for the buttons instead of a separate import for each button. This is merely a preference - I would prefer to have consistent usage.

I am not proposing that you reconcile all of these differences in this PR but rather create an issue to have a common import pattern for buttons (& dialogs). If the decision is to use "components/Buttons/<button_name>" then these changes can say. Otherwise, I would prefer to revert these changes to make less work later.

Code quote:

import IconButtonWithTooltip from "components/Buttons/IconButtonWithTooltip";
import EditTextDialog from "components/Dialogs/EditTextDialog";

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jmgrady)


src/components/Buttons/NoteButton.tsx line 5 at r2 (raw file):

Previously, jmgrady (Jim Grady) wrote…

I don't understand the reason for this change. I thought the purpose of components/Buttons/index.ts was so that all buttons would be imported from this location. If we are migrating away from that, then perhaps adding NoteButton to components/Buttons/index.tx does not make sense.

Currently, there are 19 instances (including the ones in this PR) that use this form and 43 instances that import from "components/Buttons". I personally prefer the latter because it is easier to read when there is a single import source for the buttons instead of a separate import for each button. This is merely a preference - I would prefer to have consistent usage.

I am not proposing that you reconcile all of these differences in this PR but rather create an issue to have a common import pattern for buttons (& dialogs). If the decision is to use "components/Buttons/<button_name>" then these changes can say. Otherwise, I would prefer to revert these changes to make less work later.

I prefer simply always using from "components/Buttons/" as well, but the issue I'm encountering is that if you use any one of the buttons, you require the imports of all of the buttons, which results in a lot more seemingly unnecessary mocking in the functions. I'd like to figure out a standard way to create one of these collective index files that exports everything in some lazy-load fashion to avoid this.

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 16 files reviewed, 1 unresolved discussion (waiting on @imnasnainaec and @jmgrady)


src/components/Buttons/NoteButton.tsx line 5 at r2 (raw file):

Previously, imnasnainaec (D. Ror.) wrote…

I prefer simply always using from "components/Buttons/" as well, but the issue I'm encountering is that if you use any one of the buttons, you require the imports of all of the buttons, which results in a lot more seemingly unnecessary mocking in the functions. I'd like to figure out a standard way to create one of these collective index files that exports everything in some lazy-load fashion to avoid this.

I know you were "not proposing that you reconcile all of these differences in this PR", but I push commits here anyway to get your thoughts one way to do it with @loadable/component and to make sure the tests still pass.

Copy link
Collaborator

@jmgrady jmgrady left a comment

Choose a reason for hiding this comment

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

Reviewed 11 of 11 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit dea7e6c into master Apr 15, 2024
18 checks passed
@imnasnainaec imnasnainaec deleted the merge-note branch April 15, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MergeDuplicates] See Note on each entry
3 participants