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

feat: Lit integration #5538

Merged
merged 20 commits into from May 17, 2024
Merged

feat: Lit integration #5538

merged 20 commits into from May 17, 2024

Conversation

kadoshms
Copy link
Contributor

@kadoshms kadoshms commented May 10, 2024

Hey there,

This PR comes along with those two:

  1. feat: lit integration virtual#718 (Virtual)
  2. Upgrade Build system + Lit Integration ranger#91 (Ranger)

And hopefully for the rest of the stack :)

Anyway,
Iv'e set up the scaffolds for creating and integration for Lit, currently with a basic + sorting examples.
I'll add more examples later.

The core idea is using a Reactive Controller to create a reactive Table instance.

Examples Added

  1. Basic
  2. Row Sorting
  3. Row Filtering
  4. Row selection

@kadoshms kadoshms force-pushed the lit-integration branch 2 times, most recently from 6503d0a to a69858d Compare May 10, 2024 07:52
@KevinVandy
Copy link
Member

Wow, I was actually getting ready to reach out after seeing the other lit TanStack PRs. I'm focused on getting Angular Table shipped in the next couple days first, but then will focus on this PR. That PR or the qwik one might be a good guide for this one to follow to make sure we don't forget anything.

@kadoshms
Copy link
Contributor Author

kadoshms commented May 10, 2024

Aweseome @KevinVandy, I also added a filters & selection examples 👍

@KevinVandy KevinVandy changed the title feature: Lit integration feat: Lit integration May 10, 2024
Copy link

nx-cloud bot commented May 12, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 603b25d. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@KevinVandy
Copy link
Member

@kadoshms I spent some time this weekend merging in all the new angular table changes from main, then setting up what I think are all of the correct build configs. And then created the docs templates for what will be needed. The adapter and table-state docs pages need to be filled-in and rewritten by someone who actually knows Lit, so help on that would be appreciated.

@kadoshms
Copy link
Contributor Author

Great, so I'll use the Angular template as a base for Lit docs and add those to the MR.

@KevinVandy
Copy link
Member

Great, so I'll use the Angular template as a base for Lit docs and add those to the MR.

I already committed the files. Copied them over from the qwik table docs and did a search and replace for Lit. But yeah, if we're able to be as detailed as the 2 new angular docs pages, that'd be great.

@KevinVandy
Copy link
Member

@kadoshms How do we get the styles/css to work in these Lit examples?

I wrote the Lit adapter docs and think that they are good. I'm not all the way clear on Lit state vs properties and our best state recommendations, but can work on the lit table-state docs a bit later.

Otherwise, this might be surprising close to shipping already. Let me know if you're able to continue to help this week.

@kadoshms
Copy link
Contributor Author

@KevinVandy - I'll set up the styles (just need to tweak the examples a bit to work properly with the shadow DOM).
As regarding for state - I'll make sure it's all properly documented and working as expected (was AFK the last couple of days)

@kadoshms
Copy link
Contributor Author

@KevinVandy I updated the docs and added some styling to basic example using twind :)

@KevinVandy
Copy link
Member

@kadoshms Great, now I see the basic styles working that are coded in those style tags down below.

Would you be able to add any discussion between getTable and useLitTable and the naming conventions expected in Lit? Just want to make sure the current state of this PR is sure of what it should be.

Considering merging tomorrow, though, we can always use more examples - now or later

I opened a tanstack.com pr in tandem: TanStack/tanstack.com#230

@kadoshms
Copy link
Contributor Author

@KevinVandy I am not sure there is enough out there to come up with a convention, but thinking of the almost vanilla nature of lit, maybe something like getTableInstance or getTableInstanceWithOptions would be even more appropriate, as ultimately this function does that - creates the instance if not exist, updates the options and returns it.

WDYT?

@kadoshms
Copy link
Contributor Author

Added another example for Column Resizing. Any other example that you think I should add at this phase?

@KevinVandy
Copy link
Member

KevinVandy commented May 16, 2024

Lol. We don't need to get too complicated with the name. If anything, might I suggest LitTableController.createTable.

I just had not seen "use" anywhere else in lit docs, and just wanted to make sure.

What does TanStack Lit Form do?

It appears that form would suggest TanStackTableController.something

@kadoshms
Copy link
Contributor Author

Naming is always fun 😄
Actually I liked this pattern, changed that to TableController.table it's actually kind of neat.

@KevinVandy KevinVandy merged commit bc4f3df into TanStack:main May 17, 2024
2 checks passed
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.

None yet

2 participants