Skip to content

Conversation

@GraceGardner
Copy link
Contributor

@GraceGardner GraceGardner commented Sep 10, 2025

Description & motivation 💭

Switch from postcss to twmerge for classes in the PaginatedTable component.

Does this seems like a better solution for now?

I didn't switch to away from legacy because of all of the different types of snippets we will probably need to add for this. And we will need to update all of the use-cases for this component. I think we will probably want to do that in the different ticket if we choose to do that? Just being we need to update both repos. I want to make sure we don't break any pages with the update.

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@vercel
Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
holocene Ready Ready Preview Comment Sep 11, 2025 4:22pm

maxHeight?: string;
fixed?: boolean;
}
class?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the idea is to use the ClassValue type here, which supports arrays, objects, etc. but will defer to @GiantRobots

Copy link
Collaborator

Choose a reason for hiding this comment

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

ClassNameValue from the twmerge import is what we want (twmerge supports all of the cslx goodness... except objects. So we want to use what their api allows so we don't have to do more work subbing out to cslx, then merge, etc. objects are fine to not use because you can use arrays and you basically just invert the declarations)

type Item = $$Generic;
interface $$Props extends HTMLAttributes<HTMLTableElement> {
type $$Props = HTMLAttributes<HTMLTableElement> & {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the change from interface to type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to switch from legacy over to runes and then decided to go back when it went bad and there were apparently casualties along the way.

updating?: boolean;
maxHeight?: string;
fixed?: boolean;
class?: ClassValue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use ClassNameValue from twmerge

class={merge(
'surface-primary min-h-[154px] grow overflow-auto border border-subtle',
className,
)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just use the regular merge with the different type on classes and we gucci

"@codemirror/lang-go": "^6.0.1",
"@codemirror/lang-java": "^6.0.2",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-php": "^6.0.2",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably don't need these codemirror addons?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like they just got alphabetized

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this happened when I ran install for some reason. But Those aren't new additions.

Copy link
Collaborator

@GiantRobots GiantRobots left a comment

Choose a reason for hiding this comment

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

lgtm

@GraceGardner GraceGardner marked this pull request as ready for review September 11, 2025 16:50
@GraceGardner GraceGardner requested a review from a team as a code owner September 11, 2025 16:50
@GraceGardner GraceGardner merged commit 0f87008 into main Sep 11, 2025
15 checks passed
@GraceGardner GraceGardner deleted the rm-paginated-tbl-postcss branch September 11, 2025 16:51
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