Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d729130
feat: add d3-dag library
ethanluc7 Feb 26, 2026
a113b30
feat: implement layout algorithm using d3-dag's sugiyama algorithm
ethanluc7 Feb 26, 2026
8defe14
feat: render nodes and edges from the generated layout
ethanluc7 Feb 26, 2026
4a3e5ec
feat: import new utils
ethanluc7 Feb 26, 2026
8ef038c
fix: adjust viewport configuration to support larger diagrams
ethanluc7 Feb 26, 2026
7ee353a
fix: re-add conditonal background and border logic
ethanluc7 Feb 26, 2026
dddb512
refactor: remove non-null assertion operator
ethanluc7 Mar 3, 2026
5e49787
refactor: remove type casting
ethanluc7 Mar 3, 2026
b15a9ec
refactor: centralize utility functions for use in other files
ethanluc7 Mar 4, 2026
ae312ed
refactor: update file with centralized logic for rendering content
ethanluc7 Mar 4, 2026
7518676
feat: move diagram view button to dictionary table viewer component
ethanluc7 Mar 4, 2026
8e6201e
feat: add diagram view link to allowed values
ethanluc7 Mar 4, 2026
892f7f1
feat: add separate grid algorithm for isFocused state
ethanluc7 Mar 4, 2026
95dbb7f
feat: update diagram subtitle to include logic for isFocused state
ethanluc7 Mar 4, 2026
5896b55
fix: update entity diagram relationship diagram story
ethanluc7 Mar 4, 2026
76e16e0
Merge branch 'main' into 398-table-view-interactions
ethanluc7 Mar 4, 2026
3672c99
Merge branch 'main' into 398-table-view-interactions
ethanluc7 Mar 5, 2026
335aff7
Merge branch '398-table-view-interactions' of https://github.com/over…
ethanluc7 Mar 5, 2026
382d8ef
Merge branch 'main' into 416-table-view-styling-updates
ethanluc7 Mar 11, 2026
f9195d8
style: reduce button and dropdown padding
ethanluc7 Mar 11, 2026
43af033
style: update accordion card
ethanluc7 Mar 11, 2026
dccc933
style: reduce strokewidth of icons
ethanluc7 Mar 11, 2026
b60de72
style: update toolbar styling
ethanluc7 Mar 11, 2026
3a8dc60
style: update filters button text to filters from filter by
ethanluc7 Mar 11, 2026
2f4db8f
style: adjust text styling
ethanluc7 Mar 11, 2026
481e180
style: update table styling
ethanluc7 Mar 11, 2026
c6fa344
style: update table header and table row styling
ethanluc7 Mar 11, 2026
dd9ffbf
style: remove underline from text and hash
ethanluc7 Mar 11, 2026
0df526a
style: adjust dictionary header components
ethanluc7 Mar 11, 2026
4c92f00
refactor: reverse schema chain to more accurately display parent to c…
ethanluc7 Mar 11, 2026
a55b271
refactor: use toReversed instead of reverse function
ethanluc7 Mar 11, 2026
80a8c1e
refactor: remove now unused index prop
ethanluc7 Mar 12, 2026
45c2dd1
fix: remove unnecessary spread
ethanluc7 Mar 12, 2026
07e37cc
refactor: use css classes instead of javascript
ethanluc7 Mar 12, 2026
d1f2aca
Merge branch 'main' into 416-table-view-styling-updates
ethanluc7 Mar 12, 2026
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
25 changes: 10 additions & 15 deletions packages/ui/src/common/Accordion/AccordionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export type AccordionItemProps = {
const accordionItemStyle = (theme: Theme) => css`
list-style: none;
width: 100%;
border-radius: 8px;
margin-bottom: 1px;
overflow: hidden;
background-color: ${theme.colors.white};
Expand All @@ -58,7 +57,7 @@ const accordionItemStyle = (theme: Theme) => css`
const accordionItemTitleStyle = css`
display: flex;
align-items: flex-start;
padding: 24px 30px;
padding: 24px 30px 32px;
transition: all 0.2s ease;
width: 100%;
box-sizing: border-box;
Expand All @@ -82,7 +81,6 @@ const accordionItemButtonStyle = css`
const contentColumnStyle = css`
display: flex;
flex-direction: column;
gap: 8px;
`;

const titleStyle = (theme: Theme) => css`
Expand All @@ -91,7 +89,6 @@ const titleStyle = (theme: Theme) => css`
overflow-wrap: break-word;
word-wrap: break-word;
cursor: pointer;
padding-bottom: 7px;
`;

const chevronStyle = (isOpen: boolean) => css`
Expand All @@ -103,28 +100,27 @@ const titleRowStyle = (theme: Theme) => css`
display: flex;
gap: 4px;
align-items: center;
margin-bottom: 10px;

&:hover [data-anchor-button] {
opacity: 1;
}
&:hover [data-title-link] {
color: ${theme.colors.secondary};
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 4px;
}
`;

const hashIconStyle = (theme: Theme) => css`
const hashIconStyle = () => css`
display: inline-flex;
align-items: center;
justify-content: center;
opacity: 0;
padding-block: 0px;
padding-inline: 0px;
background: transparent;
border: none;
cursor: pointer;
svg {
border-bottom: 2px solid ${theme.colors.secondary};
}
`;

const descriptionWrapperStyle = (theme: Theme) => css`
Expand All @@ -140,12 +136,11 @@ const accordionCollapseStyle = (isOpen: boolean) => css`
`;

const accordionItemContentStyle = css`
padding: 0px 30px 30px 30px;
padding: 0px 0px 30px;
border: none;
`;

const contentInnerContainerStyle = (theme: Theme) => css`
border-left: 2px solid ${theme.colors.grey_3};
padding-left: 30px;
${theme.typography?.data};
`;

Expand Down Expand Up @@ -185,7 +180,7 @@ const AccordionItem = ({ index, accordionData, openState }: AccordionItemProps)
<div onClick={openState.toggle} role="button" css={accordionItemTitleStyle}>
<div css={chevronColumnStyle}>
<button css={accordionItemButtonStyle}>
<ChevronDown fill={theme.colors.black} width={16} height={16} style={chevronStyle(openState.isOpen)} />
<ChevronDown fill={theme.colors.black} width={20} height={20} style={chevronStyle(openState.isOpen)} />
</button>
</div>
<div css={contentColumnStyle}>
Expand All @@ -201,7 +196,7 @@ const AccordionItem = ({ index, accordionData, openState }: AccordionItemProps)
<button
type="button"
data-anchor-button
css={hashIconStyle(theme)}
css={hashIconStyle()}
onClick={(event) => hashOnClick(event, windowLocationHash, setClipboardContents)}
>
<Hash width={24} height={24} fill={theme.colors.secondary} />
Expand Down
17 changes: 14 additions & 3 deletions packages/ui/src/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface ButtonProps {
className?: string;
isLoading?: boolean;
icon?: ReactNode;
size?: number;
width?: string;
iconOnly?: boolean;
tooltipText?: string;
Expand All @@ -48,7 +49,7 @@ const getButtonContainerStyles = (theme: any, width?: string, styleOverride?: Se
gap: 11px;
width: ${width || 'auto'};
min-width: fit-content;
padding: 6px 12px;
padding: 2px 12px;
background-color: ${theme.colors.background_light};
color: ${theme.colors.accent_dark};
border: 2px solid ${theme.colors.border_button};
Expand All @@ -72,7 +73,15 @@ const getButtonContainerStyles = (theme: any, width?: string, styleOverride?: Se
${styleOverride}
`;

const getContentStyles = (theme: Theme, shouldShowLoading: boolean) => css`
const getContentStyles = ({
theme,
size,
shouldShowLoading,
}: {
theme: Theme;
size: number;
shouldShowLoading: boolean;
}) => css`
display: flex;
align-items: center;
gap: 8px;
Expand All @@ -81,6 +90,7 @@ const getContentStyles = (theme: Theme, shouldShowLoading: boolean) => css`
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: ${size}px;
visibility: ${shouldShowLoading ? 'hidden' : 'visible'};
`;

Expand Down Expand Up @@ -140,6 +150,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
isLoading: controlledLoading,
icon,
width,
size = 16,
iconOnly = false,
styleOverride,
tooltipText,
Expand Down Expand Up @@ -171,7 +182,7 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
)}
{icon && !shouldShowLoading && <span css={getIconStyles()}>{icon}</span>}
{/* If iconOnly is true, we don't show the children */}
{!iconOnly && <span css={getContentStyles(theme, shouldShowLoading)}>{children}</span>}
{!iconOnly && <span css={getContentStyles({ theme, size, shouldShowLoading })}>{children}</span>}
<span css={getSpinnerStyles(shouldShowLoading)}>
<Spinner fill={theme.colors.black} height={20} width={20} />
</span>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/common/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const dropdownButtonStyle = ({
gap: 11px;
width: ${width || 'auto'};
min-width: fit-content;
padding: 6px 12px;
padding: 2px 12px;
background-color: ${theme.colors.background_light};
color: ${theme.colors.accent_dark};
border: 2px solid ${theme.colors.border_button};
Expand Down Expand Up @@ -126,7 +126,7 @@ export type DropDownProps = {
* @returns {JSX.Element} Dropdown component
*/

const Dropdown = ({ menuItems = [], title, leftIcon, disabled = false, size = 20, styles }: DropDownProps) => {
const Dropdown = ({ menuItems = [], title, leftIcon, disabled = false, size = 16, styles }: DropDownProps) => {
const [open, setOpen] = useState(false);
const dropdownRef = useRef<HTMLDivElement>(null);
const theme: Theme = useThemeContext();
Expand Down
9 changes: 6 additions & 3 deletions packages/ui/src/theme/icons/ChevronDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ const ChevronDown = ({ fill, width, height, style }: IconProps) => {
viewBox="0 0 12 12"
>
<path
fill={fill}
fillRule="evenodd"
d="M9.952 3.342c.468-.456 1.228-.456 1.697 0 .234.228.351.526.351.825 0 .298-.117.597-.351.825l-4.8 4.666c-.469.456-1.23.456-1.697 0l-4.8-4.666c-.47-.456-.47-1.194 0-1.65.468-.456 1.228-.456 1.696 0L6 7.184l3.952-3.842z"
fill="none"
stroke={fill}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
d="M2 4L6 8L10 4"
/>
</svg>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/theme/icons/Eye.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Eye = ({ fill, width, height, style }: IconProps) => {
css={style}
fill={fill || 'none'}
stroke="currentColor"
strokeWidth="2"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/theme/icons/FileDownload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const FileDownload = ({ fill, height, width, style }: IconProps) => {
viewBox="0 0 24 24"
fill={fill || 'none'}
stroke="currentColor"
strokeWidth="2"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/theme/icons/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const History = ({ width, height, fill, style }: IconProps) => {
viewBox="0 0 24 24"
fill={fill || 'none'}
stroke="currentColor"
strokeWidth="2"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
>
Expand Down
11 changes: 3 additions & 8 deletions packages/ui/src/theme/icons/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,17 @@ const List = ({ fill, width, height, style }: IconProps) => {
xmlns="http://www.w3.org/2000/svg"
width={width || 24}
height={height || 24}
viewBox="0 0 24 24"
viewBox="0 0 16 16"
fill={fill || 'none'}
stroke="currentColor"
strokeWidth="2"
strokeWidth="1"
strokeLinecap="round"
strokeLinejoin="round"
css={css`
${style}
`}
>
<path d="M3 12h.01" />
<path d="M3 18h.01" />
<path d="M3 6h.01" />
<path d="M8 12h13" />
<path d="M8 18h13" />
<path d="M8 6h13" />
<path d="M1 4H11M1 8H11M1 12H11M14.5 4H14.51M14.5 8H14.51M14.5 12H14.51" />
</svg>
);
};
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/theme/icons/ListFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ListFilter = ({ fill, width, height, style }: IconProps) => {
fill={fill || 'none'}
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth="2"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/theme/styles/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const headingSmall = css`
const buttonText = css`
${baseFont}
font-size: 20px;
font-weight: 700;
font-weight: 500;
line-height: 1.5;
vertical-align: middle;
`;
Expand Down Expand Up @@ -172,7 +172,7 @@ const fieldBlock = css`

const tableHeader = css`
${baseFont}
font-size: 18px;
font-size: 20px;
font-weight: 600;
line-height: 20px;
vertical-align: middle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,28 @@ const fieldNameRowStyle = (theme: Theme) => css`
display: flex;
align-items: center;
gap: 4px;
line-height: 1;
&:hover [data-field-anchor] {
opacity: 1;
}
&:hover [data-field-name] {
color: ${theme.colors.secondary};
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 4px;
}
`;

// Note: Added Line Height 1 for consistent vertical spacing for hashtag icon
const fieldHashIconStyle = (theme: Theme) => css`
const fieldHashIconStyle = css`
display: inline-flex;
align-items: center;
justify-content: center;
opacity: 0;
line-height: 1;
padding-block: 0px;
padding-inline: 0px;
background: transparent;
border: none;
cursor: pointer;
svg {
border-bottom: 2px solid ${theme.colors.secondary};
}
`;

const fieldNameStyle = css`
padding-bottom: 4px;
cursor: pointer;
`;

Expand Down Expand Up @@ -126,7 +121,7 @@ export const FieldsColumn = ({ fieldRow, schemaName }: FieldColumnProps) => {
<b data-field-name onClick={handleAnchorClick} css={fieldNameStyle}>
{fieldName}
</b>
<button type="button" data-field-anchor css={fieldHashIconStyle(theme)} onClick={handleAnchorClick}>
<button type="button" data-field-anchor css={fieldHashIconStyle} onClick={handleAnchorClick}>
<Hash width={18} height={18} fill={theme.colors.secondary} />
</button>
</div>
Expand Down
18 changes: 7 additions & 11 deletions packages/ui/src/viewer-table/DataTable/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const scrollWrapperStyle = css`

const shadowStyle = css`
position: absolute;
top: 2%;
top: 1%;
width: 20px;
height: 100%;
pointer-events: none;
Expand Down Expand Up @@ -80,17 +80,13 @@ const tableContainerStyle = css`
max-width: 100%;
`;

const tableStyle = (theme: Theme) => css`
const tableStyle = () => css`
min-width: 1200px;
border-collapse: collapse;
border: 1px solid ${theme.colors.grey_3};
margin-top: 8px;
position: relative;
width: 100%;
`;
const tableBorderStyle = (theme: Theme) => css`
border: 1px solid ${theme.colors.border_light};
`;

const hasNameProperty = (obj: unknown): obj is { name: string } => {
if (typeof obj === 'object' && obj !== null && 'name' in obj && typeof obj.name === 'string') {
Expand Down Expand Up @@ -176,19 +172,19 @@ const Table = <R,>({ columns, data, schemaName, highlightedFieldName }: GenericT
<div css={tableContainerStyle} ref={scrollRef}>
<div css={leftShadowStyle(firstColumnWidth, showLeftShadow ? 1 : 0, theme)} />
<div css={rightShadowStyle(showRightShadow ? 1 : 0, theme)} />
<table css={tableStyle(theme)}>
<thead css={tableBorderStyle(theme)}>
<table css={tableStyle()}>
<thead>
{table.getHeaderGroups().map((headerGroup: HeaderGroup<R>) => (
<TableHeader key={headerGroup.id} headerGroup={headerGroup} />
))}
</thead>
<tbody css={tableBorderStyle(theme)}>
{table.getRowModel().rows.map((row, i: number) => {
<tbody>
{table.getRowModel().rows.map((row) => {
const fieldName = hasNameProperty(row.original) ? row.original.name : undefined;
const fieldId = schemaName && fieldName ? `${schemaName}.${fieldName}` : undefined;
const isHighlighted = highlightedFieldName === fieldName;

return <TableRow key={row.id} row={row} index={i} fieldId={fieldId} isHighlighted={isHighlighted} />;
return <TableRow key={row.id} row={row} fieldId={fieldId} isHighlighted={isHighlighted} />;
})}
</tbody>
</table>
Expand Down
Loading