Skip to content

Conversation

@david-crespo
Copy link
Collaborator

In local dev, Radix was giving a spurious error and a technically true but pointless warning on our side modal. This PR gets rid of both.

image

@vercel
Copy link

vercel bot commented Nov 7, 2024

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

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Nov 7, 2024 9:19pm

)}
</>
<div className="items-top mb-4 mt-8">
<Dialog.Title className="flex w-full items-center justify-between break-words pr-8 text-sans-2xl">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dialog.Title without asChild renders as an h2. Putting it directly around the title itself makes a lot more sense here.


export type SideModalProps = {
title?: string
title: string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Title did not need to be optional. We always have a title.

animate = true,
errors,
}: SideModalProps) {
const titleId = 'side-modal-title'
Copy link
Collaborator Author

@david-crespo david-crespo Nov 7, 2024

Choose a reason for hiding this comment

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

This was used to hook up the accessible title to the dialog, but Radix takes care of that for us.

image

title={errors.length > 1 ? 'Errors' : 'Error'}
/>
</div>
)}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why were errors inside the title????

}
title={errors.length > 1 ? 'Errors' : 'Error'}
/>
</div>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I confirmed everything looks the same as main when there are errors.

image

@david-crespo david-crespo merged commit 5edf89e into main Nov 7, 2024
7 checks passed
@david-crespo david-crespo deleted the fix-radix-warnings branch November 7, 2024 22:47
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.

2 participants