tablelandnetwork / studio

Discover, design, deploy, and manage data driven web3 apps on Tableland.
https://studio.tableland.xyz
4 stars 1 forks source link

Use/import table #231

Closed asutula closed 6 months ago

asutula commented 6 months ago

The new feature here is a popover menu on the tableland table page/deployment page that allows the user to import the table into an existing project or use the table schema in a new table within a project.

This led to upgrades to trpc and iron-session, which caused lots of files to be touched.

I commented on every file with changes worth knowing about and reviewing. If a file has no comments, it's because the changes were already discussed in a previous file (usually just some naming change or api usage refactor), so you can breeze past those.

vercel[bot] commented 6 months ago

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

Name Status Preview Comments Updated (UTC)
studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 30, 2024 2:22am
railway-app[bot] commented 6 months ago

This PR is being deployed to Railway 🚅

web: ◻️ REMOVED

asutula commented 6 months ago

@joewagner I'm having trouble understanding why/where the tests are failing. Let me know if you can tell.

asutula commented 6 months ago

@joewagner I'm having trouble understanding why/where the tests are failing. Let me know if you can tell.

Oh I see some needed updates that need to be made to the tests. Trying now...

joewagner commented 6 months ago

Below is a screen grab of the slide out when importing a an existing table. Screen Shot 2024-03-28 at 10 45 33 AM

I'm confused why there is an option to select chain id and table id. If you're importing a table doesn't that mean that you would be using an existing tableland table in a project?

joewagner commented 6 months ago

I found what might be an existing bug: If I import tables into a project, then I go to the project page via the normal navigation links, I don't see any of the tables. When I do a hard refresh on the page the imported tables are in the project.

joewagner commented 6 months ago

I found what might be an existing bug: If I import tables into a project, then I go to the project page via the normal navigation links, I don't see any of the tables. When I do a hard refresh on the page the imported tables are in the project.

I can confirm this issue does not exist on production, but the same thing happens when I import a schema.

asutula commented 6 months ago

Will try to reproduce those bugs @joewagner, thanks.

asutula commented 6 months ago

Below is a screen grab of the slide out when importing a an existing table. Screen Shot 2024-03-28 at 10 45 33 AM

I'm confused why there is an option to select chain id and table id. If you're importing a table doesn't that mean that you would be using an existing tableland table in a project?

Yea, we preset those fields to the correct values, we could go an additional step and make them non editable?

asutula commented 6 months ago

I found what might be an existing bug: If I import tables into a project, then I go to the project page via the normal navigation links, I don't see any of the tables. When I do a hard refresh on the page the imported tables are in the project.

Fixed. Good catch.

asutula commented 6 months ago

I found what might be an existing bug: If I import tables into a project, then I go to the project page via the normal navigation links, I don't see any of the tables. When I do a hard refresh on the page the imported tables are in the project.

I can confirm this issue does not exist on production, but the same thing happens when I import a schema.

Also fixed.

asutula commented 6 months ago

Below is a screen grab of the slide out when importing a an existing table. Screen Shot 2024-03-28 at 10 45 33 AM I'm confused why there is an option to select chain id and table id. If you're importing a table doesn't that mean that you would be using an existing tableland table in a project?

Yea, we preset those fields to the correct values, we could go an additional step and make them non editable?

Went ahead and disabled those form inputs if chain and table id presets are provided.

asutula commented 6 months ago

Note: @joewagner this branch was just rebased and then force-pushed to origin.

asutula commented 6 months ago

Ok, I think all feedback so far has been addressed. Looking good with the new theme too.