Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-24 Thread via GitHub


pawarprasad123 merged PR #697:
URL: https://github.com/apache/atlas/pull/697


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796864989


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/Labels.tsx:
##
@@ -43,12 +43,21 @@ import { useParams } from "react-router-dom";
 import { getLabels } from "@api/apiMethods/detailpageApiMethod";
 import { useAppDispatch } from "@hooks/reducerHook";
 import { fetchDetailPageData } from "@redux/slice/detailPageSlice";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. Removed the unused EntityStatus import in Labels.tsx.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-5316915762

   https://github.com/user-attachments/assets/a3300baf-b694-4b94-8285-915ebc0e940b";
 />
   https://github.com/user-attachments/assets/d0e1e626-e5a0-462d-bb1d-227759c54c8c";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796863538


##
dashboard/src/views/DetailPage/DetailPageAttributes.tsx:
##
@@ -41,6 +41,7 @@ const getDescriptionForDisplay = (desc: unknown): string => {
 };
 import { useState } from "react";
 import { useAppSelector } from "@hooks/reducerHook";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. I've removed the unused EntityStatus import here too!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796865953


##
dashboard/src/styles/propertiesTab.scss:
##
@@ -78,3 +78,7 @@
   .audit-attributes-item:nth-child(3) {
   flex: 0 0 100%;
 }
+
+.text-underline {

Review Comment:
   Thanks! Glad the cleanup looks good.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796863857


##
dashboard/src/views/DetailPage/EntityDetailPage.tsx:
##
@@ -39,11 +39,13 @@ import { fetchDetailPageData } from 
"@redux/slice/detailPageSlice";
 import { normalizeSchemaElementsAttribute } from 
"@utils/schemaElementsAttributeUtils";
 import { SchemaTabCacheState } from "@models/schemaTabTypes";
 import React from "react";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. I've removed the unused EntityStatus import from 
EntityDetailPage.tsx.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796863222


##
dashboard/src/components/ShowMore/ShowMoreView.tsx:
##
@@ -31,8 +31,10 @@ import ErrorRoundedIcon from 
"@mui/icons-material/ErrorRounded";
 import { fetchGlossaryData } from "@redux/slice/glossarySlice";
 import { fetchGlossaryDetails } from "@redux/slice/glossaryDetailsSlice";
 import ShowMoreDrawer from "./ShowMoreDrawer";
-import { openDrawer } from "@redux/slice/drawerSlice";
+import { openDrawer, closeDrawer } from "@redux/slice/drawerSlice";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. Removed the unused EntityStatus import here as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796865328


##
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##


Review Comment:
   Resolved.
   
   Removed the unused EntityStatus imports across the codebase to fix the 
TS6133 typecheck failure.
   Added the missing PURGED tests by mirroring the DELETED test cases across 
all six requested test files.
   Fixed the test structure issue in ShowMoreView.test.tsx by moving the 
closeDrawer unmount test inside the main describe block and removing the 
orphaned });.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796864680


##
dashboard/src/views/DetailPage/EntityDetailTabs/ClassificationsTab.tsx:
##
@@ -42,6 +42,7 @@ import DeleteOutlinedIcon from 
"@mui/icons-material/DeleteOutlined";
 import { isEntityPurged } from "@utils/Enum";
 import CustomModal from "@components/Modal";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. Unused EntityStatus import removed.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796864199


##
dashboard/src/views/DetailPage/EntityDetailTabs/AttributeProperties.tsx:
##
@@ -34,6 +34,8 @@ import EntityForm from "@views/Entity/EntityForm";
 import { useAppSelector } from "@hooks/reducerHook";
 import { AntSwitch } from "@utils/Muiutils";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. I've removed the unused EntityStatus import from 
AttributeProperties.tsx.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3796862921


##
dashboard/src/components/ShowMore/DrawerBodyChipView.tsx:
##
@@ -37,6 +37,8 @@ import SearchIcon from "@mui/icons-material/Search";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
 import { Link as MuiLink } from "@mui/material";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Resolved. Removed the unused EntityStatus import to fix the TypeScript build 
failure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-17 Thread via GitHub


pawarprasad123 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3795729688


##
dashboard/src/components/ShowMore/DrawerBodyChipView.tsx:
##
@@ -37,6 +37,8 @@ import SearchIcon from "@mui/icons-material/Search";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
 import { Link as MuiLink } from "@mui/material";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   TypeScript check fails
   Unused EntityStatus import



