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

DX-1307: New databrowser design #100

Closed
wants to merge 86 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
0bce091
WIP
ytkimirti Oct 14, 2024
d699648
WIP
ytkimirti Oct 14, 2024
a495894
WIP
ytkimirti Oct 14, 2024
b2cbb8f
WIP
ytkimirti Oct 15, 2024
25cfee2
WIP
ytkimirti Oct 15, 2024
70a65d9
WIP
ytkimirti Oct 15, 2024
e56dccc
WIP
ytkimirti Oct 16, 2024
fab95e6
WIP
ytkimirti Oct 21, 2024
dc1b5e9
WIP
ytkimirti Oct 21, 2024
d4d422c
WIP
ytkimirti Oct 21, 2024
dd83a14
WIP
ytkimirti Oct 21, 2024
d67b9fa
WIP
ytkimirti Oct 21, 2024
b720b05
WIP
ytkimirti Oct 21, 2024
ea60485
WIP
ytkimirti Oct 21, 2024
22c8574
format
ytkimirti Oct 21, 2024
61d65d0
WIP
ytkimirti Oct 21, 2024
3a92972
add new key modal
ytkimirti Oct 21, 2024
abae893
add ttl
ytkimirti Oct 22, 2024
a1fda37
WIP
ytkimirti Oct 22, 2024
6d1ad0a
WIP
ytkimirti Oct 22, 2024
396e43c
review
ytkimirti Oct 22, 2024
b97937c
WIP
ytkimirti Oct 22, 2024
d18acba
WIP
ytkimirti Oct 23, 2024
eb7f39a
WIP
ytkimirti Oct 23, 2024
1bf6aec
eslitn
ytkimirti Oct 23, 2024
dad9c1f
WIP
ytkimirti Oct 23, 2024
ab4d7de
WIP
ytkimirti Oct 23, 2024
f86e0a5
fix scoping
ytkimirti Oct 24, 2024
5604393
add ignore folder
ademilter Oct 24, 2024
e3e42bd
add example env
ademilter Oct 24, 2024
3e430d7
Merge branch 'DX-1307' of https://github.com/upstash/react-ui into DX…
ademilter Oct 24, 2024
11597e5
fix
ademilter Oct 24, 2024
f36fa14
fix
ademilter Oct 24, 2024
c7673f9
update turbo
ytkimirti Oct 24, 2024
3099ea4
tmp remove hooks
ytkimirti Oct 24, 2024
e348693
Merge branch 'DX-1307' of https://github.com/upstash/react-ui into DX…
ademilter Oct 24, 2024
a3cbacf
fix vite config
ytkimirti Oct 28, 2024
f19eb55
prettier
ademilter Oct 28, 2024
93f5ea6
add prettier back
ytkimirti Oct 30, 2024
bae381f
add husky
ytkimirti Oct 30, 2024
acf3827
fix tsup config
ytkimirti Oct 30, 2024
451c8cd
fix lint
ytkimirti Oct 30, 2024
43c57bb
update husky and react
ytkimirti Oct 30, 2024
e9ceef3
increase react compat range
ytkimirti Oct 30, 2024
a7592b0
remove example deployment link
ytkimirti Oct 30, 2024
8b84020
update versions
ytkimirti Oct 30, 2024
141fd52
fix lint staged
ytkimirti Oct 30, 2024
2eadec0
fix
ytkimirti Oct 30, 2024
05d1cd4
update
ytkimirti Oct 30, 2024
77dbee6
fix example
ytkimirti Oct 30, 2024
123aca5
style
ademilter Nov 5, 2024
d95cd31
style
ademilter Nov 5, 2024
48443e3
style
ademilter Nov 5, 2024
e71d92b
style
ademilter Nov 5, 2024
c6520e5
style
ademilter Nov 5, 2024
3a857bd
style
ademilter Nov 5, 2024
0640885
style
ademilter Nov 5, 2024
f9ec462
style
ademilter Nov 5, 2024
af7f6fd
style
ademilter Nov 6, 2024
9f756a3
add alert dialogue for key deletion
ytkimirti Nov 7, 2024
e78b2fb
address review
ytkimirti Nov 7, 2024
5ef78c7
add deletion support to list items
ytkimirti Nov 7, 2024
5d8e777
add different widths for different lists
ytkimirti Nov 7, 2024
43e3837
removed unnecessary libraries
ademilter Nov 7, 2024
bd4c42a
style remove button
ademilter Nov 7, 2024
1abf165
fix
ademilter Nov 7, 2024
631d020
show created key at the top
ytkimirti Nov 7, 2024
6dff586
Merge branch 'DX-1307' of github.com:upstash/react-ui into DX-1307
ytkimirti Nov 7, 2024
e8992a7
add right click context menu to sidebar and items list
ytkimirti Nov 7, 2024
f7587f9
add clear button to search
ytkimirti Nov 7, 2024
6f76cab
cleanup
ytkimirti Nov 7, 2024
7925ab2
add copy buttons to editor
ytkimirti Nov 7, 2024
d99a97a
style
ademilter Nov 7, 2024
cd819ed
Merge branch 'DX-1307' of https://github.com/upstash/react-ui into DX…
ademilter Nov 7, 2024
7bf7e28
style copy button
ademilter Nov 7, 2024
0bd22d1
fix stream ikon & color
ademilter Nov 7, 2024
d2f6dfc
use score ordering for zset
ytkimirti Nov 8, 2024
f048dd6
add scroll to new added element
ytkimirti Nov 8, 2024
da2bc4f
modify cache when adding new key
ytkimirti Nov 8, 2024
fa3a9d1
Merge branch 'DX-1307' of github.com:upstash/react-ui into DX-1307
ytkimirti Nov 8, 2024
ffba69f
support adding new stream item
ytkimirti Nov 8, 2024
85846e3
disable context menu when type is stream
ytkimirti Nov 8, 2024
fa5bcff
allow display edit when adding a stream
ytkimirti Nov 8, 2024
587c619
change default values for add stream form
ytkimirti Nov 8, 2024
ec4eb55
address review
ytkimirti Nov 8, 2024
749f150
small fix
ytkimirti Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# misc
.DS_Store
*.pem
.idea

