Fixed : #1221 UI: Versioning right panel should wrap the summary. (#1226)

This commit is contained in:
Sachin Chaurasiya 2021-11-17 15:54:46 +05:30 committed by GitHub
parent e7072a3177
commit 325992d086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -55,7 +55,7 @@ const EntityVersionTimeLine: React.FC<Props> = ({
})}>
v{parseFloat(currV?.version).toFixed(1)}
</p>
<div className="tw-text-xs tw-font-normal">
<div className="tw-text-xs tw-font-normal tw-break-all">
{getSummary(currV?.changeDescription)}
</div>
<p className="tw-text-xs tw-italic">

View File

@ -166,9 +166,9 @@ export const summaryFormatter = (v: FieldChange) => {
: '{}'
);
if (v.name === 'columns') {
return `columns ${value?.map((val: any) => val?.name).join(',')}`;
return `columns ${value?.map((val: any) => val?.name).join(', ')}`;
} else if (v.name === 'tags' || v.name?.endsWith('tags')) {
return `tags ${value?.map((val: any) => val?.tagFQN)?.join(',')}`;
return `tags ${value?.map((val: any) => val?.tagFQN)?.join(', ')}`;
} else {
return v.name;
}
@ -182,13 +182,19 @@ export const getSummary = (changeDescription: ChangeDescription) => {
return (
<Fragment>
{fieldsAdded?.length > 0 ? (
<p>{fieldsAdded?.map(summaryFormatter)} has been added</p>
<p className="tw-mb-2">
{fieldsAdded?.map(summaryFormatter)} has been added
</p>
) : null}
{fieldsUpdated?.length ? (
<p>{fieldsUpdated?.map(summaryFormatter)} has been updated</p>
<p className="tw-mb-2">
{fieldsUpdated?.map(summaryFormatter)} has been updated
</p>
) : null}
{fieldsDeleted?.length ? (
<p>{fieldsDeleted?.map(summaryFormatter)} has been deleted</p>
<p className="tw-mb-2">
{fieldsDeleted?.map(summaryFormatter)} has been deleted
</p>
) : null}
</Fragment>
);