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


##########
dashboard/src/views/SideBar/SideBarTree/SideBarTree.tsx:
##########
@@ -27,6 +27,7 @@ import {
   useRef,
   useState,
   useMemo,
+  useCallback,

Review Comment:
   Swapped out all the lingering sx props for inline styles and styled 
components.



##########
dashboard/src/views/SideBar/SideBarBody.tsx:
##########
@@ -308,198 +393,125 @@ const SideBarBody = (props: {
                     data-cy="atlas-logo"
                   />
                 </span>
-                <Paper
-                  sx={{
-                    width: "100%",
-                  }}
-                  className="sidebar-searchbar"
-                >
-                  <InputBase
-                    fullWidth
-                    sx={{ color: "rgba(0, 0, 0, 0.7)" }}
-                    placeholder="Entities, Classifications, Glossaries"
-                    inputProps={{ "aria-label": "search" }}
-                    value={searchTerm}
-                    onChange={(e: ChangeEvent<HTMLInputElement>) => {
-                      setSearchTerm(e.target.value);
-                    }}
-                    data-cy="searchNode"
-                  />
-
-                  <IconButton type="submit" size="small" aria-label="search">
-                    <SearchIcon fontSize="inherit" />
-                  </IconButton>
-                </Paper>
+                <SidebarSearchInput
+                  searchTerm={searchTerm}
+                  onChange={setSearchTerm}
+                  dataCy="searchNode"
+                />
               </Stack>
             </DrawerHeader>
           )}
           <Paper
             className="sidebar-wrapper"
-            sx={{
-              flex: 1,
-              overflow: "hidden auto",
-              paddingBottom: "0px", // Account for bottom toggle button
-              ...(open == false && {
-                overflow: "hidden",
-              }),
-            }}
+            style={{ display: open ? "block" : "none" }}

Review Comment:
   Created a new .sidebar-wrapper--hidden modifier class in sidebar.scss and 
updated the Paper component to use it dynamically instead of the inline display 
property.



##########
dashboard/src/views/SideBar/__tests__/SideBarBody.test.tsx:
##########
@@ -15,6 +15,7 @@
  * limitations under the License.

Review Comment:
   The logo click tests now properly assert that mockNavigate was called with 
the correct /search path, and I've removed the obsolete "Window Resize" test 
entirely since the dragger was removed.



##########
dashboard/src/components/__tests__/EntityDisplayImage.test.tsx:
##########
@@ -15,269 +15,158 @@
  * limitations under the License.
  */

Review Comment:
   I've added a test case in EntityDisplayImage.test.tsx to ensure id and 
data-cy don't render as "undefined" when the entity is missing a guid



-- 
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]

Reply via email to