##
dashboard/src/views/DetailPage/EntityDetailTabs/ClassificationsTab.tsx:
##
@@ -42,6 +42,7 @@ import DeleteOutlinedIcon from 
"@mui/icons-material/DeleteOutlined";
 import { isEntityPurged } from "@utils/Enum";
 import CustomModal from "@components/Modal";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Unused EntityStatus import



##
dashboard/src/views/DetailPage/EntityDetailTabs/AttributeProperties.tsx:
##
@@ -34,6 +34,8 @@ import EntityForm from "@views/Entity/EntityForm";
 import { useAppSelector } from "@hooks/reducerHook";
 import { AntSwitch } from "@utils/Muiutils";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Unused EntityStatus import



##
dashboard/src/views/DetailPage/DetailPageAttributes.tsx:
##
@@ -41,6 +41,7 @@ const getDescriptionForDisplay = (desc: unknown): string => {
 };
 import { useState } from "react";
 import { useAppSelector } from "@hooks/reducerHook";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Unused EntityStatus import



##
dashboard/src/styles/propertiesTab.scss:
##
@@ -78,3 +78,7 @@
   .audit-attributes-item:nth-child(3) {
   flex: 0 0 100%;
 }
+
+.text-underline {

Review Comment:
   Used in Labels/BMAttributes/UserDefinedProperties instead of inline style={{ 
textDecoration: 'underline' }} — good cleanup, scoped and consistent.



##
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##


Review Comment:
   Remove unused EntityStatus import, or merge into a single import:
   import { isEntityModificationAllowed } from '@utils/EntityStatus';
   typecheck currently fails with TS6133.
   
   
   Missing PURGED tests (mirror DELETED cases)
   EntityDetailPage.test.tsx, ~310 (after DELETED test), Add PURGED entity test 
— hide Add Classification / Add Term buttons
   
   DetailPageAttributes.test.tsx. line 425, Add PURGED tests for Add 
Classifications, Terms, Categories, Attributes
   
   ClassificationsTab.test.tsx, line 1018, Add PURGED parent entity test for 
action buttons
   
   AttributeProperties.test.tsx, line 740, Add PURGED entity Edit button test
   
   ShowMoreView.test.tsx, line 760, Add PURGED entity delete-chip test
   
   DrawerBodyChipView.test.tsx, line 1000, Add PURGED entity delete-icon test
   
   
   --
   
   Test file structure issue
   
   ShowMoreView.test.tsx, line 1832, closeDrawer on unmount test is outside the 
main describe('ShowMoreView') block; trailing }); on line 1832 is orphaned
   
   Move the unmount test inside describe('ShowMoreView') and remove the extra 
closing });. The test can be order-dependent (passes in full suite, failed when 
run alone in one run).



##
dashboard/src/components/ShowMore/ShowMoreView.tsx:
##
@@ -31,8 +31,10 @@ import ErrorRoundedIcon from 
"@mui/icons-material/ErrorRounded";
 import { fetchGlossaryData } from "@redux/slice/glossarySlice";
 import { fetchGlossaryDetails } from "@redux/slice/glossaryDetailsSlice";
 import ShowMoreDrawer from "./ShowMoreDrawer";
-import { openDrawer } from "@redux/slice/drawerSlice";
+import { openDrawer, closeDrawer } from "@redux/slice/drawerSlice";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Unused EntityStatus import



##
dashboard/src/views/DetailPage/EntityDetailPage.tsx:
##
@@ -39,11 +39,13 @@ import { fetchDetailPageData } from 
"@redux/slice/detailPageSlice";
 import { normalizeSchemaElementsAttribute } from 
"@utils/schemaElementsAttributeUtils";
 import { SchemaTabCacheState } from "@models/schemaTabTypes";
 import React from "react";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Unused EntityStatus import



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/Labels.tsx:
##
@@ -43,12 +43,21 @@ import { useParams } from "react-router-dom";
 import { getLabels } from "@api/apiMethods/detailpageApiMethod";
 import { useAppDispatch } from "@hooks/reducerHook";
 import { fetchDetailPageData } from "@redux/slice/detailPageSlice";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   
   Unused EntityStatus import
   
   
   
   



-- 
This is an automated 

Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-14 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-5292295454

   https://github.com/user-attachments/assets/fd3324fd-1abd-4daa-9876-cd7f343c24ab";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-14 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3782953262


