mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-11 15:28:00 +00:00
Fix(uI) : Removed collapse button from teams page (#21306)
* removed collapse button from teams page * removed unwated spacing * addressed comment * fixed playwright tests --------- Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com>
This commit is contained in:
parent
d5d9a146af
commit
f9f438fa09
@ -283,8 +283,6 @@ test.describe('Teams Page', () => {
|
|||||||
teamDetails.updatedName
|
teamDetails.updatedName
|
||||||
);
|
);
|
||||||
|
|
||||||
await page.locator('[role="tablist"] [data-icon="right"]').click();
|
|
||||||
|
|
||||||
// Click on edit description button
|
// Click on edit description button
|
||||||
await page.locator('[data-testid="edit-description"]').click();
|
await page.locator('[data-testid="edit-description"]').click();
|
||||||
await page.waitForLoadState('domcontentloaded');
|
await page.waitForLoadState('domcontentloaded');
|
||||||
|
|||||||
@ -11,12 +11,11 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DownOutlined, PlusOutlined, RightOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import {
|
import {
|
||||||
Avatar,
|
Avatar,
|
||||||
Button,
|
Button,
|
||||||
Col,
|
Col,
|
||||||
Collapse,
|
|
||||||
Modal,
|
Modal,
|
||||||
Row,
|
Row,
|
||||||
Space,
|
Space,
|
||||||
@ -911,6 +910,12 @@ const TeamDetailsV1 = ({
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const editDescriptionPermission = useMemo(
|
||||||
|
() =>
|
||||||
|
(entityPermissions.EditAll || entityPermissions.EditDescription) &&
|
||||||
|
!isTeamDeleted,
|
||||||
|
[entityPermissions, isTeamDeleted]
|
||||||
|
);
|
||||||
const teamsCollapseHeader = useMemo(
|
const teamsCollapseHeader = useMemo(
|
||||||
() => (
|
() => (
|
||||||
<>
|
<>
|
||||||
@ -983,6 +988,17 @@ const TeamDetailsV1 = ({
|
|||||||
updateTeamHandler={updateTeamHandler}
|
updateTeamHandler={updateTeamHandler}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="m-t-md">
|
||||||
|
<DescriptionV1
|
||||||
|
wrapInCard
|
||||||
|
description={currentTeam.description ?? ''}
|
||||||
|
entityName={getEntityName(currentTeam)}
|
||||||
|
entityType={EntityType.TEAM}
|
||||||
|
hasEditAccess={editDescriptionPermission}
|
||||||
|
showCommentsIcon={false}
|
||||||
|
onDescriptionUpdate={onDescriptionUpdate}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
[
|
[
|
||||||
@ -999,6 +1015,8 @@ const TeamDetailsV1 = ({
|
|||||||
updateTeamHandler,
|
updateTeamHandler,
|
||||||
afterDeleteAction,
|
afterDeleteAction,
|
||||||
getDeleteMessagePostFix,
|
getDeleteMessagePostFix,
|
||||||
|
editDescriptionPermission,
|
||||||
|
onDescriptionUpdate,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1077,13 +1095,6 @@ const TeamDetailsV1 = ({
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
const editDescriptionPermission = useMemo(
|
|
||||||
() =>
|
|
||||||
(entityPermissions.EditDescription || entityPermissions.EditAll) &&
|
|
||||||
!isTeamDeleted,
|
|
||||||
[entityPermissions, isTeamDeleted]
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isTeamMemberLoading > 0) {
|
if (isTeamMemberLoading > 0) {
|
||||||
return <Loader />;
|
return <Loader />;
|
||||||
}
|
}
|
||||||
@ -1108,39 +1119,9 @@ const TeamDetailsV1 = ({
|
|||||||
|
|
||||||
<Col
|
<Col
|
||||||
className="teams-profile-container"
|
className="teams-profile-container"
|
||||||
data-testid="team-detail-header"
|
data-testid="team-details-collapse"
|
||||||
span={24}>
|
span={24}>
|
||||||
<Collapse
|
{teamsCollapseHeader}
|
||||||
accordion
|
|
||||||
bordered={false}
|
|
||||||
className="header-collapse-custom-collapse"
|
|
||||||
expandIcon={({ isActive }) => (
|
|
||||||
<span
|
|
||||||
className={classNames('ant-collapse-arrow', {
|
|
||||||
'arrow-icon-non-organization': !isOrganization,
|
|
||||||
})}>
|
|
||||||
{isActive ? <DownOutlined /> : <RightOutlined />}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
expandIconPosition="end">
|
|
||||||
<Collapse.Panel
|
|
||||||
className={classNames('collapse-panel-container', {
|
|
||||||
'm-t-sm': !isOrganization,
|
|
||||||
})}
|
|
||||||
data-testid="team-details-collapse"
|
|
||||||
header={teamsCollapseHeader}
|
|
||||||
key="1">
|
|
||||||
<DescriptionV1
|
|
||||||
wrapInCard
|
|
||||||
description={currentTeam.description ?? ''}
|
|
||||||
entityName={getEntityName(currentTeam)}
|
|
||||||
entityType={EntityType.TEAM}
|
|
||||||
hasEditAccess={editDescriptionPermission}
|
|
||||||
showCommentsIcon={false}
|
|
||||||
onDescriptionUpdate={onDescriptionUpdate}
|
|
||||||
/>
|
|
||||||
</Collapse.Panel>
|
|
||||||
</Collapse>
|
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col className="m-t-sm" span={24}>
|
<Col className="m-t-sm" span={24}>
|
||||||
|
|||||||
@ -85,7 +85,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.teams-profile-container {
|
.teams-profile-container {
|
||||||
background: @user-profile-background;
|
|
||||||
.collapse-panel-container {
|
.collapse-panel-container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user