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

SF-3054 Warn user when saving a note without content #2851

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RaymondLuong3
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 commented Nov 13, 2024

This change adds form validation to the note dialog form when adding or editing notes. If a user tries to save an empty note, they will be prompted to enter text rather than having the dialog close without any action.

Note dialog save


This change is Reviewable

@RaymondLuong3 RaymondLuong3 added the will require testing PR should not be merged until testers confirm testing is complete label Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.18%. Comparing base (98d0509) to head (0abc700).

Files with missing lines Patch % Lines
...nslate/editor/note-dialog/note-dialog.component.ts 71.42% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2851      +/-   ##
==========================================
- Coverage   79.19%   79.18%   -0.02%     
==========================================
  Files         533      533              
  Lines       30953    30961       +8     
  Branches     5050     5052       +2     
==========================================
+ Hits        24514    24517       +3     
- Misses       5655     5669      +14     
+ Partials      784      775       -9     

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


🚨 Try these New Features:

@pmachapman pmachapman self-requested a review November 18, 2024 19:59
@pmachapman pmachapman self-assigned this Nov 18, 2024
Copy link
Collaborator

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @RaymondLuong3)


src/SIL.XForge.Scripture/ClientApp/src/app/translate/editor/note-dialog/note-dialog.component.ts line 70 at r1 (raw file):

  showSegmentText: boolean = false;
  notesToDisplay: NoteDisplayInfo[] = [];
  _saveOption: 'save' | 'resolve' = 'save';

Nit: Can we please make this a type as it is repeated a couple of times?

Code quote:

_saveOption: 'save' | 'resolve' = 'save';

Copy link
Collaborator Author

@RaymondLuong3 RaymondLuong3 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 5 files reviewed, all discussions resolved (waiting on @pmachapman)


src/SIL.XForge.Scripture/ClientApp/src/app/translate/editor/note-dialog/note-dialog.component.ts line 70 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

Nit: Can we please make this a type as it is repeated a couple of times?

Done.

Copy link
Collaborator

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@pmachapman pmachapman added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Nov 18, 2024
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