##
dashboard/src/views/DetailPage/EntityDetailPage.tsx:
##
@@ -408,20 +409,22 @@ const EntityDetailPage: React.FC = () => {
   >
 Classifications
   
-  
- {
-setOpenAddTagModal(true);
-  }}
->
-  {" "}
-
-  
+  {entity?.status !== EntityStatus.DELETED && (

Review Comment:
   Resolved. Added a unit test to enforce the detailPageData === null skeleton 
guard, and included !loading checks on the Add action buttons to prevent button 
flashes during the initial load.



##
dashboard/src/views/__tests__/EntityDetailPage.test.tsx:
##
@@ -287,6 +287,22 @@ describe('EntityDetailPage', () => {
}
});
 
+   it('should hide Add Classification and Add Term buttons for DELETED 
entities', () => {

Review Comment:
   Resolved. Updated the Add button test selectors to reliably use 
document.querySelector('[data-title="..."]') to accurately assert their 
presence, and fixed the mock data to properly test modal triggers.



##
dashboard/src/utils/EntityStatus.ts:
##
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export enum EntityStatus {

Review Comment:
   Resolved. Added EntityStatus.test.ts with comprehensive unit tests for 
isEntityModificationAllowed, verifying behavior across ACTIVE, DELETED, PURGED, 
and undefined states.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-14 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3782952255


##
dashboard/src/utils/EntityStatus.ts:
##
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export enum EntityStatus {
+  ACTIVE = "ACTIVE",
+  DELETED = "DELETED",
+  PURGED = "PURGED"
+}
+
+export const isEntityModificationAllowed = (status: EntityStatus | string | 
undefined): boolean => {

Review Comment:
   Resolved. Replaced all manual EntityStatus.DELETED checks with the 
isEntityModificationAllowed helper across the application to properly guard 
against both DELETED and PURGED states.



##
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##
@@ -29,6 +29,7 @@
 import React from 'react'

Review Comment:
   Resolved. Added matching PURGED negative test cases across all Properties 
tab test files to ensure Add/Edit actions remain fully blocked for purged 
entities.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-14 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3782956062


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/PropertiesTab.tsx:
##
@@ -56,7 +56,7 @@ const PropertiesTab = (props: {
 customAttributes={customAttributes}
 entity={entity}
   />
-  
+  

Review Comment:
   Resolved. Added missing test cases in Labels.test.tsx, 
BMAttributes.test.tsx, and UserDefinedProperties.test.tsx to verify that Add 
and Edit action buttons remain hidden while loading={true}.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-14 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3782954555


##
dashboard/src/views/DetailPage/__tests__/DetailPageAttributes.test.tsx:
##
@@ -392,6 +392,27 @@ describe('DetailPageAttribute', () => {
fireEvent.click(screen.getByText('close-assign-cat'))
})
 
+   it('hides Add Classifications button for DELETED entities', () => {

Review Comment:
   Resolved. Added missing test cases in DetailPageAttributes.test.tsx to 
verify that both the "Add Attributes" and "Edit Classification" action buttons 
are hidden for DELETED entities.



##
dashboard/src/components/ShowMore/ShowMoreView.tsx:
##
@@ -73,6 +74,12 @@ const ShowMoreView = ({
   const gType = searchParams.get("gtype");
   const dispatchApi = useAppDispatch();
 
+  useEffect(() => {

Review Comment:
   Resolved. Added a test case in ShowMoreView.test.tsx to explicitly verify 
that the closeDrawer action is dispatched during component unmount cleanup.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-14 Thread via GitHub


pawarprasad123 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3781904078


##
dashboard/src/utils/EntityStatus.ts:
##
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export enum EntityStatus {

Review Comment:
   line 18-27
   No EntityStatus.test.ts
   Add unit tests for isEntityModificationAllowed: ACTIVE → true, DELETED → 
false, PURGED → false, undefined → true



##
dashboard/src/views/__tests__/EntityDetailPage.test.tsx:
##
@@ -287,6 +287,22 @@ describe('EntityDetailPage', () => {
}
});
 
+   it('should hide Add Classification and Add Term buttons for DELETED 
entities', () => {

Review Comment:
   line 290-302:
   Test uses queryByLabelText(/add.*tag/i) / 
queryByText(/add.*classification/i), but Add buttons are IconButton inside 
LightTooltip with no aria-label. These selectors likely return null even for 
ACTIVE entities, so the test may pass vacuously. Use the same pattern as 
DetailPageAttributes.test.tsx: document.querySelector('[data-title="Add 
Classifications"]').



##
dashboard/src/views/DetailPage/EntityDetailPage.tsx:
##
@@ -408,20 +409,22 @@ const EntityDetailPage: React.FC = () => {
   >
 Classifications
   
-  
- {
-setOpenAddTagModal(true);
-  }}
->
-  {" "}
-
-  
+  {entity?.status !== EntityStatus.DELETED && (

Review Comment:
   line 331, 391, 454
   
   Good addition: loading || detailPageData === null skeleton guard. Add a test 
for detailPageData === null to lock this in.
   
   
   line 412-475:
   Add buttons check entity?.status !== EntityStatus.DELETED but not !loading. 
DetailPageAttributes.tsx uses !loading && data?.status !== 
EntityStatus.DELETED. Align to prevent brief button flash on entity detail 
header.
   



##
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##
@@ -29,6 +29,7 @@
 import React from 'react'

Review Comment:
   check and verify this:
   
   PURGED gap: Helper treats PURGED as non-modifiable, but UI only checks 
DELETED. If PURGED entities can still be viewed, Add/Edit may remain active 
incorrectly.
   
   
   
   All PropertiesTab tests
   
   missing test: No PURGED entity tests
   Add negative cases mirroring DELETED



##
dashboard/src/views/DetailPage/__tests__/DetailPageAttributes.test.tsx:
##
@@ -392,6 +392,27 @@ describe('DetailPageAttribute', () => {
fireEvent.click(screen.getByText('close-assign-cat'))
})
 
+   it('hides Add Classifications button for DELETED entities', () => {

Review Comment:
   missing test:
   No test for Add Attributes / Edit Classification hidden on DELETED
   
   Add tests for lines 151, 624



##
dashboard/src/utils/EntityStatus.ts:
##
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export enum EntityStatus {
+  ACTIVE = "ACTIVE",
+  DELETED = "DELETED",
+  PURGED = "PURGED"
+}
+
+export const isEntityModificationAllowed = (status: EntityStatus | string | 
undefined): boolean => {

Review Comment:
   line 24=27
   isEntityModificationAllowed() blocks both DELETED and PURGED, but no 
component uses it. Every file repeats entity?.status !== 

Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-5279860732

   https://github.com/user-attachments/assets/4477c46b-a00e-4938-81cd-f6a0c019393e";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3774951130


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/Labels.test.tsx:
##
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from 'react';
+import { render, screen, fireEvent, waitFor, act } from '@utils/test-utils';

Review Comment:
   Removed unused userEvent import from Labels.test.tsx



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3774948993


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/UserDefinedProperties.test.tsx:
##
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from 'react';
+import { render, screen, fireEvent, waitFor, act } from '@utils/test-utils';
+import userEvent from '@testing-library/user-event';
+import '@testing-library/jest-dom';
+import UserDefinedProperties from '../UserDefinedProperties';
+import { ThemeProvider, createTheme } from '@mui/material/styles';
+
+const theme = createTheme();
+
+// Mock dependencies
+const mockDispatch = jest.fn();
+jest.mock('@hooks/reducerHook', () => ({
+  useAppDispatch: () => mockDispatch
+}));
+
+jest.mock('react-router-dom', () => ({
+  ...jest.requireActual('react-router-dom'),
+  useParams: () => ({ guid: 'test-guid-123' })
+}));
+
+const mockCreateEntity = jest.fn();
+jest.mock('@api/apiMethods/entityFormApiMethod', () => ({
+  createEntity: (...args: any[]) => mockCreateEntity(...args)
+}));
+
+jest.mock('@utils/entityPayloadEnrichmentUtils', () => ({
+  enrichEntityPayloadForRelationshipSave: jest.fn(async (entity) => entity)
+}));
+
+jest.mock('react-toastify', () => ({
+  toast: {
+dismiss: jest.fn(),
+success: jest.fn(() => 'toast-id'),
+error: jest.fn(() => 'toast-id')
+  }
+}));
+
+jest.mock('@utils/Utils', () => ({
+  ...jest.requireActual('@utils/Utils'),
+  serverError: jest.fn()
+}));
+
+jest.mock('@redux/slice/detailPageSlice', () => ({
+  fetchDetailPageData: jest.fn((guid: string) => ({ type: 
'fetchDetailPageData', payload: guid }))
+}));
+
+const TestWrapper: React.FC> = ({ children }) => (
+  {children}
+);
+
+describe('UserDefinedProperties Component', () => {
+  const defaultProps = {
+loading: false,
+customAttributes: { key1: 'value1', key2: 'value2' },
+entity: { guid: 'test-guid-123', status: 'ACTIVE', customAttributes: {} }
+  };
+
+  beforeEach(() => {
+jest.clearAllMocks();
+  });
+
+  it('renders existing properties correctly', () => {
+render();
+
+expect(screen.getByText('User-defined properties')).toBeInTheDocument();
+expect(screen.getByText('key1')).toBeInTheDocument();
+expect(screen.getByText('value1')).toBeInTheDocument();
+expect(screen.getByText('key2')).toBeInTheDocument();
+expect(screen.getByText('value2')).toBeInTheDocument();
+  });
+
+  it('shows empty state message when empty', () => {
+render();
+
+expect(screen.getByText(/No properties have been created 
yet/i)).toBeInTheDocument();
+  });
+

Review Comment:
   Added negative test in UserDefinedProperties.test.tsx to verify that the 
'Edit' button is correctly hidden for DELETED entities even when they contain 
existing user-defined properties.



##
dashboard/src/utils/EntityStatus.ts:
##
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+export enum EntityStatus {
+  ACTIVE = "ACTIVE",
+  DELETED = "DELETED"

Review Comment:
   Confirmed that PURGED entities should also block modifications. I've added 
PURGED to the EntityStatus enum and introduced an 
isEntityModificationAllowed(status) helper to centrally manage these guards.



##
dashboard/src/components/EntityDisplayImage.tsx:
##


Review Comment:
   Renamed the unused error variable in the catch block to _error as per 

Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3774943987


##
dashboard/src/views/DetailPage/EntityDetailTabs/ClassificationsTab.tsx:
##
@@ -42,6 +42,7 @@ import DeleteOutlinedIcon from 
"@mui/icons-material/DeleteOutlined";
 import { isEntityPurged } from "@utils/Enum";
 import CustomModal from "@components/Modal";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Added a test in ClassificationsTab.test.tsx to verify that the Edit and 
Delete action buttons are not rendered when the parent entity has a DELETED 
status.



##
dashboard/src/views/DetailPage/EntityDetailPage.tsx:
##
@@ -39,6 +39,7 @@ import { fetchDetailPageData } from 
"@redux/slice/detailPageSlice";
 import { normalizeSchemaElementsAttribute } from 
"@utils/schemaElementsAttributeUtils";
 import { SchemaTabCacheState } from "@models/schemaTabTypes";
 import React from "react";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Added a test case in EntityDetailPage.test.tsx to verify that the 'Add 
Classification' and 'Add Term' buttons are not rendered when the entity.status 
=== 'DELETED'



##
dashboard/src/views/DetailPage/DetailPageAttributes.tsx:
##
@@ -41,6 +41,7 @@ const getDescriptionForDisplay = (desc: unknown): string => {
 };
 import { useState } from "react";
 import { useAppSelector } from "@hooks/reducerHook";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Added negative tests in DetailPageAttributes.test.tsx to verify that 'Add 
Classifications', 'Add Term', and 'Add Categories' buttons are hidden for 
DELETED entities. Also fixed DetailPageAttributes.tsx to ensure the DELETED 
guard is correctly applied to the 'Add Categories' and 'Add Attributes' buttons.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3774947458


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/BMAttributes.tsx:
##
@@ -536,41 +545,48 @@ const BMAttributes = ({ loading, bmAttributes, entity }: 
any) => {
 justifyContent="center"
   >
 
-  No properties have been created yet. To add a
-  property, click{" "}
-   void }) => {
-  e.stopPropagation();
-  setAddLabel(false);
-}}
-style={{ textDecoration: "underline" }}
-  >
-here
-  
+  {entity?.status === EntityStatus.DELETED ? (
+"No properties have been created yet."
+  ) : (
+<>
+  No properties have been created yet. To add a
+  property, click{" "}
+  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import React from 'react';
+import { render, screen, fireEvent, waitFor, act } from '@utils/test-utils';
+import userEvent from '@testing-library/user-event';
+import '@testing-library/jest-dom';
+import BMAttributes from '../BMAttributes';
+import { ThemeProvider, createTheme } from '@mui/material/styles';
+
+const theme = createTheme();
+
+// Mock dependencies
+const mockDispatch = jest.fn();
+jest.mock('@hooks/reducerHook', () => ({
+  useAppDispatch: () => mockDispatch,
+  useAppSelector: jest.fn((selector) => {
+const state = {
+  entity: {
+entityData: {
+  entityDefs: [
+{
+  name: 'DataSet',
+  businessAttributeDefs: {
+'Group1': [
+  { name: 'attr1', typeName: 'string' },
+  { name: 'attr2', typeName: 'int' }
+]
+  }
+}
+  ]
+}
+  },
+  businessMetaData: {
+businessMetaData: {
+  businessMetadataDefs: [
+{
+  name: 'Group1',
+  attributeDefs: [
+{ name: 'attr1', typeName: 'string' },
+{ name: 'attr2', typeName: 'int' }
+  ]
+}
+  ]
+}
+  }
+};
+return selector(state);
+  })
+}));
+
+jest.mock('react-router-dom', () => ({
+  ...jest.requireActual('react-router-dom'),
+  useParams: () => ({ guid: 'test-guid-123' })
+}));
+
+const mockGetEntityBusinessMetadata = jest.fn();
+jest.mock('@api/apiMethods/detailpageApiMethod', () => ({
+  getEntityBusinessMetadata: (...args: any[]) => 
mockGetEntityBusinessMetadata(...args)
+}));
+
+jest.mock('react-toastify', () => ({
+  toast: {
+dismiss: jest.fn(),
+success: jest.fn(() => 'toast-id'),
+error: jest.fn(() => 'toast-id')
+  }
+}));
+
+jest.mock('@utils/Utils', () => ({
+  ...jest.requireActual('@utils/Utils'),
+  serverError: jest.fn()
+}));
+
+jest.mock('@redux/slice/detailPageSlice', () => ({
+  fetchDetailPageData: jest.fn((guid: string) => ({ type: 
'fetchDetailPageData', payload: guid }))
+}));
+
+// Mock BMAttributesFields to avoid complex form input mocks unless needed
+jest.mock('../BMAttributesFields', () => {
+  return function MockBMAttributesFields(props: any) {
+return {props.obj?.name};
+  };
+});
+
+const TestWrapper: React.FC> = ({ children }) => (
+  {children}
+);
+
+describe('BMAttributes Component', () => {
+  const defaultProps = {
+loading: false,
+bmAttributes: {
+  'Group1': {
+'attr1': 'value1',
+'attr2': 100
+  }
+},
+entity: { guid: 'test-guid-123', status: 'ACTIVE', typeName: 'DataSet' }
+  };
+
+  beforeEach(() => {
+jest.clearAllMocks();
+  });
+
+  it('renders existing business metadata correctly', () => {
+render();
+
+expect(screen.getByText('Business Metadata')).toBeInTheDocument();
+expect(screen.getByText('Group1')).toBeInTheDocument();
+expect(screen.getByText('attr1 (string)')).toBeInTheDocument();
+expect(screen.getByText('attr2 (int)')).toBeInTheDocument();
+// BMAttributes renders HTML for string values
+expect(screen.getByText('value1')).toBeInTheDocument();

Review Comment:
   Added negative test in BMAttributes.test.tsx to verify that the 'Edit' 
button is correctly hidden for DELETED entities even when they contain existing 
business 

Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3774945683


##
dashboard/src/views/DetailPage/EntityDetailTabs/AttributeProperties.tsx:
##
@@ -202,7 +203,7 @@ const AttributeProperties = ({
 inputProps={{ "aria-label": "controlled" }}
   />
 
-{entityUpdate && (
+{entityUpdate && !loading && entity?.status !== 
EntityStatus.DELETED && (

Review Comment:
   Added a test in AttributeProperties.test.tsx to ensure the 'Edit' button is 
correctly hidden for DELETED entities



##
dashboard/src/components/ShowMore/DrawerBodyChipView.tsx:
##
@@ -37,6 +37,7 @@ import SearchIcon from "@mui/icons-material/Search";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
 import { Link as MuiLink } from "@mui/material";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   Added a test in DrawerBodyChipView.test.tsx to verify that the delete icon 
is not rendered (i.e. onDelete is undefined) when currentEntity.status === 
'DELETED'



##
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##
@@ -29,6 +29,7 @@
 import React from 'react'
 import { render, waitFor, act } from '@testing-library/react'
 import DisplayImage from '../EntityDisplayImage'

Review Comment:
   Added negative tests in BMAttributes.test.tsx, Labels.test.tsx, and 
UserDefinedProperties.test.tsx



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-08-13 Thread via GitHub


pawarprasad123 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3774380913


##
dashboard/src/views/DetailPage/EntityDetailTabs/ClassificationsTab.tsx:
##
@@ -42,6 +42,7 @@ import DeleteOutlinedIcon from 
"@mui/icons-material/DeleteOutlined";
 import { isEntityPurged } from "@utils/Enum";
 import CustomModal from "@components/Modal";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   line 259, 283
Edit/Delete actions are correctly hidden for DELETED parent entity, but 
ClassificationsTab.test.tsx has no test for this. Please add: entity { status: 
'DELETED' } → action buttons not rendered.



##
dashboard/src/views/DetailPage/EntityDetailTabs/AttributeProperties.tsx:
##
@@ -202,7 +203,7 @@ const AttributeProperties = ({
 inputProps={{ "aria-label": "controlled" }}
   />
 
-{entityUpdate && (
+{entityUpdate && !loading && entity?.status !== 
EntityStatus.DELETED && (

Review Comment:
   DELETED test- no test that “Edit Entity” hidden



##
dashboard/src/views/DetailPage/EntityDetailPage.tsx:
##
@@ -39,6 +39,7 @@ import { fetchDetailPageData } from 
"@redux/slice/detailPageSlice";
 import { normalizeSchemaElementsAttribute } from 
"@utils/schemaElementsAttributeUtils";
 import { SchemaTabCacheState } from "@models/schemaTabTypes";
 import React from "react";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   line 412, 475
   Add Classification / Add Term buttons are hidden for DELETED entities — 
please add tests in EntityDetailPage.test.tsx asserting these buttons are 
absent when entity.status === 'DELETED'.



##
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##
@@ -29,6 +29,7 @@
 import React from 'react'
 import { render, waitFor, act } from '@testing-library/react'
 import DisplayImage from '../EntityDisplayImage'

Review Comment:
   DELETED tests only cover empty state
   Existing DELETED tests in Properties tab only use empty 
labels/properties/BM. They do not verify Edit is hidden when data already 
exists.
   
   Example: a DELETED entity with existing labels should not show an Edit 
button — that case is untested.



##
dashboard/src/components/ShowMore/DrawerBodyChipView.tsx:
##
@@ -37,6 +37,7 @@ import SearchIcon from "@mui/icons-material/Search";
 import ErrorRoundedIcon from "@mui/icons-material/ErrorRounded";
 import { Link as MuiLink } from "@mui/material";
 import { cloneDeep } from "@utils/Helper";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   line 332, 336
   DELETED guard mirrors ShowMoreView, but DrawerBodyChipView.test.tsx has no 
equivalent test. Add: currentEntity={{ status: 'DELETED' }} → onDelete 
undefined / no delete icon.



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/BMAttributes.tsx:
##
@@ -536,41 +545,48 @@ const BMAttributes = ({ loading, bmAttributes, entity }: 
any) => {
 justifyContent="center"
   >
 
-  No properties have been created yet. To add a
-  property, click{" "}
-   void }) => {
-  e.stopPropagation();
-  setAddLabel(false);
-}}
-style={{ textDecoration: "underline" }}
-  >
-here
-  
+  {entity?.status === EntityStatus.DELETED ? (
+"No properties have been created yet."
+  ) : (
+<>
+  No properties have been created yet. To add a
+  property, click{" "}
+   {
 };
 import { useState } from "react";
 import { useAppSelector } from "@hooks/reducerHook";
+import { EntityStatus } from "@utils/EntityStatus";

Review Comment:
   line: 319, 389
   Same DELETED guard applied here but DetailPageAttributes.test.tsx still 
exercises “Add Classifications/Term” on active entities only. Add DELETED 
negative tests.



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/BMAttributes.test.tsx:
##
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ 

Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-31 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-5141212719

   https://github.com/user-attachments/assets/ba37df6d-2b3d-4575-b9d8-5a2bd82a5c2d";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-31 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3688768106


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/UserDefinedProperties.tsx:
##


Review Comment:
   Added an optional chaining/null-check for toastId.current prior to dismissal 
to fix the TypeScript error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-31 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3688766698


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/Labels.tsx:
##


Review Comment:
   Added a fallback check for guid from useParams() to ensure it is always 
passed as a string, fixing the TypeScript strictness failure.



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/UserDefinedProperties.tsx:
##
@@ -303,27 +312,33 @@ const UserDefinedProperties = ({ loading, 
customAttributes, entity }: any) => {
 })
 ) : (
   
-No properties have been created yet. To add a
-property,click{" "}
- void }) => {
-e.stopPropagation();
-setAddLabel(false);
-  }}
-  style={{ textDecoration: "underline" }}
->
-  here
-
+{entity?.status === EntityStatus.DELETED ? (
+  "No properties have been created yet."
+) : (
+  <>
+No properties have been created yet. To add a
+property,click{" "}
+ void }) => 
{
+e.stopPropagation();
+setAddLabel(false);
+  }}
+  className="text-color-green cursor-pointer 
text-underline"

Review Comment:
   Removed the duplicate className attributes on Typography elements and merged 
their styles into a single attribute.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-31 Thread via GitHub


Brijesh619 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3688765541


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/UserDefinedProperties.test.tsx:
##
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   Fixed the accordion/button selector issue in this file as well by updating 
the query to explicitly target the Edit button 
(screen.getByText('Edit').closest('button')!).



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/BMAttributes.test.tsx:
##
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   Updated test query selectors to explicitly target the Edit button using 
screen.getByText('Edit').closest('button')! instead of the AccordionSummary.



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/Labels.test.tsx:
##
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   Replaced the invalid getByTestId('edit-label') query with 
screen.getByText('Edit').closest('button')! so the test correctly finds and 
clicks the actual Edit button



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-30 Thread via GitHub


pawarprasad123 commented on code in PR #697:
URL: https://github.com/apache/atlas/pull/697#discussion_r3683489770


##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/UserDefinedProperties.tsx:
##


Review Comment:
   TypeScript build failure
   toast.dismiss(toastId.current) — toastId.current can be null, 
   -check throughout this file for similar failures



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/Labels.tsx:
##


Review Comment:
   TypeScript build failure
   
   guid from useParams() is string | undefined, passed to getLabels() expecting 
string



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/UserDefinedProperties.tsx:
##
@@ -303,27 +312,33 @@ const UserDefinedProperties = ({ loading, 
customAttributes, entity }: any) => {
 })
 ) : (
   
-No properties have been created yet. To add a
-property,click{" "}
- void }) => {
-e.stopPropagation();
-setAddLabel(false);
-  }}
-  style={{ textDecoration: "underline" }}
->
-  here
-
+{entity?.status === EntityStatus.DELETED ? (
+  "No properties have been created yet."
+) : (
+  <>
+No properties have been created yet. To add a
+property,click{" "}
+ void }) => 
{
+e.stopPropagation();
+setAddLabel(false);
+  }}
+  className="text-color-green cursor-pointer 
text-underline"

Review Comment:
   Duplicate className attribute on Typography
   -Merge into a single className="text-color-green cursor-pointer 
text-underline" and tighten guid / toastId types.



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/UserDefinedProperties.test.tsx:
##
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   test case are failing
   
   Same accordion/button selector issue



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/BMAttributes.test.tsx:
##
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Review Comment:
   
   Test case are failing
   
   getAllByRole('button', { name: /edit/i })[0] matches AccordionSummary 
(role=button containing “Edit” text), not the Edit button



##
dashboard/src/views/DetailPage/EntityDetailTabs/PropertiesTab/__tests__/Labels.test.tsx:
##
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or 

Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-16 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-4999676434

   ![Uploading Screenshot from 2026-07-17 11-56-03.png…]()
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-16 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-4991353198

   https://github.com/user-attachments/assets/a5b02bd8-bf4f-4ca4-b0e0-b8b8823d6273";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [PR] ATLAS-5342: Atlas React UI: Entity modification functionalities (Add Classifications, Terms, Labels, Business Metadata) remain active for DELETED entities [atlas]

2026-07-16 Thread via GitHub


Brijesh619 commented on PR #697:
URL: https://github.com/apache/atlas/pull/697#issuecomment-4991343228

   https://github.com/user-attachments/assets/7f7ce384-2c33-45fe-aae7-a987127ff29d";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]