Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
006a353
Update MCPHealthPopoverButton.tsx
lucasgoral Oct 22, 2025
9bb5bf2
Update ImportMembersDialog.tsx
lucasgoral Oct 22, 2025
0d66cf8
Update MemberTable.tsx
lucasgoral Oct 22, 2025
431a854
Update Providers.tsx
lucasgoral Oct 22, 2025
e3f03c3
Update ControlPlaneListWorkspaceGridTile.tsx
lucasgoral Oct 22, 2025
7381ebe
Update FeedbackButton.tsx
lucasgoral Oct 22, 2025
5d012a8
Update ProjectsList.tsx
lucasgoral Oct 22, 2025
9f73cb9
Update YamlEditor.tsx
lucasgoral Oct 22, 2025
5adc8af
Update hintsCardsRowCalculations.spec.ts
lucasgoral Oct 22, 2025
cb90645
Update build.yaml
lucasgoral Oct 22, 2025
4b78b60
Merge branch 'main' into typrescript-fixes
lucasgoral Oct 22, 2025
ac365d5
Merge branch 'typrescript-fixes' of https://github.com/openmcp-projec…
lucasgoral Oct 22, 2025
45687d7
Update src/components/ControlPlane/Providers.tsx
lucasgoral Oct 22, 2025
d7ff041
Update src/components/Projects/ProjectsList.tsx
lucasgoral Oct 22, 2025
be5d757
Merge branch 'main' into typrescript-fixes
lucasgoral Oct 22, 2025
7e96694
fix
lucasgoral Oct 22, 2025
a4f6a59
Merge branch 'main' into typrescript-fixes
lucasgoral Oct 24, 2025
05f0a16
fix
lucasgoral Oct 27, 2025
6079587
refactor
lucasgoral Oct 27, 2025
a5b3cd9
Merge branch 'main' into typrescript-fixes
lucasgoral Oct 27, 2025
3e48725
Merge branch 'main' into typrescript-fixes
lucasgoral Oct 27, 2025
7a17f22
Merge branch 'typrescript-fixes' of https://github.com/openmcp-projec…
lucasgoral Oct 27, 2025
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
22 changes: 10 additions & 12 deletions src/components/ControlPlane/MCPHealthPopoverButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { AnalyticalTableColumnDefinition } from '@ui5/webcomponents-react/wrappers';
import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js';
import '@ui5/webcomponents-icons/dist/copy';
import { JSX, useRef, useState, ReactNode } from 'react';
import { JSX, useRef, useState } from 'react';
import type { ButtonClickEventDetail } from '@ui5/webcomponents/dist/Button.js';
import {
ControlPlaneStatusType,
Expand All @@ -27,13 +27,11 @@ import type { Ui5CustomEvent } from '@ui5/webcomponents-react-base';

interface CellData<T> {
cell: {
value: ReactNode;
value: T | undefined;
row: {
original: Record<string, unknown>;
};
};
row: {
original: T;
[key: string]: unknown;
};
[key: string]: unknown;
}

type MCPHealthPopoverButtonProps = {
Expand Down Expand Up @@ -99,7 +97,7 @@ const MCPHealthPopoverButton = ({ mcpStatus, projectName, workspaceName, mcpName
Header: t('MCPHealthPopoverButton.statusHeader'),
accessor: 'status',
width: 50,
Cell: (instance: CellData<ControlPlaneStatusCondition>) => {
Cell: (instance: CellData<string>) => {
const isReady = instance.cell.value === 'True';
return (
<Icon
Expand All @@ -113,31 +111,31 @@ const MCPHealthPopoverButton = ({ mcpStatus, projectName, workspaceName, mcpName
Header: t('MCPHealthPopoverButton.typeHeader'),
accessor: 'type',
width: 150,
Cell: (instance: CellData<ControlPlaneStatusCondition>) => {
Cell: (instance: CellData<string>) => {
return <TooltipCell>{instance.cell.value}</TooltipCell>;
},
},
{
Header: t('MCPHealthPopoverButton.messageHeader'),
accessor: 'message',
width: 350,
Cell: (instance: CellData<ControlPlaneStatusCondition>) => {
Cell: (instance: CellData<string>) => {
return <TooltipCell>{instance.cell.value}</TooltipCell>;
},
},
{
Header: t('MCPHealthPopoverButton.reasonHeader'),
accessor: 'reason',
width: 100,
Cell: (instance: CellData<ControlPlaneStatusCondition>) => {
Cell: (instance: CellData<string>) => {
return <TooltipCell>{instance.cell.value}</TooltipCell>;
},
},
{
Header: t('MCPHealthPopoverButton.transitionHeader'),
accessor: 'lastTransitionTime',
width: 125,
Cell: (instance: CellData<ControlPlaneStatusCondition>) => {
Cell: (instance: CellData<string>) => {
const rawDate = instance.cell.value;
const date = new Date(rawDate as string);
return (
Expand Down
18 changes: 9 additions & 9 deletions src/components/ControlPlane/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import { Resource } from '../../utils/removeManagedFieldsAndFilterData.ts';

interface CellData<T> {
cell: {
value: T | null;
value: T | undefined;
row: {
original?: ProvidersRow;
original: Record<string, unknown>;
};
};
}
Expand Down Expand Up @@ -78,14 +78,14 @@ export function Providers() {
width: 125,
Filter: ({ column }) => <StatusFilter column={column} />,
filter: 'equals',
Cell: (cellData: CellData<ProvidersRow['installed']>) =>
Cell: (cellData: CellData<string>) =>
cellData.cell.row.original?.installed != null ? (
<ResourceStatusCell
isOk={cellData.cell.row.original?.installed === 'true'}
transitionTime={cellData.cell.row.original?.installedTransitionTime}
transitionTime={cellData.cell.row.original?.installedTransitionTime as string}
positiveText={t('common.installed')}
negativeText={t('errors.installError')}
message={cellData.cell.row.original?.installedMessage}
message={cellData.cell.row.original?.installedMessage as string}
/>
) : null,
},
Expand All @@ -96,14 +96,14 @@ export function Providers() {
width: 125,
Filter: ({ column }) => <StatusFilter column={column} />,
filter: 'equals',
Cell: (cellData: CellData<ProvidersRow['healthy']>) =>
Cell: (cellData: CellData<string>) =>
cellData.cell.row.original?.installed != null ? (
<ResourceStatusCell
isOk={cellData.cell.row.original?.healthy === 'true'}
transitionTime={cellData.cell.row.original?.healthyTransitionTime}
transitionTime={cellData.cell.row.original?.healthyTransitionTime as string}
positiveText={t('common.healthy')}
negativeText={t('errors.notHealthy')}
message={cellData.cell.row.original?.healthyMessage}
message={cellData.cell.row.original?.healthyMessage as string}
/>
) : null,
},
Expand All @@ -113,7 +113,7 @@ export function Providers() {
width: 75,
accessor: 'yaml',
disableFilters: true,
Cell: (cellData: CellData<ProvidersRow>) => (
Cell: (cellData: CellData<string>) => (
<YamlViewButton variant="resource" resource={cellData.cell.row.original?.item as Resource} />
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function ControlPlaneListWorkspaceGridTile({ projectName, workspace }: Pr
const errorView = createErrorView(cpsError);
const shouldCollapsePanel = !!errorView;

function createErrorView(error: APIError) {
function createErrorView(error: APIError | undefined) {
if (error) {
if (error.status === 403) {
return (
Expand Down
13 changes: 3 additions & 10 deletions src/components/Core/FeedbackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { Dispatch, RefObject, SetStateAction, useRef, useState } from 'react';
import { useAuthOnboarding } from '../../spaces/onboarding/auth/AuthContextOnboarding';
import { useTranslation } from 'react-i18next';
import { ButtonClickEventDetail } from '@ui5/webcomponents/dist/Button.js';
import { TextAreaInputEventDetail } from '@ui5/webcomponents/dist/TextArea.js';
import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js';
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';

Expand All @@ -35,7 +36,7 @@ export function FeedbackButton() {
setFeedbackPopoverOpen(!feedbackPopoverOpen);
};

const onFeedbackMessageChange = (event: Ui5CustomEvent<TextAreaDomRef, { value: string; previousValue: string }>) => {
const onFeedbackMessageChange = (event: Ui5CustomEvent<TextAreaDomRef, TextAreaInputEventDetail>) => {
const newValue = event.target.value;
setFeedbackMessage(newValue);
};
Expand Down Expand Up @@ -98,15 +99,7 @@ const FeedbackPopover = ({
rating: number;
onFeedbackSent: () => void;
feedbackMessage: string;
onFeedbackMessageChange: (
event: Ui5CustomEvent<
TextAreaDomRef,
{
value: string;
previousValue: string;
}
>,
) => void;
onFeedbackMessageChange: (event: Ui5CustomEvent<TextAreaDomRef, TextAreaInputEventDetail>) => void;
feedbackSent: boolean;
}) => {
const { t } = useTranslation();
Expand Down
14 changes: 12 additions & 2 deletions src/components/Members/ImportMembersDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ import { useTranslation } from 'react-i18next';
import IllustratedError from '../Shared/IllustratedError.tsx';
import { TFunction } from 'i18next';

interface CellData<T> {
cell: {
value: T | undefined;
row: {
original: Record<string, unknown>;
};
};
}

type FilteredFor = 'All' | 'Users' | 'ServiceAccounts';
type SourceType = 'Workspace' | 'Project';
type TableRow = {
Expand Down Expand Up @@ -91,8 +100,9 @@ export const ImportMembersDialog: FC<ImportMembersDialogProps> = ({
Header: t('MemberTable.columnTypeHeader'),
accessor: 'kind',
width: 145,
Cell: (instance: { cell: { row: { original: TableRow } } }) => {
const kind = ACCOUNT_TYPES.find(({ value }) => value === instance.cell.row.original.kind);
Cell: (instance: CellData<string>) => {
const original = instance.cell.row.original as TableRow;
const kind = ACCOUNT_TYPES.find(({ value }) => value === original.kind);
return (
<FlexBox gap={'0.5rem'} wrap={'NoWrap'}>
<Icon name={kind?.icon} accessibleName={kind?.label} showTooltip />
Expand Down
6 changes: 3 additions & 3 deletions src/components/Members/MemberTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type MemberTableProps = {
type CellInstance = {
cell: {
row: {
original: MemberTableRow;
original: Record<string, unknown>;
};
};
};
Expand Down Expand Up @@ -81,15 +81,15 @@ export const MemberTable: FC<MemberTableProps> = ({
icon="edit"
design="Transparent"
onClick={() => {
const selectedMember = instance.cell.row.original._member;
const selectedMember = instance.cell.row.original._member as Member;
onEditMember(selectedMember);
}}
/>
<Button
design="Transparent"
icon="delete"
onClick={() => {
const selectedMemberEmail = instance.cell.row.original.email;
const selectedMemberEmail = instance.cell.row.original.email as string;
onDeleteMember(selectedMemberEmail);
}}
/>
Expand Down
20 changes: 10 additions & 10 deletions src/components/Projects/ProjectsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ type ProjectListRow = {

type ProjectListCellInstance<T> = {
cell: {
value: string;
value: T | undefined;
row: {
original: T;
original: Record<string, unknown>;
};
};
};
Expand All @@ -47,7 +47,7 @@ export default function ProjectsList() {
{
Header: t('ProjectsListView.title'),
accessor: 'projectName',
Cell: (instance: ProjectListCellInstance<ProjectListRow>) => (
Cell: (instance: ProjectListCellInstance<string>) => (
<Link
design={'Emphasized'}
style={{
Expand All @@ -57,7 +57,7 @@ export default function ProjectsList() {
paddingBottom: '0.5rem',
}}
onClick={() => {
navigate(`/mcp/projects/${instance.cell.row.original?.projectName}`);
navigate(`/mcp/projects/${instance.cell.row.original?.projectName as string}`);
}}
>
{instance.cell.value}
Expand All @@ -68,7 +68,7 @@ export default function ProjectsList() {
Header: 'Namespace',
accessor: 'nameSpace',
width: 340,
Cell: (instance: ProjectListCellInstance<ProjectListRow>) => (
Cell: (instance: ProjectListCellInstance<string>) => (
<div
style={{
display: 'flex',
Expand All @@ -79,7 +79,7 @@ export default function ProjectsList() {
cursor: 'pointer',
}}
>
<CopyButton text={instance.cell.value} />
<CopyButton text={instance.cell.value ?? ''} />
</div>
),
},
Expand All @@ -89,7 +89,7 @@ export default function ProjectsList() {
width: 75,
disableFilters: true,
hAlign: 'Center' as const,
Cell: (instance: ProjectListCellInstance<ProjectListRow>) => (
Cell: (instance: ProjectListCellInstance<string>) => (
<div
style={{
width: '100%',
Expand All @@ -101,7 +101,7 @@ export default function ProjectsList() {
<YamlViewButton
variant="loader"
resourceType={'projects'}
resourceName={instance.cell.row.original?.projectName}
resourceName={instance.cell.row.original?.projectName as string}
/>
</div>
),
Expand All @@ -112,7 +112,7 @@ export default function ProjectsList() {
width: 60,
disableFilters: true,
hAlign: 'Center' as const,
Cell: (instance: ProjectListCellInstance<ProjectListRow>) => (
Cell: (instance: ProjectListCellInstance<string>) => (
<div
style={{
width: '100%',
Expand All @@ -121,7 +121,7 @@ export default function ProjectsList() {
alignItems: 'center',
}}
>
<ProjectsListItemMenu projectName={instance.cell.row.original?.projectName ?? ''} />
<ProjectsListItemMenu projectName={(instance.cell.row.original?.projectName as string) ?? ''} />
</div>
),
},
Expand Down
4 changes: 3 additions & 1 deletion src/components/YamlEditor/YamlEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export const YamlEditor = (props: YamlEditorProps) => {
if (isEdit) {
setEditorContent(val ?? '');
}
onChange?.(val ?? '', event);
if (event) {
onChange?.(val ?? '', event);
}
},
[isEdit, onChange],
);
Expand Down
Loading