8000 Refactor Parent by davidjbradshaw · Pull Request #1523 · davidjbradshaw/iframe-resizer · GitHub
[go: up one dir, main page]

Skip to content

Conversation

davidjbradshaw
Copy link
Owner

No description provided.

@davidjbradshaw davidjbradshaw requested a review from Copilot August 30, 2025 09:16
Copilot

This comment was marked as outdated.

@davidjbradshaw davidjbradshaw requested a review from Copilot August 30, 2025 10:19
Copilot

This comment was marked as outdated.

@davidjbradshaw davidjbradshaw requested a review from Copilot August 31, 2025 12:54
Copilot

This comment was marked as outdated.

@davidjbradshaw davidjbradshaw marked this pull request as draft August 31, 2025 12:57
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors the Parent package by extracting hardcoded strings and type checks into constants from a shared consts.js file. This improves maintainability by eliminating magic strings and centralizing constant definitions.

  • Replaces hardcoded strings like 'string', 'object', 'undefined', and 'auto' with named constants
  • Extracts the 'parent' string to the PARENT constant for consistent labeling
  • Updates imports across multiple files to use the new constants from ../common/consts

Reviewed Changes

Copilot reviewed 39 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/parent/umd.js Imports PARENT and UNDEFINED constants, updates string literal checks
packages/parent/iife.js Imports PARENT constant for deprecation function call
packages/parent/factory.js Imports and uses UNDEFINED, STRING, and OBJECT constants for type checks
packages/core/values/defaults.js Imports and uses AUTO and FUNCTION constants
packages/core/title.js New file providing title management functions
packages/core/size.js New file providing size management functions
packages/core/send/trigger.tests.js New test file for trigger functionality
packages/core/send/trigger.js New file providing message triggering functionality
packages/core/send/timeout.test.js Updates import path from relative to absolute
packages/core/send/timeout.js Imports OBJECT constant and updates type check
packages/core/send/ready.test.js New test file for ready functionality
packages/core/send/ready.js New file providing ready state management
packages/core/send/outgoing.test.js New test file for outgoing message functionality
packages/core/send/outgoing.js New file providing outgoing message creation
packages/core/send/offset.js New file providing offset size management
packages/core/scroll.js New file providing scroll functionality
packages/core/receive/preflight.js New file providing message preflight checks
packages/core/receive/message.js New file providing message handling
packages/core/receive/decode.js New file providing message decoding
packages/core/page-position.js New file providing page position management
packages/core/mouse.js New file providing mouse event handling
packages/core/monitor.js New file providing monitoring functionality
packages/core/monitor-parent-props.js New file providing parent property monitoring
packages/core/monitor-page-info.js New file providing page info monitoring
packages/core/index.js Major refactoring extracting functionality to separate modules
packages/core/event.test.js New test file for event functionality
packages/core/event.js New file providing event handling
packages/core/console.js Imports PARENT constant for console labeling
packages/common/utils.test.js Updates type assertion tests to use constants
packages/common/pubSub.js Imports OBJECT constant for type checking
packages/common/filter-iframe-attribs.test.js Imports AUTO constant for test
packages/common/consts.js Adds new constants for types, strings, and labels
packages/child/read.js Imports type constants for validation functions
packages/child/observers/perf.js Removes commented code
packages/child/observers/overflow.js Imports NONE constant for style checking
packages/child/index.js Updates multiple hardcoded strings to use constants
packages/child/check-blocking-css.js Imports AUTO and NONE constants
packages/angular/directive.ts Adds 'both' option to direction type
.eslintrc.json Disables 'valid-typeof' ESLint rule

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

davidjbradshaw added a commit that referenced this pull request Sep 4, 2025
davidjbradshaw added a commit that referenced this pull request Sep 5, 2025
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.

1 participant
0