Skip to content

Commit

Permalink
[RHOAIENG-6574] General - Microcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
jpuzz0 committed Aug 15, 2024
1 parent 8d231fb commit b8ad43a
Show file tree
Hide file tree
Showing 23 changed files with 66 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ModelRegistrySettings {

private findHeading() {
cy.findByTestId('app-page-title').should('exist');
cy.findByTestId('app-page-title').contains('Model Registry Settings');
cy.findByTestId('app-page-title').contains('Model registry settings');
}

findNavItem() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ describe('Archiving version', () => {
modelVersionArchive.visitModelVersionList();

const modelVersionRow = modelRegistry.getModelVersionRow('model version 3');
modelVersionRow.findKebabAction('Archive version').click();
modelVersionRow.findKebabAction('Archive model version').click();
archiveVersionModal.findArchiveButton().should('be.disabled');
archiveVersionModal.findModalTextInput().fill('model version 3');
archiveVersionModal.findArchiveButton().should('be.enabled').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ describe('Deploy model version', () => {

// Validate model framework section
kserveModal.findModelFrameworkSelect().should('be.disabled');
cy.findByText('The source model format is').should('not.exist');
cy.findByText('The format of the source model is').should('not.exist');
kserveModal.findServingRuntimeTemplateDropdown().findSelectOption('Multi Platform').click();
kserveModal.findModelFrameworkSelect().should('be.enabled');
cy.findByText(
`The source model format is ${modelArtifactMocked.modelFormatName} - ${modelArtifactMocked.modelFormatVersion}`,
`The format of the source model is ${modelArtifactMocked.modelFormatName} - ${modelArtifactMocked.modelFormatVersion}`,
).should('exist');

// Validate data connection section
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/components/DashboardDescriptionListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import {
DescriptionListDescription,
DescriptionListGroup,
DescriptionListTerm,
Flex,
FlexItem,
Split,
SplitItem,
} from '@patternfly/react-core';
Expand All @@ -25,6 +27,7 @@ type EditableProps = {

export type DashboardDescriptionListGroupProps = {
title: React.ReactNode;
tooltip?: React.ReactNode;
action?: React.ReactNode;
isEmpty?: boolean;
contentWhenEmpty?: React.ReactNode;
Expand All @@ -34,6 +37,7 @@ export type DashboardDescriptionListGroupProps = {
const DashboardDescriptionListGroup: React.FC<DashboardDescriptionListGroupProps> = (props) => {
const {
title,
tooltip,
action,
isEmpty,
contentWhenEmpty,
Expand Down Expand Up @@ -96,7 +100,15 @@ const DashboardDescriptionListGroup: React.FC<DashboardDescriptionListGroupProps
</Split>
</DescriptionListTerm>
) : (
<DescriptionListTerm>{title}</DescriptionListTerm>
<DescriptionListTerm>
<Flex
spaceItems={{ default: 'spaceItemsSm' }}
alignItems={{ default: 'alignItemsCenter' }}
>
<FlexItem>{title}</FlexItem>
{tooltip}
</Flex>
</DescriptionListTerm>
)}
<DescriptionListDescription className={isEmpty && !isEditing ? text.disabledColor_100 : ''}>
{isEditing ? contentWhenEditing : isEmpty ? contentWhenEmpty : children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const ModelRegistryCoreLoader: React.FC<ModelRegistryCoreLoaderProps> =
title={
<TitleWithIcon title="Model registry" objectType={ProjectObjectType.registeredModels} />
}
description="View and manage all of your registered models. Registering models to model registry allows you to manage their content, metadata, versions, and user access settings."
description="Select a model registry to view and manage your registered models. Model registries provide a structured and organized way to store, share, version, deploy, and track models."
headerContent={
<ModelRegistrySelectorNavigator
getRedirectPath={(modelRegistryName) => `/modelRegistry/${modelRegistryName}`}
Expand Down
11 changes: 4 additions & 7 deletions frontend/src/pages/modelRegistry/ModelRegistryRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ const ModelRegistryRoutes: React.FC = () => (
element={<ModelVersionsDetails tab={ModelVersionDetailsTab.DETAILS} empty={false} />}
/>
<Route
path={ModelVersionDetailsTab.REGISTERED_DEPLOYMENTS}
path={ModelVersionDetailsTab.DEPLOYMENTS}
element={
<ModelVersionsDetails
tab={ModelVersionDetailsTab.REGISTERED_DEPLOYMENTS}
empty={false}
/>
<ModelVersionsDetails tab={ModelVersionDetailsTab.DEPLOYMENTS} empty={false} />
}
/>
<Route path="*" element={<Navigate to="." />} />
Expand All @@ -61,10 +58,10 @@ const ModelRegistryRoutes: React.FC = () => (
}
/>
<Route
path={ModelVersionDetailsTab.REGISTERED_DEPLOYMENTS}
path={ModelVersionDetailsTab.DEPLOYMENTS}
element={
<ModelVersionsArchiveDetails
tab={ModelVersionDetailsTab.REGISTERED_DEPLOYMENTS}
tab={ModelVersionDetailsTab.DEPLOYMENTS}
empty={false}
/>
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/modelRegistry/screens/ModelRegistry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ModelRegistry: React.FC<ModelRegistryProps> = ({ ...pageProps }) => {
<ApplicationsPage
{...pageProps}
title={<TitleWithIcon title="Model registry" objectType={ProjectObjectType.deployedModels} />}
description="View and manage all of your registered models. Registering models to model registry allows you to manage their content, metadata, versions, and user access settings."
description="Select a model registry to view and manage your registered models. Model registries provide a structured and organized way to store, share, version, deploy, and track models."
headerContent={
<ModelRegistrySelectorNavigator
getRedirectPath={(modelRegistryName) => `/modelRegistry/${modelRegistryName}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const ModelVersionDetailsTabs: React.FC<ModelVersionDetailTabsProps> = ({
</PageSection>
</Tab>
<Tab
eventKey={ModelVersionDetailsTab.REGISTERED_DEPLOYMENTS}
title={<TabTitleText>{ModelVersionDetailsTabTitle.REGISTERED_DEPLOYMENTS}</TabTitleText>}
aria-label="Registered deployments tab"
data-testid="registered-deployments-tab"
eventKey={ModelVersionDetailsTab.DEPLOYMENTS}
title={<TabTitleText>{ModelVersionDetailsTabTitle.DEPLOYMENTS}</TabTitleText>}
aria-label="Deployments tab"
data-testid="deployments-tab"
>
<PageSection isFilled variant="light" data-testid="registered-deployments-tab-content">
<PageSection isFilled variant="light" data-testid="deployments-tab-content">
<ModelVersionRegisteredDeploymentsView modelVersion={mv} />
</PageSection>
</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import useModelArtifactsByVersionId from '~/concepts/modelRegistry/apiHooks/useModelArtifactsByVersionId';
import { ModelRegistryContext } from '~/concepts/modelRegistry/context/ModelRegistryContext';
import ModelTimestamp from '~/pages/modelRegistry/screens/components/ModelTimestamp';
import DashboardHelpTooltip from '~/concepts/dashboard/DashboardHelpTooltip';

type ModelVersionDetailsViewProps = {
modelVersion: ModelVersion;
Expand Down Expand Up @@ -118,7 +119,14 @@ const ModelVersionDetailsView: React.FC<ModelVersionDetailsViewProps> = ({
>
{modelArtifact.items[0]?.modelFormatName}
</DashboardDescriptionListGroup>
<DashboardDescriptionListGroup title="Owner">{mv.author}</DashboardDescriptionListGroup>
<DashboardDescriptionListGroup
title="Author"
tooltip={
<DashboardHelpTooltip content="The author is the user who registered the model version." />
}
>
{mv.author}
</DashboardDescriptionListGroup>
<DashboardDescriptionListGroup
title="Last modified at"
isEmpty={!mv.lastUpdateTimeSinceEpoch}
Expand All @@ -127,7 +135,7 @@ const ModelVersionDetailsView: React.FC<ModelVersionDetailsViewProps> = ({
<ModelTimestamp timeSinceEpoch={mv.lastUpdateTimeSinceEpoch} />
</DashboardDescriptionListGroup>
<DashboardDescriptionListGroup
title="Created at"
title="Registered"
isEmpty={!mv.createTimeSinceEpoch}
contentWhenEmpty="Unknown"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const ModelVersionRegisteredDeploymentsView: React.FC<
//TODO: implement component
return (
<EmptyModelRegistryState
title="No registered deployments"
description="You can deploy this version using Actions dropdown in the header"
title="No deployments from model registry"
description="No deployments initiated from model registry for this model version."
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export enum ModelVersionDetailsTab {
DETAILS = 'details',
REGISTERED_DEPLOYMENTS = 'registered_deployments',
DEPLOYMENTS = 'deployments',
}

export enum ModelVersionDetailsTabTitle {
DETAILS = 'Details',
REGISTERED_DEPLOYMENTS = 'Registered deployments',
DEPLOYMENTS = 'Deployments',
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ModelVersionListView: React.FC<ModelVersionListViewProps> = ({
<EmptyModelRegistryState
testid="empty-model-versions"
title="No versions"
description={`${rm?.name} has no versions registered to it. Register a version to this model.`}
description={`${rm?.name} has no registered versions. Register a version to this model.`}
primaryActionText="Register new version"
secondaryActionText="View archived versions"
primaryActionOnClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const mvColumns: SortableData<ModelVersion>[] = [
},
},
{
field: 'owner',
label: 'Owner',
field: 'author',
label: 'Author',
sortable: (a: ModelVersion, b: ModelVersion): number => {
const first = a.author || '';
const second = b.author || '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ModelVersionsTableRow: React.FC<ModelVersionsTableRowProps> = ({
onClick: () => setIsDeployModalOpen(true),
},
{
title: 'Archive version',
title: 'Archive model version',
onClick: () => setIsArchiveModalOpen(true),
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const RegisterModel: React.FC = () => {
return (
<ApplicationsPage
title="Register model"
description="Create a new model and register a first version of the new model."
description="Create a new model and register the first version of your new model."
breadcrumb={
<Breadcrumb>
<BreadcrumbItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const RegisteredModelListView: React.FC<RegisteredModelListViewProps> = ({
<EmptyModelRegistryState
testid="empty-registered-models"
title="No models in selected registry"
description={`${preferredModelRegistry?.metadata.name} has no models registered to it. Register model to this registry, or select a different one.`}
description={`${preferredModelRegistry?.metadata.name} has no active registered models. Register a model in this registry, or select a different registry.`}
primaryActionText="Register model"
secondaryActionText="View archived models"
primaryActionOnClick={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ export const rmColumns: SortableData<RegisteredModel>[] = [
field: 'owner',
label: 'Owner',
sortable: false, // TODO Add sortable once RHOAIENG-7566 is completed.
info: {
tooltip: 'The owner is the user who registered the model.',
tooltipProps: {
isContentLeftAligned: true,
},
},
},
{
field: 'kebab',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/modelRegistrySettings/CreateModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ const CreateModal: React.FC<CreateModalProps> = ({ isOpen, onClose, refresh }) =
}}
/>
<FormSection
title="Database"
description="This is where model data is stored. You need to connect to an external database."
title="Connect to external MySQL database"
description="This external database is where model data is stored."
>
<FormGroup label="Host" isRequired fieldId="mr-host">
<TextInput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,12 @@ const DeleteModelRegistryModal: React.FC<DeleteModelRegistryModalProps> = ({
<StackItem>
<TextContent>
<Text component="p">
Only the <strong>{mr.metadata.name}</strong> itself will be removed. You&apos;ll need
to manually delete all data in the connected database. Additionally, the default group{' '}
<strong>{`${mr.metadata.name}-users`}</strong> and any permissions associated with{' '}
<strong>{mr.metadata.name}</strong> will be deleted. Any other groups and roles
created by you will need to be manually deleted.
The <strong>{mr.metadata.name}</strong> model registry, its default group, and any
permissions associated with it will be deleted. Data located in the database connected
to the registry will be unaffected.
</Text>
<Text component="p">
Type <strong>{mr.metadata.name}</strong> to confirm deletion.
Type <strong>{mr.metadata.name}</strong> to confirm deletion:
</Text>
</TextContent>
</StackItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ModelRegistriesManagePermissions: React.FC = () => {

return (
<ApplicationsPage
title={`Manage permissions of ${mrName}`}
title={`Manage ${mrName} permissions`}
description="Manage access to this model registry for individual users and user groups, and for service accounts in a project."
breadcrumb={
<Breadcrumb>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ModelRegistrySettings: React.FC = () => {
return (
<>
<ApplicationsPage
title="Model Registry Settings"
title="Model registry settings"
description="Manage model registry settings for all users in your organization."
loaded={loaded}
loadError={loadError}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ViewDatabaseConfigModal: React.FC<ViewDatabaseConfigModalProps> = ({
return (
<Modal
title="View database configuration"
description="This external database is where model data is stored."
description="Database configuration cannot be edited after registry creation. To change the database configuration, you must delete the registry and create a new one."
isOpen={isOpen}
onClose={onClose}
variant="medium"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ const InferenceServiceFrameworkSection: React.FC<InferenceServiceFrameworkSectio
{registeredModelFormat && models.length !== 0 && (
<FormHelperText>
<HelperText>
<HelperTextItem>The source model format is {registeredModelFormat}</HelperTextItem>
<HelperTextItem>
The format of the source model is {registeredModelFormat}
</HelperTextItem>
</HelperText>
</FormHelperText>
)}
Expand Down

0 comments on commit b8ad43a

Please sign in to comment.