Skip to content

Testing improvement use window hook 1425501313504040371#153

Open
scoat76 wants to merge 61 commits intotbakerx:mainfrom
scoat76:testing-improvement-use-window-hook-1425501313504040371
Open

Testing improvement use window hook 1425501313504040371#153
scoat76 wants to merge 61 commits intotbakerx:mainfrom
scoat76:testing-improvement-use-window-hook-1425501313504040371

Conversation

@scoat76
Copy link
Copy Markdown

@scoat76 scoat76 commented Mar 28, 2026

No description provided.

… file with the specified extensions (--ext ...) and fix them. It avoids the quoting problem entirely.
… file with the specified extensions (--ext ...) and fix them. It avoids the quoting problem entirely.
Refactors the contact section by replacing the static list of contact details with a functional contact form.

- Removes the old implementation that listed contact info like email, phone, and social media links.
- Introduces `ContactForm.tsx` to handle user messages.
- Updates the layout to a two-column design, placing the form alongside the descriptive text.

Modified: src/components/Sections/Contact/index.tsx
Updates the descriptive text in the skills section of the resume to be more professional.

Modified: src/components/Sections/Resume/index.tsx
Removes the email link from the contact section and updates the description to direct users to the contact form.

Modified: src/data/data.tsx
Reorders the skill groups in the data file. The "Management & Strategy" section is now first, and the "Languages" section is now last.

Modified: src/data/data.tsx
Reorders the skill groups in the data file. The "Management & Strategy" section is now first, and the "Languages" section is now last.

Modified: src/data/data.tsx
Replaces the multi-column layout (`columns-2 md:columns-3 lg:columns-4`) with a CSS grid layout (`grid-cols-1 md:grid-cols-2`). This change ensures portfolio images are larger and more consistently sized, especially on larger screens.

The `object-cover` class is also added to the images to maintain their aspect ratio within the new grid structure.

Modified: src/components/Sections/Portfolio.tsx
Adds a new project, "AI & Home Automation System," to the portfolio data. This includes the project title, description, URL, and a new image import.

Modified: src/data/data.tsx
Refactors the portfolio content to emphasize "IT Delivery & Transformation Lead" and "BizDevOps Strategist" over the previous "Enterprise Transformation Lead" focus.

Key changes include:
- Updating titles, descriptions, and skills to align with the new focus.
- Revising portfolio items and work experience
- optimization, flow metrics, and delivery management.
- Adding a new timeline entry for "Head of Test & Release Department".
- Refreshing testimonials.
- Removing contact details like phone and location.
- Removing a portfolio image that is no longer used.

Modified: src/data/data.tsx
Removes citation markers from the description text in the `aboutData` object.
Removes citation tags from the hero section, portfolio items, education, and work experience.

Also adds a new portfolio item for "IoT & Cost Optimization (R&D)" with its corresponding image.

Modified: src/data/data.tsx
Removes an unused `MapIcon` import from the data file.
Updates the "About" section to provide more context.

- Adds a new "Location" item.
- Renames "Strategy" to "Personal Interests" and lists specific hobbies.
- Refines the "Languages" item for clarity.

Modified: src/data/data.tsx
scoat76 and others added 30 commits November 19, 2025 17:52
Adds "Warsaw" to the location of the Agricultural Market Agency to provide more specific information.

Modified: src/data/data.tsx
Adds various favicon formats to the `public` directory to improve browser and device compatibility. This includes standard `.ico` and `.png` sizes, as well as icons for Android Chrome and Apple touch devices.
Adds various favicon formats (`apple-touch-icon`, `favicon-32x32`, `favicon-16x16`) and a web manifest link to the document head for improved browser and device integration.

Modified: src/pages/_document.tsx
Added detailed project documentation in English under `docs/` folder:
- `docs/README.md`: Main entry point for documentation
- `docs/GETTING_STARTED.md`: Setup instructions and how to update CV data
- `docs/ARCHITECTURE.md`: Technical overview of Next.js, React, Tailwind setup
- `docs/COMPONENTS.md`: Guide to all major React components

Updated main `README.md` to include links to the new documentation files.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…8286010972967591

