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

Relax changes #1307

Merged
merged 6 commits into from
Oct 14, 2020
Merged

Relax changes #1307

merged 6 commits into from
Oct 14, 2020

Conversation

alexander-yevsyukov
Copy link
Contributor

This PR relaxes validation requirements for StringChange and BytesChange types. Previously, new_value fields were required. It was so to encourage introducing commands that would start from Clear (e.g. ClearDescription) instead of having a command that would just accept a blank new value.

The intention was good, but it introduced the following problems:

  1. It's too much headache when it comes to editing values that we don't want to die for. E.g. a text field may be cleared just because the previous one was outdate and the user did not invent a new one non-blank one. Requiring having special handling for empty values with a separate command and event is too much.
  2. We cannot require new_value for fields of simple types. Such inconsistency makes the problem no.1 is even bigger.

@alexander-yevsyukov alexander-yevsyukov self-assigned this Oct 14, 2020
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review October 14, 2020 16:02
@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #1307 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1307      +/-   ##
============================================
- Coverage     91.09%   91.06%   -0.03%     
+ Complexity     4746     4744       -2     
============================================
  Files           608      608              
  Lines         15089    15088       -1     
  Branches        854      854              
============================================
- Hits          13745    13740       -5     
- Misses         1078     1080       +2     
- Partials        266      268       +2     

@alexander-yevsyukov alexander-yevsyukov merged commit bcbdb4f into master Oct 14, 2020
@armiol armiol deleted the relax-string-change branch November 26, 2020 14:32
@yuri-sergiichuk yuri-sergiichuk mentioned this pull request Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants