Skip to content
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

#287 Upgrade next to v15 #289

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

nevendyulgerov
Copy link
Contributor

@nevendyulgerov nevendyulgerov commented Jan 3, 2025

I upgraded next to v15 and react to v19 for the web app which resulted in library upgrades in:

  • packages/ui - upgraded the react and testing-library versions
  • apps/workshop - upgraded the react and storybook versions

I also tested the app through the docker container and didn't find any issues.

@nevendyulgerov nevendyulgerov added the Type: Chore Improvements to the code base and DX. It has no impact on external users e.g. Update deps label Jan 3, 2025
@nevendyulgerov nevendyulgerov self-assigned this Jan 3, 2025
Copy link

vercel bot commented Jan 3, 2025

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

Name Status Preview Comments Updated (UTC)
rollups-explorer-arbitrum-mainnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-arbitrum-sepolia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-base-mainnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-base-sepolia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-mainnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-optimism-mainnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-optimism-sepolia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-sepolia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am
rollups-explorer-workshop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 10:23am

export const useElementVisibility = <T extends Element>({
element,
export const useElementVisibility = (
element: HTMLDivElement | null,
Copy link
Collaborator

@brunomenezes brunomenezes Jan 9, 2025

Choose a reason for hiding this comment

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

That is an odd type narrowing saying that the only element type accepted would be div elements or null. But in theory, it was supposed to accept any valid HTML element or null. I checked the code and played around, and it would take a ref typed as HTMLInputElement without any squiggly red lines (the project is using typescript 5.3.2), which causes other problems in terms of modifying that hook as the intellisense will display incorrect attributes.

I believe the element being a generic type that extends the correct ParentType is necessary. The refactoring going down one level i.e. RefObject<T> to Element does not look like a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Chore Improvements to the code base and DX. It has no impact on external users e.g. Update deps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Next to v15
2 participants