Commit f4f5ff02 authored by Dimitrios Gogos's avatar Dimitrios Gogos
Browse files

feat: update descriptions in API client dialogs and notices for clarity

parent 11cb46d6
Loading
Loading
Loading
Loading
+1 −1
Changes for portal-gui/src/app/config/navigation.ts: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ export const mainNavItems: NavItem[] = [
  {
    title: 'API clients',
    to: ROUTES.API_CLIENTS,
    description: 'Credentials for calling the APIs from your own systems.',
    description: 'Credentials for calling the APIs from your own application.',
    icon: KeyRoundIcon,
    showInSidebar: true,
    roles: ['app-provider'],
+3 −2
Changes for portal-gui/src/components/api-clients/api-client-secret-dialog.tsx: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -31,8 +31,9 @@ export function ApiClientSecretDialog({
        <DialogHeader>
          <DialogTitle>{client.name} created</DialogTitle>
          <DialogDescription>
            Copy the secret now: it won&apos;t be shown again. If you lose it,
            delete this client and create a new one.
            Copy the secret now: it won&apos;t be shown here again. If you lose
            it, ask an administrator to reset it, or delete this client and
            create a new one.
          </DialogDescription>
        </DialogHeader>

+2 −12
Changes for portal-gui/src/components/api-clients/api-clients-notices.tsx: 2 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -6,19 +6,9 @@ export function ApiClientsNotice() {
    <div className="mx-4 flex gap-3 rounded-md border bg-muted/40 p-3 text-sm lg:mx-6">
      <InfoIcon className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
      <p>
        API clients keep working until they are deleted. If you leave your
        organization, lose access to a product or no longer need an app, delete
        its API client, or ask an administrator to.
        API clients keep working until you delete them. Delete the ones you no
        longer need.
      </p>
    </div>
  );
}

export function ApiClientsFootnote() {
  return (
    <p className="px-4 text-sm text-muted-foreground lg:px-6">
      Changes an administrator makes in Keycloak may not show here. You can
      still delete any client from this page.
    </p>
  );
}
+3 −3
Changes for portal-gui/src/components/api-clients/create-api-client-dialog.tsx: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -69,8 +69,8 @@ export function CreateApiClientDialog({
        <DialogHeader>
          <DialogTitle>Create API client</DialogTitle>
          <DialogDescription>
            A client ID and secret for calling the APIs from your own systems.
            The products can&apos;t be changed afterwards.
            A client ID and secret for calling the APIs from your own
            application. The products can&apos;t be changed afterwards.
          </DialogDescription>
        </DialogHeader>

@@ -82,7 +82,7 @@ export function CreateApiClientDialog({
              aria-required
              value={name}
              onChange={(e) => setName(e.target.value)}
              placeholder="Fleet tracker"
              placeholder="My application"
              maxLength={100}
            />
          </div>
+2 −6
Changes for portal-gui/src/features/api-clients/api-clients.tsx: 2 added lines, 6 removed lines.
Original line number Diff line number Diff line
import { useMemo, useState } from 'react';
import { Plus } from 'lucide-react';

import {
  ApiClientsFootnote,
  ApiClientsNotice,
} from '@/components/api-clients/api-clients-notices';
import { ApiClientsNotice } from '@/components/api-clients/api-clients-notices';
import { getApiClientColumns } from '@/components/api-clients/api-client-columns';
import { ApiClientSecretDialog } from '@/components/api-clients/api-client-secret-dialog';
import { CreateApiClientDialog } from '@/components/api-clients/create-api-client-dialog';
@@ -58,7 +55,7 @@ export function ApiClientsPage() {
              empty={clients.length === 0}
              errorTitle="Could not load your API clients"
              emptyTitle="No API clients yet"
              emptyDescription="Create one to call the APIs from your own systems."
              emptyDescription="Create one to call the APIs from your own application."
              onRetry={retry}
            >
              <DataTable
@@ -68,7 +65,6 @@ export function ApiClientsPage() {
                noun="API clients"
                onRefresh={retry}
              />
              <ApiClientsFootnote />
            </PageState>
          </>
        )}