docs: add comprehensive project documentation
Added `rel="noopener noreferrer"` to anchor tags with `target="_blank"`
in the Portfolio section to prevent potential "tabnabbing" attacks.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
Replaced [...Array(testimonials.length)].map(...) with testimonials.map(...)
to avoid redundant array instantiation and spreading during render.
This reduces memory pressure and slightly improves performance.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…939621704572

⚡ Optimize redundant array instantiation in Testimonials
…344795794978397750

🔒 security fix: add noopener noreferrer to Portfolio links
…ncies

- Wrap handleSize in useCallback to provide a stable reference.
- Add handleSize to the useEffect dependency array.
- Remove the eslint-disable-next-line comment.
- Fixes missing dependencies in useEffect.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…3558927916032

🧹 improve(useWindow): fix missing dependencies in useEffect
Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
Update resume with AI & Innovation profile and consolidate Nordea role
- Download and add appropriate Unsplash images to `src/images/portfolio/`
- Update `src/data/data.tsx` to import and assign the new images
- Clean up unused placeholder images

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
- Downloaded and imported PropFolio animation to `public/videos/`
- Updated `PortfolioItem` in `dataDef.ts` to support an optional `video` field
- Modified `Portfolio.tsx` to render a `<video>` tag instead of `<Image>` when `video` is present
- Updated `data.tsx` to utilize the new video asset for PropFolio
- Removed previously staged static image for PropFolio

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
feat: replace portfolio placeholder images with relevant local assets
This commit adds the rel='noopener noreferrer' attribute to external links
in the Portfolio section that use target='_blank'. This is a security
best practice to prevent tabnabbing attacks.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
Move navSections and selectors string outside of the Header component to prevent unnecessary recalculations on every render.
This eliminates the overhead of useMemo and the map().join() operation during the React reconciliation phase.
Also refactored useNavObserver to properly handle its dependencies and removed the eslint-disable comment.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
Move the `handleSize` function inside the `useEffect` hook in `src/hooks/useWindow.ts` to resolve the missing dependency warning and remove the `eslint-disable` comment. This ensures that the hook follows React best practices and is more maintainable.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…-useWindow-15623847753982508864

🧹 fix missing dependencies in useEffect in useWindow hook
…ity-11981463051400977574

🔒 [security] Add rel='noopener noreferrer' to external links
Moved headerID to src/config.ts to break the circular dependency between Header.tsx and useNavObserver.tsx.
Restored navSections and selectors calculation inside Header using useMemo to maintain performance while ensuring safe module initialization.
Updated useNavObserver to properly include dependencies in its useEffect hook.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…73823956

⚡ Optimize Header selectors calculation
- Set up Jest with next/jest for TypeScript and React support
- Add @testing-library/react and @testing-library/jest-dom
- Create ResumeSection.test.tsx with coverage for rendering title, children, and responsive layout classes
- Add "test" script to package.json

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…n-685008047237115582

🧪 Add tests for ResumeSection component
This commit introduces a `throttle` utility and applies it to the `useWindow` hook's resize event handler. This significantly reduces the number of state updates and re-renders during window resizing, improving overall performance.

Changes:
- Created `src/utils/throttle.ts` with a robust throttle implementation including a `.cancel()` method.
- Updated `src/hooks/useWindow.ts` to throttle the `handleSize` function with a 100ms delay.
- Added proper cleanup for the event listener and throttled function in `useWindow`.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…-resize-8997941476440034250

⚡ Optimize window resize event handler with throttling
Moved the JSX comment out of the `<Head>` component in `src/pages/_document.tsx` to prevent it from being processed as a child element, which triggers a "missing key" warning in React.

Co-authored-by: scoat76 <33258885+scoat76@users.noreply.github.com>
…ad-7081632755227737832

🧹 fix React key warning in Next.js Head component
- Implement `src/hooks/useWindow.test.ts` to test `useWindow` custom hook.
- Test cases include:
  - Initial dimensions capture on mount.
  - Updates on window resize event.
  - Verification of 100ms throttle behavior.
  - Cleanup of event listeners on unmount.
- Verified logic using a standalone Node.js script since the environment lacks `next/jest`.

Co-authored-by: scoat76 <33258885+scoat76@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.

1 participant