Skip to content

Refactor 09042025 #524

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 21 commits into
base: master
Choose a base branch
from
Open

Refactor 09042025 #524

wants to merge 21 commits into from

Conversation

prabhuignoto
Copy link
Owner

Description

This pull request includes updates to various dependencies, improvements to the build configuration, and minor documentation enhancements. The most important changes include updating GitHub Actions workflows, refining the rollup.config.mjs file, updating dependencies in package.json, and improving the README documentation.

Dependency Updates:

  • Updated pnpm/action-setup to v4 and actions/checkout to v4 in multiple GitHub Actions workflows, including build.yml, coveralls.yml, cypress.yml, and snyk.yaml to ensure compatibility with the latest versions. [1] [2] [3] [4]

Build Configuration:

  • Enhanced rollup.config.mjs by adding new plugins (alias, dynamicImportVars, replace, progress), enabling source maps, and optimizing the build for production environments. [1] [2] [3] [4] [5] [6]

Package Updates:

  • Updated multiple dependencies in package.json, including styled-components, eslint, cypress, typescript, and rollup to their latest versions for improved stability and new features. [1] [2] [3] [4]

Documentation Improvements:

  • Refined the README documentation for better clarity and readability, including updates to the descriptions of component usage and feature explanations. [1] [2] [3] [4] [5] [6]

Code Enhancements:

  • Improved the ScrollBar styled component to include a theme prop type for better type safety.
  • Added a global mock for ResizeObserver in the test setup to prevent test failures related to resize events.
  • Refactored details-text-memo.tsx to use a custom hook for background color calculation and simplified the height measurement logic. [1] [2]

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

- Added hex color validation to useBackground hook.
- Introduced options for enabling/disabling and customizing key events in useEscapeKey and useOutsideClick hooks.
- Implemented cleanup functionality in useMediaState hook.
- Enhanced useWindowSize hook with debouncing for resize events.
- Updated useCardSize hook to improve text content size calculation.
- Refactored useUIState to support boolean state toggling.
- Added new Rollup plugins: @rollup/plugin-alias, @rollup/plugin-dynamic-import-vars, @rollup/plugin-replace, and rollup-plugin-progress.
- Updated package.json and pnpm-lock.yaml to include new dependencies.
- Enhanced rollup.config.mjs with sourcemaps and improved production optimizations.
- Refined README.md for clarity and consistency in instructions.
- Upgraded styled-components and various dependencies in package.json and pnpm-lock.yaml.
- Refactored rollup configuration to improve build optimizations and added support for dynamic imports.
- Removed deprecated demo data files and adjusted import paths for data modules.
- Enhanced timeline components with lazy loading for better performance.
- Updated snapshots to reflect changes in component structure and styles.
….yaml

- Upgraded cypress dependency to version 14.3.0 for improved testing capabilities.
- Updated lock file to reflect the new version and its integrity hash.
Copy link

vercel bot commented Apr 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-chrono-uc7v ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 1:02pm

- Commented out the canShowTextMemo variable in timeline-card-media.tsx to clean up the code.
- Updated test imports in timeline-card-media.test.tsx to remove unused render import.
- Updated CardMedia component to use separate functions for calculating card height with and without text overlay.
- Enhanced accessibility by replacing role attributes with aria-labels for arrow icons.
- Refactored alt text handling in ImageDisplay and VideoPlayer components to use nullish coalescing for better default values.
- Cleaned up title prop handling in MediaDetails component to ensure consistent fallback values.
- Enhanced CardMedia component by adding a data-testid for the arrow icon to improve testability.
- Updated snapshot tests for timeline-horizontal-card and timeline-card-media to reflect changes in class names and structure.
- Removed the frameborder attribute from the video element in the timeline-card-media snapshot for cleaner markup.
- Improved regex in mediaUtils to correctly extract YouTube video IDs from various URL formats.
- Deleted the downloads.html file as it is no longer needed.
- Removed the root path route from VerticalTimelineRoutes to streamline navigation.
Copy link

sonarqubecloud bot commented Apr 9, 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