-
-
Notifications
You must be signed in to change notification settings - Fork 980
Refactor Parent #1523
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
base: master
Are you sure you want to change the base?
Refactor Parent #1523
Conversation
There was a problem hiding this 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 thePARENT
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.
74eced6
to
cd37a00
Compare
No description provided.