Skip to content

Commit 7089185

Browse files
authored
Fix: various bugs from file tree, editor, lineage, docs (#832)
1 parent 460c05e commit 7089185

File tree

22 files changed

+535
-421
lines changed

22 files changed

+535
-421
lines changed

web/client/openapi.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,6 @@
973973
"items": { "$ref": "#/components/schemas/Column" }
974974
},
975975
"description": { "title": "Description", "type": "string" },
976-
"owner": { "title": "Owner", "type": "string" },
977976
"details": { "$ref": "#/components/schemas/ModelDetails" },
978977
"sql": { "title": "Sql", "type": "string" }
979978
}

web/client/src/context/context.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ interface ContextStore {
2020
initialEndDate?: ContextEnvironmentEnd
2121
models: Map<string, ModelSQLMeshModel>
2222
setModels: (models?: Model[]) => void
23-
refreshModels: () => void
2423
isExistingEnvironment: (
2524
environment: ModelEnvironment | EnvironmentName,
2625
) => boolean
@@ -67,11 +66,6 @@ export const useStoreContext = create<ContextStore>((set, get) => ({
6766
}, new Map()),
6867
}))
6968
},
70-
refreshModels() {
71-
set(() => ({
72-
models: new Map(get().models),
73-
}))
74-
},
7569
getNextEnvironment() {
7670
return get().environments.values().next().value
7771
},

web/client/src/context/editor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ export const useStoreEditor = create<EditorStore>((set, get) => ({
9090
refreshTab() {
9191
const tab = get().tab
9292

93-
tab != null && get().selectTab({ ...tab })
93+
if (tab == null) return
94+
95+
get().selectTab({ ...tab })
9496
},
9597
setDialects(dialects) {
9698
set(() => ({

web/client/src/library/components/documentation/Documentation.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const Documentation = function Documentation({
114114
disabled={isFalse(withCode)}
115115
className={({ selected }) =>
116116
clsx(
117-
'inline-block text-sm font-medium px-3 py-1 mr-2 last-child:mr-0 rounded-md relative',
117+
'inline-block font-medium px-3 py-1 mr-2 last-child:mr-0 rounded-md relative',
118118
selected
119119
? 'bg-secondary-500 text-secondary-100 cursor-default'
120120
: 'bg-secondary-10 ',
@@ -130,7 +130,7 @@ const Documentation = function Documentation({
130130
disabled={isFalse(withQuery)}
131131
className={({ selected }) =>
132132
clsx(
133-
'inline-block text-sm font-medium px-3 py-1 mr-2 last-child:mr-0 rounded-md relative',
133+
'inline-block font-medium px-3 py-1 mr-2 last-child:mr-0 rounded-md relative',
134134
selected
135135
? 'bg-secondary-500 text-secondary-100 cursor-default'
136136
: 'bg-secondary-10 ',
@@ -146,7 +146,7 @@ const Documentation = function Documentation({
146146
<Tab.Panels className="h-full w-full overflow-hidden bg-neutral-10 mt-4 rounded-lg">
147147
<Tab.Panel
148148
className={clsx(
149-
'flex flex-col w-full h-full pt-4 relative px-2 overflow-hidden',
149+
'flex flex-col w-full h-full relative px-2 overflow-hidden p-2',
150150
'ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2',
151151
)}
152152
>
@@ -158,7 +158,7 @@ const Documentation = function Documentation({
158158
<CodeEditor
159159
extensions={extensions.concat(modelExtensions)}
160160
content={content}
161-
className="!text-xs"
161+
className="text-xs"
162162
/>
163163
)}
164164
</CodeEditor.SQLMeshDialect>
@@ -205,7 +205,7 @@ function Headline({ headline }: { headline: string }): JSX.Element {
205205

206206
function NotFound(): JSX.Element {
207207
return (
208-
<Container className="text-sm font-bold whitespace-nowrap w-full h-full">
208+
<Container className="font-bold whitespace-nowrap w-full h-full">
209209
<div className="flex items-center justify-center w-full h-full">
210210
Documentation Not Found
211211
</div>
@@ -249,7 +249,7 @@ function Section({
249249
<>
250250
<Disclosure.Button
251251
className={clsx(
252-
'flex items-center justify-between rounded-lg text-left text-sm w-full bg-neutral-10 px-3 mb-2',
252+
'flex items-center justify-between rounded-lg text-left w-full bg-neutral-10 px-3 mb-2',
253253
className,
254254
)}
255255
>
@@ -262,7 +262,7 @@ function Section({
262262
)}
263263
</div>
264264
</Disclosure.Button>
265-
<Disclosure.Panel className="pb-2 text-sm overflow-hidden">
265+
<Disclosure.Panel className="pb-2 overflow-hidden">
266266
<div className="px-2">{children}</div>
267267
</Disclosure.Panel>
268268
</>

0 commit comments

Comments
 (0)