Skip to content

Conversation

@davidornelas11
Copy link
Contributor

This pr adds the new check-element-changes too along with fixing the necessary packages that had errors when rendered in a server environment

Description

Checklist

  • Tests pass for relevant code changes

Important Reminders

Links

@davidornelas11 davidornelas11 requested a review from a team as a code owner November 13, 2025 22:54
Copilot finished reviewing on behalf of davidornelas11 November 13, 2025 22:56
Copy link
Contributor

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 PR introduces a new tool for tracking component HTML changes over time and fixes server-side rendering compatibility issues across multiple packages. The main addition is the check-element-changes script that compares component HTML output between different time periods to detect visual changes.

  • Adds new check-element-changes script with supporting utilities for server-side component rendering
  • Fixes SSR compatibility issues in DOMPurify initialization and test setups
  • Updates component mocks and test configurations to support the new tooling

Reviewed Changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/unity-react-core/vite.config.js Updates global definition to use globalThis for better SSR compatibility
packages/unity-react-core/tsx.config.json New TypeScript configuration for tsx runtime with image loader settings
packages/unity-react-core/tsconfig.json Expands TypeScript scope to include scripts directory
packages/unity-react-core/tests/dataLayer.spec.mjs Adds wait condition to ensure accordion elements are ready before testing
packages/unity-react-core/scripts/server-utils.js New utility for initializing JSDOM environment for server-side rendering
packages/unity-react-core/scripts/image-loader.js New custom loader to handle image imports in Node.js
packages/unity-react-core/scripts/check-element-changes.js Main script for comparing component HTML between time periods
packages/unity-react-core/scripts/check-changes.tsx Component rendering script that generates HTML snapshots for comparison
packages/static-site/src/pages/Home.tsx Adds required type prop to Divider components
packages/shared/utils/html-utils.js Refactors DOMPurify initialization to support SSR
packages/shared/utils/html-utils.d.ts Updates type definition to allow null return value
packages/component-header-footer/setupTests.js Adds TextEncoder polyfill for test environment
packages/app-degree-pages/vitest.setup.ts Imports new unity-react-core mock
packages/app-degree-pages/mocks/unity-react-core-mock.jsx Simplifies mock by removing unused imports and adding missing component mocks
package.json Updates script path and adds new dependencies (diff, tsx)

davidornelas11 and others added 2 commits November 13, 2025 16:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@asu-jenkins-devops
Copy link
Collaborator

davidornelas11 and others added 3 commits November 13, 2025 16:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

4 participants