-
Notifications
You must be signed in to change notification settings - Fork 1
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
Console refresh #301
Console refresh #301
Conversation
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
@@ -7,7 +7,7 @@ export default async function LayoutTeam({ | |||
}) { | |||
return ( | |||
<div className="flex flex-1"> | |||
<div className="sticky top-[3.5rem] h-[calc(100vh-3.55rem)] w-52 flex-shrink-0 overflow-y-auto overflow-x-hidden bg-card"> | |||
<div className="sticky top-[3.507rem] h-[calc(100vh-3.507rem)] w-52 flex-shrink-0 overflow-y-auto overflow-x-hidden bg-card"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unreleated. Just finding the right magic number for our header height so things that sit below it are positioned properly.
userForAddress: publicProcedure | ||
.input(z.object({ address: z.string().trim().min(1) })) | ||
.query(async ({ input }) => { | ||
const res = await store.users.userForAddress(input.address); | ||
return res; | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a new API, and you'll see the store
support for it as well.
const ConsoleTabs = dynamic( | ||
async () => await import("@/components/console-tabs"), | ||
{ | ||
ssr: false, | ||
}, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The console tabs data are stored in local storage, so we can't have them rendered on the server at all, or we'll get a hydration mismatch error. This NextJS helper is a nice way of doing that.
|
||
return ( | ||
<main className="flex-1 p-4"> | ||
<Console environmentId={environment.id} /> | ||
<main className="flex min-h-[calc(100vh-3.507rem)] p-4"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a console interface, I want to to always take up at least all the available screen height. Required using this magic number to account for the height of our sticky header.
packages/web/app/prism.css
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to an easier to use/cleaner code editing component that doesn't require this external css and js.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use the new WalletStatus
component to display the connect wallet status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New component that displays the currently connect wallet address as well as other information related to it. We can use this anywhere we support on chain interactions (editing table data, deploying tables, console, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a helper to do the thing we always need to do. We should put this in a shared package at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A custom hook that returns the table permissions for whatever the connected account is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A custom hook that wraps the wagmi useAccount
to make it easier to use and deal with the hydration mismatch error caused by the wagmi version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done! Lot's of great improvements here
* (nonce) ensure incrby does not remove ttl (#303) * Console refresh (#301) * wip on new console Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * better layout for console and data table Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * more query validation, multiple statement support Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * remove old files Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * remove old code editor and deps Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * layout fix Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * working tabs Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * support esc key to cancel edit tab name Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * persisted tab data Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * shared wallet status component and supporting changes Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * little css cleanup Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * store tab data per project Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * combining conditional logic Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com> * native mode as project setting, scope tab results to env Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * support native mode in studio aliases Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * cli fix Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * add native_mode columns to cli tests Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Joe Wagner <joewagner@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com>
* (nonce) ensure incrby does not remove ttl (#303) * Console refresh (#301) * wip on new console Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * better layout for console and data table Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * more query validation, multiple statement support Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * remove old files Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * remove old code editor and deps Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * layout fix Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * working tabs Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * support esc key to cancel edit tab name Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * persisted tab data Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * shared wallet status component and supporting changes Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * little css cleanup Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * store tab data per project Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * combining conditional logic Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com> * native mode as project setting, scope tab results to env Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * support native mode in studio aliases Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * cli fix Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * add native_mode columns to cli tests Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Joe Wagner <joewagner@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com>
* Native mode (#308) * (nonce) ensure incrby does not remove ttl (#303) * Console refresh (#301) * wip on new console Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * better layout for console and data table Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * more query validation, multiple statement support Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * remove old files Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * remove old code editor and deps Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * layout fix Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * working tabs Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * support esc key to cancel edit tab name Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * persisted tab data Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * shared wallet status component and supporting changes Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * little css cleanup Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * store tab data per project Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * combining conditional logic Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com> * native mode as project setting, scope tab results to env Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * support native mode in studio aliases Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * cli fix Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * add native_mode columns to cli tests Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Joe Wagner <joewagner@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com> * try out trpc utils invalidate Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> * fix missing nativeMode form value Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> --------- Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com> Co-authored-by: Aaron Sutula <528969+asutula@users.noreply.github.com> Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com>
In the process of hunting down our data table bug, I started writing a stripped down version of the console that used typescript very thoroughly, and had a more simple view hierarchy. This made it easier to hunt down that bug. Turned out it was a good starting place for an updated console that is more consistent with our visual style. Adds support for multiple mutating statements.