# debug
npm-debug.log*
Expand Down
7 changes: 1 addition & 6 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

if [ -z "$DISABLE_HUSKY" ]; then
npx lint-staged
fi
pnpm lint-staged
8 changes: 0 additions & 8 deletions .husky/pre-push

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

37 changes: 0 additions & 37 deletions biome.json

This file was deleted.

39 changes: 1 addition & 38 deletions examples/nextjs13/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
This is an example nextjs project for `@upstash/react-databrowser` and `@upstash/react-cli`
12 changes: 7 additions & 5 deletions examples/nextjs13/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import "@upstash/react-cli/dist/index.css";
import { Inter } from "next/font/google";
import "./global.css";
import "@upstash/react-cli/dist/index.css"

import { Inter } from "next/font/google"

import "./global.css"

const inter = Inter({
subsets: ["latin"],
});
})

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
Expand Down Expand Up @@ -51,5 +53,5 @@ export default function RootLayout({ children }: { children: React.ReactNode })
</main>
</body>
</html>
);
)
}
11 changes: 5 additions & 6 deletions examples/nextjs13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@
"test": "playwright test"
},
"dependencies": {
"@next/font": "13.3.0",
"@types/node": "18.15.11",
"@types/react": "18.0.37",
"@types/react-dom": "18.0.11",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@upstash/react-cli": "workspace:*",
"@upstash/react-databrowser": "workspace:*",
"next": "13.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"typescript": "5.0.4"
},
"devDependencies": {
"playwright": "^1.38.1",
"@playwright/test": "^1.38.1",
"autoprefixer": "^10.4.14",
"playwright": "^1.38.1",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.1"
}
Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,32 @@
"private": true,
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev --parallel",
"test": "turbo run test",
"fmt": "pnpm biome check . --apply-unsafe ",
"prepare": "husky install",
"lint": "turbo run lint --filter='./packages/*'",
"dev": "turbo run dev --filter='example/nextjs13'",
"fmt": "prettier --write ./packages",
"prepare": "husky",
"bump-versions": "pnpm changeset version && pnpm install"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
"husky": "^8.0.1",
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
"@typescript-eslint/eslint-plugin": "8.4.0",
"@typescript-eslint/parser": "8.4.0",
"eslint": "9.10.0",
"eslint-plugin-unicorn": "55.0.0",
"husky": "^9.1.6",
"lint-staged": "^13.0.3",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.5",
"turbo": "^1.9.3",
"@biomejs/biome": "^1.2.2"
"turbo": "^2.2.3"
},
"lint-staged": {
"**/*.{js,ts,tsx}": [
"pnpm fmt",
"prettier --write --ignore-unknown"
"prettier --write"
]
},
"engines": {
"node": ">=18.0.0"
},
"packageManager": "pnpm@9.0.0"
}
}
26 changes: 11 additions & 15 deletions packages/react-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
</div>
<br/>


![Upstash Redis CLI](img/cli.png)


## 1. Install

```sh-session
Expand All @@ -24,22 +22,21 @@ $ npm install @upstash/react-cli
// /app/components/cli.tsx

"use client"
import { RedisCli } from "@upstash/react-cli";

import "@upstash/react-cli/dist/index.css";
import { RedisCli } from "@upstash/react-cli"

import "@upstash/react-cli/dist/index.css"

<div
style={{
width: "100%",
height: "100%",
maxWidth: "48rem",
maxHeight: "32rem",
}}
>
;<div
style={{
width: "100%",
height: "100%",
maxWidth: "48rem",
maxHeight: "32rem",
}}
>
<RedisCli url="UPSTASH_REDIS_REST_URL" token="UPSTASH_REDIS_REST_TOKEN" />;
</div>

```

## With Tailwind CSS
Expand All @@ -56,5 +53,4 @@ module.exports = {
],
//...
}

```
```
2 changes: 1 addition & 1 deletion packages/react-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"dependencies": {
"@radix-ui/react-scroll-area": "^1.0.3"
}
}
}
Loading
Loading