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

CPLAT-15997 Scope Queries to the Body Element #37

Merged
merged 3 commits into from
Nov 8, 2021

Conversation

joebingham-wk
Copy link
Contributor

@joebingham-wk joebingham-wk commented Oct 15, 2021

Motivation

I ran into an issue where I needed to query a portal that was attached directly to the document.body rather than inside of RTL's container. Doing research revealed that this should work out of the box because queries are bound to the document.body by default. We were doing things slightly differently by binding queries to the render result's container, preventing us from being able to access portals like the library anticipates. This PR tweaks that to align with the JS side!

Changes

  • Change the default query bindings to be the render result's baseElement instead of container
  • Update tests

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • The test changes make sense and are expected
      • CI passes
    • Anything falling under manual testing criteria outlined in CONTRIBUTING.md

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Client Platform member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Comment on lines +42 to +43
/*ReactDomComponentFactoryProxy*/ dynamic rootElem,
List<_FormElemDefinition> els) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are formatting changes.. I'm not sure why they're there (I formatted on 2.13.4). The only real change is in render.dart and then any test files

Copy link
Contributor

@greglittlefield-wf greglittlefield-wf left a comment

Choose a reason for hiding this comment

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

+1

We might want to run some consumer tests before releasing this, since I think there's some risk that this behavior change could introduce some test failures.

@rm-astro-wf rm-astro-wf changed the title Scope Queries to the Body Element CPLAT-15997 Scope Queries to the Body Element Oct 26, 2021
Copy link
Contributor

@aaronlademann-wf aaronlademann-wf left a comment

Choose a reason for hiding this comment

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

+1 / Semver +1

@greglittlefield-wf
Copy link
Contributor

QA +1

Copy link
Contributor

@kealjones-wk kealjones-wk left a comment

Choose a reason for hiding this comment

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

+1

@aaronlademann-wf
Copy link
Contributor

@Workiva/release-management-pp

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rmconsole2-wf rmconsole2-wf merged commit 033034b into master Nov 8, 2021
@rmconsole2-wf rmconsole2-wf deleted the set-scope-to-body branch November 8, 2021 23:05
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.

7 participants