Skip to content

fix: scroll entire window instead of iframe #2363

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

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

Conversation

saraburns1
Copy link

@saraburns1 saraburns1 commented Aug 8, 2025

Description

Fixes openedx/openedx-aspects#316 by scrolling window to the xblock location instead of scrolling within the iFrame

Supporting information

Link to other information about the change, such as GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.

Testing instructions

Test with openedx/edx-platform#37152
Need to enable Aspects in-context metrics (https://github.com/openedx/frontend-plugin-aspects)

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.

Best Practices Checklist

We're trying to move away from some deprecated patterns in this codebase. Please
check if your PR meets these recommendations before asking for a review:

  • Any new files are using TypeScript (.ts, .tsx).
  • Deprecated propTypes, defaultProps, and injectIntl patterns are not used in any new or modified code.
  • Tests should use the helpers in src/testUtils.tsx (specifically initializeMocks)
  • Do not add new fields to the Redux state/store. Use React Context to share state among multiple components.
  • Use React Query to load data from REST APIs. See any apiHooks.ts in this repo for examples.
  • All new i18n messages in messages.ts files have a description for translators to use.
  • Imports avoid using ../. To import from parent folders, use @src, e.g. import { initializeMocks } from '@src/testUtils'; instead of from '../../../../testUtils'

Copy link

codecov bot commented Aug 8, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.43%. Comparing base (915bd55) to head (3f6f509).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
src/generic/hooks/useIframeBehavior.tsx 0.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2363      +/-   ##
==========================================
- Coverage   94.44%   94.43%   -0.02%     
==========================================
  Files        1169     1169              
  Lines       25073    25117      +44     
  Branches     5460     5476      +16     
==========================================
+ Hits        23679    23718      +39     
- Misses       1322     1326       +4     
- Partials       72       73       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

In-context metrics: First component in a unit cut off when there is a warning on the Studio unit page
1 participant