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

chore(VirtualRule): add nodeIndex property #2955

Merged
merged 16 commits into from
Jun 15, 2021
Merged

chore(VirtualRule): add nodeIndex property #2955

merged 16 commits into from
Jun 15, 2021

Conversation

WilcoFiers
Copy link
Contributor

@WilcoFiers WilcoFiers commented May 21, 2021

  • Generate a nodeIndex for each element, in the correct order
  • Make nodeIndex available on DqElement
  • Update sorting method to use nodeIndex

Closes issue: #2938

@WilcoFiers WilcoFiers requested a review from straker May 21, 2021 13:34
@shwq774791378
Copy link

S @jaimeiniesta

straker
straker previously requested changes Jun 9, 2021
Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

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

I'd like to see a more comprehensive merge-results test that uses more than just a single iframe. Something with multiple iframes and a nested iframe.

lib/core/utils/merge-results.js Outdated Show resolved Hide resolved
test/core/utils/dq-element.js Outdated Show resolved Hide resolved
test/core/utils/flattened-tree.js Outdated Show resolved Hide resolved
test/core/utils/flattened-tree.js Show resolved Hide resolved
Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

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

Looking good. Could you add one more test for empty array nodeIndex, since that is the state cased by an element not being in the tree? After that i think it's good to merge

straker
straker previously approved these changes Jun 10, 2021
@WilcoFiers WilcoFiers dismissed stale reviews from straker and shwq774791378 via cafc413 June 11, 2021 11:58
@WilcoFiers WilcoFiers dismissed stale reviews from shwq774791378 via 1dcf1d7 June 14, 2021 21:08
@WilcoFiers WilcoFiers merged commit 75b0a4e into develop Jun 15, 2021
@WilcoFiers WilcoFiers deleted the nodeIndex branch June 15, 2021 08:40
WilcoFiers added a commit that referenced this pull request Jun 17, 2021
* chore(VirtualRule): add nodeIndex property

* chore(DqElement): add nodeIndexes

* chore(DqElement): fix up fromFrame

* chore(dqelement): fix for IE

* chore(mergeResult): merge using nodeIndex

* chore: formatting

* chore: fix iframe order sorting

* chore: resolve feedback

* chore(merge-results): deal with invalid nodeIndexes

* chore: more tests

* chore: consistent node sorting

* chore: more fun with sorting

* fix(merge-results): handle invalid nodeIndexes

* fix: nodeIndex can be 0

* Update lib/core/utils/dq-element.js
clottman pushed a commit that referenced this pull request Jun 17, 2021
* chore(VirtualRule): add nodeIndex property

* chore(DqElement): add nodeIndexes

* chore(DqElement): fix up fromFrame

* chore(dqelement): fix for IE

* chore(mergeResult): merge using nodeIndex

* chore: formatting

* chore: fix iframe order sorting

* chore: resolve feedback

* chore(merge-results): deal with invalid nodeIndexes

* chore: more tests

* chore: consistent node sorting

* chore: more fun with sorting

* fix(merge-results): handle invalid nodeIndexes

* fix: nodeIndex can be 0

* Update lib/core/utils/dq-element.js
straker pushed a commit that referenced this pull request Jun 22, 2021
* chore(VirtualRule): add nodeIndex property

* chore(DqElement): add nodeIndexes

* chore(DqElement): fix up fromFrame

* chore(dqelement): fix for IE

* chore(mergeResult): merge using nodeIndex

* chore: formatting

* chore: fix iframe order sorting

* chore: resolve feedback

* chore(merge-results): deal with invalid nodeIndexes

* chore: more tests

* chore: consistent node sorting

* chore: more fun with sorting

* fix(merge-results): handle invalid nodeIndexes

* fix: nodeIndex can be 0

* Update lib/core/utils/dq-element.js
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.

3 participants