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

[SummarySenseCard] Add glosses and bg color #3109

Merged
merged 12 commits into from
Jul 25, 2024
Merged

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented May 2, 2024

Resolves #3104

This change refactors code found in 3 "Data Cleanup" places:

  • Under "You've completed:", any completed goal with a changed word
    • This pr adds gloss text not previously present
  • In "Review Entries", the content of the Definitions and Glosses columns
    • The Definitions column is only available in projects with imported entries that have definitions
    • There should be no visible changes due to this pr
  • In "Review Entries", edit an entry with more than one sense; in the edit dialog that appears, in the upper-right corner of the "Senses" section, click the double-arrow icon to collapse the senses for a summary view
    • This pr adds gloss text not previously present
    • This pr also changes the bg of the summary view to yellow if any of the senses have been edited (matching the behavior on the individual senses in the un-collapsed view)

This change is Reviewable

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 74.80%. Comparing base (8be0003) to head (8de741c).
Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
src/components/WordCard/SensesTextSummary.tsx 92.59% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3109      +/-   ##
==========================================
+ Coverage   74.77%   74.80%   +0.02%     
==========================================
  Files         277      278       +1     
  Lines       10652    10652              
  Branches     1283     1284       +1     
==========================================
+ Hits         7965     7968       +3     
+ Misses       2320     2319       -1     
+ Partials      367      365       -2     
Flag Coverage Δ
backend 83.92% <ø> (-0.03%) ⬇️
frontend 66.76% <93.33%> (+0.07%) ⬆️

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 July 9, 2024 15:40
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 5 files at r1, 1 of 2 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @imnasnainaec)


src/components/WordCard/index.tsx line 120 at r3 (raw file):

          ))
        ) : (
          <SummarySenseCard includeGlosses senses={senses} />

Why is this a property? It looks to me as though it is always set to true. Is there a use case that would suggest we would want a SummarySenseCard without glosses?

Removing the property should simplify the code and the test code so it is worth considering.

If it is not removed, then the test code should be updated to test both cases.

Code quote:

includeGlosses

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: 3 of 6 files reviewed, 1 unresolved discussion (waiting on @jmgrady)


src/components/WordCard/index.tsx line 120 at r3 (raw file):

Previously, jmgrady (Jim Grady) wrote…

Why is this a property? It looks to me as though it is always set to true. Is there a use case that would suggest we would want a SummarySenseCard without glosses?

Removing the property should simplify the code and the test code so it is worth considering.

If it is not removed, then the test code should be updated to test both cases.

Done.

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 3 of 3 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @imnasnainaec)

@imnasnainaec imnasnainaec merged commit 63563d9 into master Jul 25, 2024
19 checks passed
@imnasnainaec imnasnainaec deleted the summary-sense-card branch July 25, 2024 12:30
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.

[SummarySenseCard] Add glosses, bg color
2 participants