Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@gooddata/sdk-ui-all",
"comment": "sdk-ui-catalog: Update the tooltip text content for the catalog help icon.",
"type": "none"
}
],
"packageName": "@gooddata/sdk-ui-all"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@gooddata/sdk-ui-all",
"comment": "[sdk-ui-catalog] Support theming in workspace catalog page",
"type": "none"
}
],
"packageName": "@gooddata/sdk-ui-all"
}
2 changes: 1 addition & 1 deletion libs/sdk-ui-catalog/src/localization/bundles/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"comment": "Tooltip content "
},
"analyticsCatalog.tooltip.content": {
"value": "Central catalog of dashboards, metrics, visualizations, facts, and attributes — helping you govern content, find insights faster, and collaborate efficiently.",
"value": "Centralized catalog of dashboards, metrics, visualizations, facts, and attributes. Explore, manage, and update all objects in one place to support consistent governance, quicker insights, and improved collaboration.",
"comment": "Tooltip content for the help icon in the header."
},
"analyticsCatalog.search.label": {
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk-ui-catalog/styles/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

&__separator {
flex: auto;
border-bottom: 1px solid kit-variables.$default-gd-border-color;
border-bottom: 1px solid kit-variables.$gd-border-color;
margin: 0 10px;
}

Expand Down
2 changes: 2 additions & 0 deletions libs/sdk-ui-ext/src/automations/AutomationsCore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export function AutomationsCore(props: IAutomationsCoreProps) {
bulkActions,
selectedIds,
handleSort,
handleItemClick,
loadNextPage,
setSearch,
setSelectedIds,
Expand All @@ -39,6 +40,7 @@ export function AutomationsCore(props: IAutomationsCoreProps) {
hasNextPage={hasNextPage}
loadNextPage={loadNextPage}
onSort={handleSort}
onItemClick={handleItemClick}
sortBy={sortBy}
sortDirection={sortDirection}
bulkActions={bulkActions}
Expand Down
7 changes: 5 additions & 2 deletions libs/sdk-ui-ext/src/automations/columns/AutomationIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useCallback, useMemo } from "react";

import { useIntl } from "react-intl";

import { IAutomationLastRunStatus, IAutomationMetadataObject } from "@gooddata/sdk-model";
import { IAutomationLastRunStatus, IAutomationMetadataObject, IAutomationState } from "@gooddata/sdk-model";
import { Bubble, BubbleHoverTrigger, UiIcon, UiIconButton, useToastMessage } from "@gooddata/sdk-ui-kit";

import { bem } from "../../notificationsPanel/bem.js";
Expand All @@ -18,15 +18,18 @@ const { b, e } = bem("gd-ui-ext-automation-icon-tooltip");
export function AutomationIcon({
type,
automation,
state,
}: {
type: AutomationsType | IAutomationLastRunStatus;
automation?: IAutomationMetadataObject;
state?: IAutomationState;
}) {
if (!type) {
return null;
}

const props = AUTOMATION_ICON_CONFIGS[type];
const props =
state === "PAUSED" ? AUTOMATION_ICON_CONFIGS[`${type}${state}`] : AUTOMATION_ICON_CONFIGS[type];

return type === "FAILED" ? (
<BubbleHoverTrigger hideDelay={300} eventsOnBubble={true}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const useAutomationColumns = ({
["title"]: {
label: intl.formatMessage(messages.columnName),
key: "title",
renderRoleIcon: () => <AutomationIcon type={type} />,
renderRoleIcon: (item) => <AutomationIcon type={type} state={item.state} />,
getMultiLineTextContent: (item) => [
formatCellValue(item.title),
formatCellValue(
Expand Down
28 changes: 18 additions & 10 deletions libs/sdk-ui-ext/src/automations/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,30 @@ export const AutomationActionsDefaultState: IAutomationActionsState = {

export const getAutomationActionsEmptyState = () => ({ ...AutomationActionsDefaultState });

const titleIconProps = {
color: "complementary-6",
size: 14,
backgroundSize: 27,
backgroundColor: "complementary-2",
backgroundType: "fill",
} as const;

export const AUTOMATION_ICON_CONFIGS: Record<string, UiIconProps> = {
schedule: {
type: "clock",
color: "complementary-6",
size: 14,
backgroundSize: 27,
backgroundColor: "complementary-2",
backgroundType: "fill",
...titleIconProps,
},
alert: {
type: "alert",
color: "complementary-6",
size: 14,
backgroundSize: 27,
backgroundColor: "complementary-2",
backgroundType: "fill",
...titleIconProps,
},
schedulePAUSED: {
type: "pauseCircle",
...titleIconProps,
},
alertPAUSED: {
type: "alertPaused",
...titleIconProps,
},
SUCCESS: {
type: "checkCircle",
Expand Down
7 changes: 7 additions & 0 deletions libs/sdk-ui-ext/src/automations/useAutomationsState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useCallback, useEffect, useMemo, useRef, useState } from "react";

import { IAutomationMetadataObject } from "@gooddata/sdk-model";
import { useWorkspace } from "@gooddata/sdk-ui";
import { UiAsyncTableBulkAction, UiAsyncTableFilter } from "@gooddata/sdk-ui-kit";

import { useAutomationActions } from "./actions/useAutomationActions.js";
Expand All @@ -27,6 +28,7 @@ export const useAutomationsState = ({
invalidateItemsRef,
}: IAutomationsCoreProps) => {
const [state, setState] = useState<IAutomationsState>(AutomationsDefaultState);
const workspace = useWorkspace();
//prevent useEffect runs on mount
const actionsRefFirstRun = useRef(true);
const filtersRefFirstRun = useRef(true);
Expand Down Expand Up @@ -213,6 +215,10 @@ export const useAutomationsState = ({
}
};

const handleItemClick = (item: IAutomationMetadataObject) => {
editAutomation(item, workspace, item.dashboard?.id);
};

const loadNextPage = useCallback(() => {
setState((state) => ({
...state,
Expand Down Expand Up @@ -260,6 +266,7 @@ export const useAutomationsState = ({
bulkActions,
selectedIds,
handleSort,
handleItemClick,
loadNextPage,
setSearch,
setSelectedIds,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// (C) 2020-2025 GoodData Corporation

import {
IAttribute,
IAttributeOrMeasure,
Expand Down Expand Up @@ -112,18 +113,30 @@ function removePropertiesForRemovedAttributes(insight: IInsight): IInsight {

const result = Object.entries(properties).reduce(
(acc, [key, value]) => {
if (key === ENUM_PROPERTIES_TYPE.CONTROLS && value.columnWidths) {
const columns = value.columnWidths.filter((columnWidth: ColumnWidthItem) => {
if (isAttributeColumnWidthItem(columnWidth)) {
return identifiers.includes(columnWidth.attributeColumnWidthItem.attributeIdentifier);
}
return true;
});
acc[key] = {
columnWidths: columns,
};
if (key !== ENUM_PROPERTIES_TYPE.CONTROLS) {
return acc;
}

const columns = (value?.columnWidths ?? []).filter((columnWidth: ColumnWidthItem) => {
if (isAttributeColumnWidthItem(columnWidth)) {
return identifiers.includes(columnWidth.attributeColumnWidthItem.attributeIdentifier);
}
return true;
});

const hasColumnWidths = columns.length > 0;
const hasTextWrapping = value?.textWrapping !== undefined;

// If neither property is present, keep original controls as-is
if (!hasColumnWidths && !hasTextWrapping) {
return acc;
}

acc[key] = {
...(hasColumnWidths ? { columnWidths: columns } : {}),
...(hasTextWrapping ? { textWrapping: value!.textWrapping } : {}),
};

return acc;
},
{ ...properties },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import React from "react";

import { stopPropagationCallback } from "./utils.js";
import { UiCheckbox } from "../../UiCheckbox/UiCheckbox.js";
import { e } from "../asyncTableBem.js";
import { UiAsyncTableCheckboxProps } from "../types.js";
Expand All @@ -13,7 +14,12 @@ export function UiAsyncTableCheckbox({
disabled,
}: UiAsyncTableCheckboxProps) {
return (
<div className={e("cell", { checkbox: true })} onClick={onChange}>
<div
className={e("cell", { checkbox: true })}
onClick={(e) => {
stopPropagationCallback(e, onChange);
}}
>
<UiCheckbox
checked={checked}
preventDefault={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { UiIcon } from "../../UiIcon/UiIcon.js";
import { e } from "../asyncTableBem.js";
import { UiAsyncTableColumn, UiAsyncTableHeaderProps } from "../types.js";

const arrowIcon = <UiIcon type="dropDown" size={14} color="complementary-6" />;
const arrowIcon = <UiIcon type="dropDown" size={11} color="complementary-6" />;

export function UiAsyncTableHeader<T>({
columns,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useIntl } from "react-intl";

import { UiAsyncTableCheckbox } from "./UiAsyncTableCheckbox.js";
import { UiAsyncTableIconRenderer } from "./UiAsyncTableIconRenderer.js";
import { getColumnWidth } from "./utils.js";
import { getColumnWidth, stopPropagationCallback } from "./utils.js";
import { WithConditionalAnchor } from "./WithConditionalAnchor.js";
import { Dropdown } from "../../../Dropdown/Dropdown.js";
import { UiIconButton } from "../../UiIconButton/UiIconButton.js";
Expand Down Expand Up @@ -96,7 +96,9 @@ const useRenderCellContent = <T extends { id: string }>({ isLarge }: { isLarge:
icon="ellipsis"
label={label}
variant="table"
onClick={() => toggleDropdown()}
onClick={(e) => {
stopPropagationCallback(e, toggleDropdown);
}}
isActive={isOpen}
isDisabled={isDisabled}
accessibilityConfig={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

import React from "react";

import { stopPropagationCallback } from "./utils.js";
import { UiLink } from "../../UiLink/UiLink.js";

export function WithConditionalAnchor({ href, children }: { href?: string; children: React.ReactNode }) {
return href ? (
<UiLink variant="secondary" href={href} fullWidth>
<UiLink
variant="secondary"
fullWidth
href={href}
onClick={(e) => {
stopPropagationCallback(e);
}}
>
{children}
</UiLink>
) : (
Expand Down
8 changes: 8 additions & 0 deletions libs/sdk-ui-kit/src/@ui/UiAsyncTable/UiAsyncTable/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ export const getColumnWidths = <T extends { id: string }>(
export const getFilterOptionsMap = (options: Array<UiAsyncTableFilterOption>) => {
return new Map(options.map((item) => [item.value, item]));
};

export const stopPropagationCallback = <T extends HTMLElement>(
event: React.MouseEvent<T, MouseEvent>,
callback?: () => void,
): void => {
event.stopPropagation();
callback?.();
};
5 changes: 4 additions & 1 deletion libs/sdk-ui-kit/src/@ui/UiAsyncTable/asyncTable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
font-size: var(--gd-table-font-size);
font-style: normal;
line-height: var(--gd-table-row-line-height);
color: var(--gd-palette-complementary-8);
color: var(--gd-palette-complementary-7);
-webkit-font-smoothing: antialiased;

&__row {
display: flex;
Expand Down Expand Up @@ -135,6 +136,7 @@
&--first {
font-size: var(--gd-table-multi-line-font-size-large);
line-height: var(--gd-table-multi-line-line-height-large);
color: var(--gd-palette-complementary-8);
font-weight: 700;
}
}
Expand Down Expand Up @@ -171,6 +173,7 @@

svg {
transform: rotate(180deg);
margin-top: 2px;
}
}

Expand Down
6 changes: 4 additions & 2 deletions libs/sdk-ui-pivot/src/next/PivotTableNext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ function RenderPivotTableNextAgGrid() {
]);
}, []);

const isAutoHeight = agGridReactProps.domLayout === "autoHeight";

const containerStyle: React.CSSProperties = {
height: config.maxHeight ?? "100%",
position: "relative",
overflow: "hidden",
overflowX: "hidden",
overflowY: isAutoHeight ? "auto" : "hidden",
};

const stopEventWhenResizeHeader = (e: React.MouseEvent): void => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const SORTING_PROPS: AgGridProps = {
const STYLING_PROPS: AgGridProps = {
defaultColGroupDef: {
headerClass: HEADER_CELL_CLASSNAME,
wrapHeaderText: true,
},
rowHeight: DEFAULT_ROW_HEIGHT,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function enableDefaultTextWrappingForHeaders(options: AgGridProps): AgGri
defaultColGroupDef: {
...options.defaultColGroupDef,
wrapHeaderText: true,
autoHeaderHeight: true,
},
};
}
4 changes: 3 additions & 1 deletion libs/sdk-ui-pivot/styles/scss/pivotTableNext.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

width: 100%;
height: 100%;
position: relative;

.ag-row {
border: none;
Expand Down Expand Up @@ -93,6 +94,8 @@
.gd-header-content {
.gd-header-text {
white-space: unset;
overflow: unset;
text-overflow: unset;
}
}
}
Expand All @@ -111,7 +114,6 @@
.gd-header-text {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
}

Expand Down
Loading