mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-10 14:57:57 +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
|
||||
);
|
||||
|
||||
await page.locator('[role="tablist"] [data-icon="right"]').click();
|
||||
|
||||
// Click on edit description button
|
||||
await page.locator('[data-testid="edit-description"]').click();
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
|
||||
@ -11,12 +11,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DownOutlined, PlusOutlined, RightOutlined } from '@ant-design/icons';
|
||||
import { PlusOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
Avatar,
|
||||
Button,
|
||||
Col,
|
||||
Collapse,
|
||||
Modal,
|
||||
Row,
|
||||
Space,
|
||||
@ -911,6 +910,12 @@ const TeamDetailsV1 = ({
|
||||
]
|
||||
);
|
||||
|
||||
const editDescriptionPermission = useMemo(
|
||||
() =>
|
||||
(entityPermissions.EditAll || entityPermissions.EditDescription) &&
|
||||
!isTeamDeleted,
|
||||
[entityPermissions, isTeamDeleted]
|
||||
);
|
||||
const teamsCollapseHeader = useMemo(
|
||||
() => (
|
||||
<>
|
||||
@ -983,6 +988,17 @@ const TeamDetailsV1 = ({
|
||||
updateTeamHandler={updateTeamHandler}
|
||||
/>
|
||||
</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,
|
||||
afterDeleteAction,
|
||||
getDeleteMessagePostFix,
|
||||
editDescriptionPermission,
|
||||
onDescriptionUpdate,
|
||||
]
|
||||
);
|
||||
|
||||
@ -1077,13 +1095,6 @@ const TeamDetailsV1 = ({
|
||||
]
|
||||
);
|
||||
|
||||
const editDescriptionPermission = useMemo(
|
||||
() =>
|
||||
(entityPermissions.EditDescription || entityPermissions.EditAll) &&
|
||||
!isTeamDeleted,
|
||||
[entityPermissions, isTeamDeleted]
|
||||
);
|
||||
|
||||
if (isTeamMemberLoading > 0) {
|
||||
return <Loader />;
|
||||
}
|
||||
@ -1108,39 +1119,9 @@ const TeamDetailsV1 = ({
|
||||
|
||||
<Col
|
||||
className="teams-profile-container"
|
||||
data-testid="team-detail-header"
|
||||
data-testid="team-details-collapse"
|
||||
span={24}>
|
||||
<Collapse
|
||||
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>
|
||||
{teamsCollapseHeader}
|
||||
</Col>
|
||||
|
||||
<Col className="m-t-sm" span={24}>
|
||||
|
||||
@ -85,7 +85,6 @@
|
||||
}
|
||||
|
||||
.teams-profile-container {
|
||||
background: @user-profile-background;
|
||||
.collapse-panel-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user