Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(UI) #8555: Tags removal issue #9055

Merged
merged 13 commits into from
Nov 30, 2022
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
Expand Up @@ -586,7 +586,7 @@ const DashboardDetails = ({
<Tooltip
title={
dashboardPermissions.EditAll
? t('label.edit-description')
? t('label.edit-entity', { entity: t('label.description') })
: t('message.no-permission-for-action')
}>
<button
Expand All @@ -606,43 +606,46 @@ const DashboardDetails = ({
),
},
{
title: t('label.tags'),
title: t('label.tag-plural'),
dataIndex: 'tags',
key: 'tags',
width: 300,
render: (text, record, index) => (
<div
className="relative tableBody-cell"
data-testid="tags-wrapper"
onClick={() => handleTagContainerClick(record, index)}>
{deleted ? (
<div className="tw-flex tw-flex-wrap">
<TagsViewer sizeCap={-1} tags={text || []} />
</div>
) : (
<TagsContainer
editable={editChartTags?.index === index}
isLoading={isTagLoading && editChartTags?.index === index}
selectedTags={text as EntityTags[]}
showAddTagButton={
dashboardPermissions.EditAll || dashboardPermissions.EditTags
}
size="small"
tagList={tagList}
type="label"
onCancel={() => {
handleChartTagSelection();
}}
onSelectionChange={(tags) => {
handleChartTagSelection(tags, {
chart: record,
index,
});
}}
/>
)}
</div>
),
render: (tags: Dashboard['tags'], record, index) => {
return (
<div
className="relative tableBody-cell"
data-testid="tags-wrapper"
onClick={() => handleTagContainerClick(record, index)}>
{deleted ? (
<Space>
<TagsViewer sizeCap={-1} tags={tags || []} />
</Space>
) : (
<TagsContainer
editable={editChartTags?.index === index}
isLoading={isTagLoading && editChartTags?.index === index}
selectedTags={tags || []}
showAddTagButton={
dashboardPermissions.EditAll ||
dashboardPermissions.EditTags
}
size="small"
tagList={tagList}
type="label"
onCancel={() => {
handleChartTagSelection();
}}
onSelectionChange={(tags) => {
handleChartTagSelection(tags, {
chart: record,
index,
});
}}
/>
)}
</div>
);
},
},
],
[
Expand All @@ -652,6 +655,7 @@ const DashboardDetails = ({
tagList,
deleted,
isTagLoading,
charts,
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const CustomControls: FC<ControlProps> = ({
disabled={!hasEditAccess}
title={
hasEditAccess
? t('label.edit-lineage')
? t('label.edit-entity', { entity: t('label.lineage') })
: NO_PERMISSION_FOR_ACTION
}
onClick={onEditLinageClick}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ const EntityTable = ({
render: renderDescription,
},
{
title: t('label.tags'),
title: t('label.tag-plural'),
dataIndex: 'tags',
key: 'tags',
accessor: 'tags',
Expand Down Expand Up @@ -702,7 +702,9 @@ const EntityTable = ({
/>
{editColumn && (
<ModalWithMarkdownEditor
header={`${t('label:edit-column')}: "${editColumn.column.name}"`}
header={`${t('label.edit-entity', { entity: t('label.column') })}: "${
editColumn.column.name
}"`}
placeholder={t('label.enter-column-description')}
value={editColumn.column.description as string}
onCancel={closeEditColumnModal}
Expand Down
Loading