Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix-first-load-highli…
Browse files Browse the repository at this point in the history
…ghting

> Conflicts:
>	frontend/packages/erd-core/src/components/ERDRenderer/ERDContent/Toolbar/TidyUpButton/TidyUpButton.tsx
  • Loading branch information
MH4GF committed Dec 20, 2024
2 parents 82ec743 + 3289d08 commit 98db85c
Show file tree
Hide file tree
Showing 32 changed files with 95 additions and 86 deletions.
6 changes: 0 additions & 6 deletions frontend/.changeset/brave-guests-explode.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/calm-books-occur.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/dry-islands-flash.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/dry-ligers-work.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/eighty-bottles-hope.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/few-apples-exercise.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/gentle-monkeys-remember.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/hungry-dots-help.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/mean-rings-walk.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/six-rocks-shake.md

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/.changeset/tricky-windows-smash.md

This file was deleted.

18 changes: 18 additions & 0 deletions frontend/packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @liam-hq/cli

## 0.0.13

### Patch Changes

- e2d2c06: 🐛 bug-fix: Highlight source cardinality with multi-foreign keys
- 90ccd89: refactor: Update handleLayout to accept nodes and improve hidden node handling
- 486286a: 📈 : Add open related tables log event
- 0a129c2: ✨ Enhance node conversion functions to support hierarchical structure and layout options for NonRelatedTableGroup nodes
- fb03451: 📈 Add cliVer parameter to log event functions and component.s
- 704f606: :chart_with_upwards_trend: add type for reposition table logging
- b63e2da: fix: Render CardinalityMarkers based on loading state
- ee77b3f: Show column types in table nodes when the table is highlighted
- 116365d: 📈 Add appEnv parameter to logging events for environment tracking
- 54d6ca9: ✨ Add NonRelatedTableGroupNode component with styling
- 582ac0e: 📈 Add click logging for toolbar actions and include show mode in event data
- bc2118d: 🐛 Fixed problem with active tables not being highlighted in LeftPane when opened via query parameter
- d0a27e0: maintenance: Add GitHub Release Link and Disable some features

## 0.0.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@liam-hq/cli",
"license": "Apache-2.0",
"private": false,
"version": "0.0.12",
"version": "0.0.13",
"type": "module",
"publishConfig": {
"access": "public"
Expand Down
18 changes: 18 additions & 0 deletions frontend/packages/erd-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @liam-hq/erd-core

## 0.0.8

### Patch Changes

- e2d2c06: 🐛 bug-fix: Highlight source cardinality with multi-foreign keys
- 90ccd89: refactor: Update handleLayout to accept nodes and improve hidden node handling
- 486286a: 📈 : Add open related tables log event
- 0a129c2: ✨ Enhance node conversion functions to support hierarchical structure and layout options for NonRelatedTableGroup nodes
- fb03451: 📈 Add cliVer parameter to log event functions and component.s
- 704f606: :chart_with_upwards_trend: add type for reposition table logging
- b63e2da: fix: Render CardinalityMarkers based on loading state
- ee77b3f: Show column types in table nodes when the table is highlighted
- 116365d: 📈 Add appEnv parameter to logging events for environment tracking
- 54d6ca9: ✨ Add NonRelatedTableGroupNode component with styling
- 582ac0e: 📈 Add click logging for toolbar actions and include show mode in event data
- bc2118d: 🐛 Fixed problem with active tables not being highlighted in LeftPane when opened via query parameter
- d0a27e0: maintenance: Add GitHub Release Link and Disable some features

## 0.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/erd-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@liam-hq/erd-core",
"private": true,
"version": "0.0.7",
"version": "0.0.8",
"type": "module",
"main": "src/index.ts",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ export const CopyLinkButton: FC = () => {
clickLogEvent({
element: 'copyLinkButton',
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
}, [toast, cliVersion.version])
}, [toast, cliVersion.version, cliVersion.envName])

