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

feat: merge nested observer errors instead of nesting #2530

Merged
merged 1 commit into from
Dec 5, 2019

Conversation

logaretm
Copy link
Owner

@logaretm logaretm commented Dec 4, 2019

This PR introduces a different strategy to handle nested observers which have been very confusing. The observers' errors were also nested, but this PR merges errors that make the structure predictable. Which allows us to tackle #1923 and #2484

closes #2528

@codecov
Copy link

codecov bot commented Dec 4, 2019

Codecov Report

Merging #2530 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2530      +/-   ##
==========================================
+ Coverage   95.72%   95.72%   +<.01%     
==========================================
  Files          50       50              
  Lines        1122     1124       +2     
  Branches      162      162              
==========================================
+ Hits         1074     1076       +2     
  Misses         48       48
Impacted Files Coverage Δ
src/components/Observer.ts 92.77% <100%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c85b99...1fac456. Read the comment docs.

@logaretm logaretm merged commit 40ef6ea into master Dec 5, 2019
@logaretm logaretm deleted the feat/merge-nested-observer-errors branch December 5, 2019 22:18
@logaretm logaretm changed the title feat: nest nested observer errors instead of nesting feat: merge nested observer errors instead of nesting Dec 5, 2019
@schmulschubiak
Copy link

But nesting had a big advantage in the past. I could get very fast via errors.errors[vid].length, if a nested observer has errors, for showing error-icons outside of the observer-dom-element (like in tab panes). Now vid has no need. How can I determinate if a nested observer has errors?

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.

ValidationObserver 'obs_{counter}' object in parent observer
2 participants