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: update models list ui/ux #1136

Merged
merged 154 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
3117cbc
initial models list update
orangecoloured May 3, 2024
887de53
implemented UI for model deletion
orangecoloured May 6, 2024
ef34f78
model list updated time, fix human readable date function
orangecoloured May 6, 2024
049daba
create model test
orangecoloured May 7, 2024
f9b54fe
models request filter and visibility params
orangecoloured May 7, 2024
646d439
models pagination
orangecoloured May 7, 2024
bff7890
reset current page on filters change
orangecoloured May 8, 2024
a4d4c7e
refactor pagination, remove model table component
orangecoloured May 10, 2024
8a727af
add models list pagination to repo
orangecoloured May 10, 2024
4931164
add region and hardware title getters, fix pagination
orangecoloured May 10, 2024
861d31a
type fixes, files cleanup
orangecoloured May 13, 2024
e6830c4
refetch type fix
orangecoloured May 13, 2024
022cc2a
fix formatting
orangecoloured May 13, 2024
1f3dff3
add prettier pre-commit format
orangecoloured May 13, 2024
bfa178c
prettier test
orangecoloured May 13, 2024
1147474
type fix
orangecoloured May 13, 2024
61e2655
test prettier
orangecoloured May 13, 2024
5ed1933
test prettier
orangecoloured May 13, 2024
b55c86c
test prettier
orangecoloured May 13, 2024
ce89764
rename useModels to useInfiniteModels
orangecoloured May 13, 2024
39971b3
fixes + prettier format update
orangecoloured May 14, 2024
a2449a3
prrettier test
orangecoloured May 14, 2024
490e5bb
prrettier test
orangecoloured May 14, 2024
a2cfd38
prettier test
orangecoloured May 14, 2024
9b6742a
prettier test
orangecoloured May 14, 2024
d6415fd
updated lint-staged config
orangecoloured May 14, 2024
3ca81fc
update lock file
orangecoloured May 14, 2024
37812eb
remove CreateForm1
orangecoloured May 15, 2024
6766c83
remove unneeded selector prop
orangecoloured May 15, 2024
4e48541
simplify the onDelete callback type
orangecoloured May 15, 2024
66f9e7b
feat: update model creation page (#1138)
orangecoloured May 15, 2024
b90e438
use toastInstillError
orangecoloured May 15, 2024
dd1e297
simplify model create query
orangecoloured May 15, 2024
db5468c
update creation form
orangecoloured May 15, 2024
4deb8f1
fix typo
orangecoloured May 15, 2024
db858b1
types fixes
orangecoloured May 15, 2024
f51c273
get entiry from useAppEntity
orangecoloured May 17, 2024
ab4e5e0
feat: new model page (#1158)
orangecoloured May 17, 2024
c2e462d
fix model link
orangecoloured May 17, 2024
0cce235
show links in the top area
orangecoloured May 17, 2024
46de86a
API view
orangecoloured May 17, 2024
6dea0a4
fix button size prop
orangecoloured May 17, 2024
071eaa9
style tweaks, add toast on model update
orangecoloured May 17, 2024
a6c7c30
model image upload
orangecoloured May 20, 2024
814c1ac
placeholder for the empty model list, mark required fields
orangecoloured May 20, 2024
480148a
rendering tweaks
orangecoloured May 20, 2024
10443a0
update image handling
orangecoloured May 20, 2024
14aadc1
use Link instead of an a tag
orangecoloured May 20, 2024
bf67539
task tag icon colour fix
orangecoloured May 21, 2024
0ff93c8
no versions placeholder
orangecoloured May 21, 2024
b19b992
update DataTable component
orangecoloured May 21, 2024
6d01d8e
updated readme editor, added readme editor to model overview
orangecoloured May 22, 2024
2f29a0a
update the API view
orangecoloured May 23, 2024
ae3c172
update overview tab
orangecoloured May 23, 2024
81acbed
trigger model update
orangecoloured May 24, 2024
b71df2d
forgot to add this
orangecoloured May 24, 2024
c027ba1
style tweak
orangecoloured May 24, 2024
34b0c4d
invalidate models list query to have up to date data on model update
orangecoloured May 24, 2024
1b97a7e
debug cleanup
orangecoloured May 24, 2024
3b0aecb
fix getting null instead of an object
orangecoloured May 24, 2024
234e198
memoize variable for other hooks to pick it up
orangecoloured May 24, 2024
7936019
fixes
orangecoloured May 24, 2024
b29439d
remove unnecessary import
orangecoloured May 24, 2024
91d62f3
TS fixes
orangecoloured May 24, 2024
835471e
TS fixes
orangecoloured May 24, 2024
8ea52d2
TS update
orangecoloured May 24, 2024
4098541
update the overview tab
orangecoloured May 25, 2024
87df465
minor fixes, add user models endpoint
orangecoloured May 27, 2024
947bde1
style fixes
orangecoloured May 27, 2024
fcc2890
TS fix
orangecoloured May 27, 2024
ad52e3b
packages versions bump up, model page tabs + url behaviour
orangecoloured May 27, 2024
b47e300
TS fix
orangecoloured May 27, 2024
40696a2
fix formating
orangecoloured May 27, 2024
2241198
spacing fix
orangecoloured May 27, 2024
2041d97
decoupled entity selector
orangecoloured May 27, 2024
3620968
updated and added model table to the user profile view
orangecoloured May 28, 2024
d6a5339
hub update, component fixes, tweaks, updates
orangecoloured May 28, 2024
4d1c2c8
rebase
orangecoloured May 28, 2024
7839815
null related fixes
orangecoloured May 28, 2024
40ddee7
fix bugs, add sort by to models query
orangecoloured May 29, 2024
196bc18
remove hub
orangecoloured May 29, 2024
8a12e71
watch model states in the table
orangecoloured May 29, 2024
0efa5df
feat: add organization sub tier
EiffelFly May 29, 2024
0a4db89
fix: fix org plan typo
EiffelFly May 29, 2024
58e4baa
export modelstable from toolkit
orangecoloured May 30, 2024
c795d16
export useUserModels from toolkit
orangecoloured May 30, 2024
1a5ae6e
fix watchstate reference?
orangecoloured May 30, 2024
7eb72e5
put back visibility field in the edit form
orangecoloured May 30, 2024
bd23b69
fix TS
orangecoloured May 30, 2024
a1a48b9
output no data update
orangecoloured May 31, 2024
b7ed5c5
update model state label
orangecoloured Jun 1, 2024
0f5da13
update lint-staged config
orangecoloured Jun 1, 2024
9bd3db3
lint staged test
orangecoloured Jun 1, 2024
ea3fa3b
rename create model button
orangecoloured Jun 3, 2024
c10577e
models search bar height fix
orangecoloured Jun 3, 2024
ad59db3
fix model table layout
orangecoloured Jun 3, 2024
fcf7998
remove featured tab when the models tab is active
orangecoloured Jun 3, 2024
b6f2fff
fix model title colour
orangecoloured Jun 3, 2024
f887d9f
add icon to model public tag
orangecoloured Jun 3, 2024
0fb7ad3
fix avatar css, contain -> cover
orangecoloured Jun 3, 2024
7b84d72
update hub items count (not complete, need data from BE)
orangecoloured Jun 3, 2024
fc78c33
model card style fixes
orangecoloured Jun 3, 2024
82d8f23
curl generator refactoring
orangecoloured Jun 3, 2024
54a8138
add a helper for the AI task label
orangecoloured Jun 3, 2024
5a4e018
update package versions
orangecoloured Jun 3, 2024
18e881f
fix overview trigger form enabled state
orangecoloured Jun 3, 2024
060c9aa
fix watch model state query
orangecoloured Jun 3, 2024
07a2900
hide hub top tabs if model list is selested
orangecoloured Jun 4, 2024
a9c2f6f
allow default zero values in useInstillForm
orangecoloured Jun 4, 2024
7ad0c45
async trgger model flow
orangecoloured Jun 5, 2024
8ada133
initial models list update
orangecoloured May 3, 2024
d11def6
implemented UI for model deletion
orangecoloured May 6, 2024
6ae9e2c
create model test
orangecoloured May 7, 2024
ada2a3e
models pagination
orangecoloured May 7, 2024
6c1f84c
refactor pagination, remove model table component
orangecoloured May 10, 2024
01f4d69
add region and hardware title getters, fix pagination
orangecoloured May 10, 2024
899d078
type fixes, files cleanup
orangecoloured May 13, 2024
53ecbda
fix formatting
orangecoloured May 13, 2024
c118ea8
test prettier
orangecoloured May 13, 2024
7f60845
test prettier
orangecoloured May 13, 2024
0d914a0
test prettier
orangecoloured May 13, 2024
318813d
fixes + prettier format update
orangecoloured May 14, 2024
1d963d2
prrettier test
orangecoloured May 14, 2024
c455c2d
prettier test
orangecoloured May 14, 2024
b7dda52
prettier test
orangecoloured May 14, 2024
232a3b7
updated lint-staged config
orangecoloured May 14, 2024
a0404f5
remove CreateForm1
orangecoloured May 15, 2024
56e6100
simplify the onDelete callback type
orangecoloured May 15, 2024
fd0c4f6
feat: update model creation page (#1138)
orangecoloured May 15, 2024
96c668c
feat: new model page (#1158)
orangecoloured May 17, 2024
ac597ce
show links in the top area
orangecoloured May 17, 2024
25ad7a2
API view
orangecoloured May 17, 2024
2358af0
style tweaks, add toast on model update
orangecoloured May 17, 2024
d1d306e
model image upload
orangecoloured May 20, 2024
4ebdd41
rendering tweaks
orangecoloured May 20, 2024
70ff376
task tag icon colour fix
orangecoloured May 21, 2024
b989411
no versions placeholder
orangecoloured May 21, 2024
7ea05a2
update DataTable component
orangecoloured May 21, 2024
fadb7e2
updated readme editor, added readme editor to model overview
orangecoloured May 22, 2024
5316209
TS fixes
orangecoloured May 24, 2024
20e8f05
null related fixes
orangecoloured May 28, 2024
b202f57
remove hub
orangecoloured May 29, 2024
74cb06d
put back visibility field in the edit form
orangecoloured May 30, 2024
dcd6b7b
lint staged test
orangecoloured Jun 1, 2024
5371421
chore: push new version
EiffelFly Jun 4, 2024
d60b296
chore: bump rc version
EiffelFly Jun 5, 2024
37506bb
fixes
orangecoloured Jun 5, 2024
cae8ed7
remove comment
orangecoloured Jun 5, 2024
92f2a0a
update package versions
orangecoloured Jun 5, 2024
b500836
bump up toolkit version
orangecoloured Jun 5, 2024
755fd45
minor fixes
orangecoloured Jun 5, 2024
6bf73e5
fix instill form test
orangecoloured Jun 6, 2024
ac2745c
fix(auto-gen-form): fix model trigger can not get into auto-gen-form …
EiffelFly Jun 6, 2024
3194818
toolkit vesion bump up
orangecoloured Jun 6, 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
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
pnpm lint-staged
5 changes: 5 additions & 0 deletions apps/console/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
var path = require("path");

module.exports = {
root: true,
extends: ["next/core-web-vitals"],
ignorePatterns: [".eslintrc.cjs"],
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
};
1 change: 0 additions & 1 deletion apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"eslint": "^8.13.0",
"eslint-config-next": "latest",
"js-yaml": "^4.1.0",
"lint-staged": ">=10",
"npm-run-all": "^4.1.5",
"openapi-types": "^12.1.3",
"postcss": "^8.4.12",
Expand Down
12 changes: 12 additions & 0 deletions apps/console/public/images/models/model-placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 109 additions & 0 deletions apps/console/public/images/models/no-models-placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions apps/console/public/images/models/no-result.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { ModelViewPageRender } from "./render";
import { Metadata } from "next";
import {
type ModelTabNames,
getModelTabTitle,
} from "@instill-ai/toolkit/server";

type Props = {
params: { id: string; entity: string };
params: { id: string; entity: string; tab: string };
};

export async function generateMetadata({ params }: Props): Promise<Metadata> {
const metadata: Metadata = {
title: `Instill Core | ${params.id}`,
title: `Instill Core | ${params.id} | ${getModelTabTitle(params.tab as ModelTabNames)}`,

openGraph: {
images: ["/instill-open-graph.png"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export function ModelViewPageRender() {
router={router}
accessToken={accessToken.isSuccess ? accessToken.data : null}
enableQuery={accessToken.isSuccess}
disabledConfigureModel={false}
/>
</PageBase.Content>
</PageBase.Container>
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/components/AuthPageBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Content = ({ children }: { children: React.ReactNode }) => {

<div className="flex flex-row">
<p className="text-semantic-fg-disabled product-body-text-3-regular mr-auto mt-auto p-8 font-sans">
© Instill AI 2023
© Instill AI {new Date().getFullYear()}
</p>
<Image
src="/images/auth-page-bg-strip.svg"
Expand Down
2 changes: 1 addition & 1 deletion apps/console/src/components/ModelReadmeMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ModelReadmeMarkdown = ({
<h3 className="text-instillGrey90 text-instill-h3 mx-auto mt-auto">
There is no Model card
</h3>
<p className="text-instillGrey50 text-instill-body mx-auto mb-auto">
<p className="mx-auto mb-auto text-semantic-node-disconnected-default-stroke text-instill-body">
You can add a README.md to describe the model.
</p>
</React.Fragment>
Expand Down
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"test": "turbo run test",
"ci-build-packages": "turbo run build lint test",
"ci-build-storybook": "turbo run build --filter=@instill-ai/design-tokens --filter=@instill-ai/design-system",
"prettier:fix": "prettier --write"
"prettier:fix": "prettier --write",
"prepare": "husky install"
},
"devDependencies": {
"@commitlint/cli": "latest",
Expand All @@ -44,5 +45,13 @@
"vite": "^5.2.0",
"express": "4.19.2"
}
},
"lint-staged": {
"**/*.{ts,tsx}": [
"prettier --write"
],
"**/*.{js,jsx,ts,tsx}": [
"eslint --cache --fix"
]
}
}
}
5 changes: 5 additions & 0 deletions packages/design-system/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
var path = require("path");

module.exports = {
root: true,
extends: ["@instill-ai/eslint-config-cortex", "plugin:storybook/recommended"],
ignorePatterns: [".eslintrc.cjs"],
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
};
7 changes: 1 addition & 6 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@instill-ai/design-system",
"version": "0.69.2",
"version": "0.69.2-rc.4",
"description": "Instill AI's design system",
"repository": "https://github.com/instill-ai/design-system.git",
"bugs": "https://github.com/instill-ai/design-system/issues",
Expand Down Expand Up @@ -140,11 +140,6 @@
"engines": {
"node": ">=14.6.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --cache --fix"
]
},
"publishConfig": {
"access": "public"
}
Expand Down
Loading
Loading