return (
<TooltipProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ export const ERDContentInner: FC<Props> = ({
ref: 'mainArea',
tableId,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
},
[cliVersion.version],
[cliVersion.version, cliVersion.envName],
)

const handlePaneClick = useCallback(() => {
Expand Down Expand Up @@ -137,10 +138,11 @@ export const ERDContentInner: FC<Props> = ({
tableId,
operationId,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
}
},
[cliVersion.version],
[cliVersion.version, cliVersion.envName],
)

const panOnDrag = [1, 2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export const RelatedTables: FC<Props> = ({ table }) => {
openRelatedTablesLogEvent({
tableId: table.name,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
}, [nodes, getNodes, table.name, cliVersion.version])
}, [nodes, getNodes, table.name, cliVersion.version, cliVersion.envName])

return (
<div className={styles.wrapper}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const TableDetail: FC<Props> = ({ table }) => {
clickLogEvent({
element: 'closeTableDetailButton',
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ export const FitviewButton: FC = () => {
element: 'fitview',
showMode,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
fitView()
}, [fitView, showMode, cliVersion.version])
}, [fitView, showMode, cliVersion.version, cliVersion.envName])

return (
<ToolbarButton asChild onClick={handleClick}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ export const ShowModeMenu: FC = () => {
element: 'changeShowMode',
showMode: value,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
}
},
[cliVersion.version],
[cliVersion.version, cliVersion.envName],
)

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ export const TidyUpButton: FC = () => {
element: 'tidyUp',
showMode,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
handleLayout(getNodes(), getEdges())
}, [handleLayout, showMode, getNodes, getEdges, cliVersion.version])
}, [
handleLayout,
showMode,
getNodes,
getEdges,
cliVersion.version,
cliVersion.envName,
])

return (
<ToolbarButton asChild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@ export const ZoomControls: FC = () => {
zoomLevel: zoomLevel.toFixed(2),
showMode,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
zoomOut()
}, [zoomOut, zoomLevel, showMode, cliVersion.version])
}, [zoomOut, zoomLevel, showMode, cliVersion.version, cliVersion.envName])

const handleClickZoomIn = useCallback(() => {
toolbarActionLogEvent({
element: 'zoom',
zoomLevel: zoomLevel.toFixed(2),
showMode: showMode,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
zoomIn()
}, [zoomIn, zoomLevel, showMode, cliVersion.version])
}, [zoomIn, zoomLevel, showMode, cliVersion.version, cliVersion.envName])

return (
<div className={styles.wrapper}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ export const ERDRenderer: FC = () => {
element: 'leftPane',
isShow: open,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
},
[cliVersion.version],
[cliVersion.version, cliVersion.envName],
)

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { selectTableLogEvent } from '@/features/gtm/utils'
import { useCliVersion } from '@/providers'
import { updateActiveTableName, useUserEditingStore } from '@/stores'
import { updateActiveTableName } from '@/stores'
import { SidebarMenuButton, SidebarMenuItem, Table2 } from '@liam-hq/ui'
import clsx from 'clsx'
import type { FC } from 'react'
Expand All @@ -13,9 +13,6 @@ type Props = {
}

export const TableNameMenuButton: FC<Props> = ({ node }) => {
const {
active: { tableName },
} = useUserEditingStore()
const name = node.data.table.name

// TODO: Move handleClickMenuButton outside of TableNameMenuButton
Expand All @@ -27,13 +24,17 @@ export const TableNameMenuButton: FC<Props> = ({ node }) => {
ref: 'leftPane',
tableId,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
}

return (
<SidebarMenuItem>
<SidebarMenuButton
className={clsx(styles.button, name === tableName && styles.active)}
className={clsx(
styles.button,
node.data.isActiveHighlighted && styles.active,
)}
asChild
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ export const VisibilityButton: FC<Props> = ({ tableName, hidden }) => {
isShow: !!hidden,
tableId: tableName,
cliVer: cliVersion.version,
appEnv: cliVersion.envName,
})
},
[tableName, hidden, cliVersion.version],
[tableName, hidden, cliVersion.version, cliVersion.envName],
)

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { pushToDataLayer } from './pushToDataLayer'
type ClickLogEvent = {
element: string
cliVer: string
appEnv: string
}

export const clickLogEvent = ({ element, cliVer }: ClickLogEvent) => {
export const clickLogEvent = ({ element, cliVer, appEnv }: ClickLogEvent) => {
pushToDataLayer({
event: 'click',
element,
cliVer,
appEnv,
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ import { pushToDataLayer } from './pushToDataLayer'
type OpenRelatedTablesLogEvent = {
tableId: string
cliVer: string
appEnv: string
}

export const openRelatedTablesLogEvent = ({
tableId,
cliVer,
appEnv,
}: OpenRelatedTablesLogEvent) => {
pushToDataLayer({
event: 'openRelatedTables',
tableId,
cliVer,
appEnv,
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ type RepositionTable = {
tableId: string
operationId: string
cliVer: string
appEnv: string
}

export const repositionTableLogEvent = ({
tableId,
operationId,
cliVer,
appEnv,
}: RepositionTable) => {
pushToDataLayer({
event: 'repositionTable',
tableId,
operationId,
cliVer,
appEnv,
})
}
Loading

0 comments on commit 98db85c

Please sign in to comment.