Skip to content

Commit

Permalink
feat: show all entities related to user (open-metadata#12112)
Browse files Browse the repository at this point in the history
* feat: show all entities related to user

* fix: layout issues

* fix: review comments
  • Loading branch information
karanh37 authored Jun 23, 2023
1 parent eeec58b commit 5e2866d
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
.left-container {
flex: 0 0 @left-side-panel-width;
border-right: @global-border;
border-right: @global-border !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ const Users = ({

return (
<PageLayoutV1
className="tw-h-full"
className="user-layout h-full"
leftPanel={fetchLeftPanel()}
pageTitle={t('label.user')}>
<div data-testid="table-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
}

.user-page-layout {
height: @users-page-tabs-height;
.page-layout-rightpanel {
padding-right: 0 !important;
background-color: @white;
Expand All @@ -38,3 +39,20 @@
border-top: 0;
}
}

.user-layout {
.activity-feed-tab {
.center-container {
height: @users-page-tabs-height;
}
.right-container {
height: @users-page-tabs-height;
}
}
.summary-panel-container {
height: @users-page-tabs-height;
}
.explore-search-card {
margin: 0 12px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,34 @@ const UserPage = () => {
.finally(() => setIsLoading(false));
};

const getQueryFilters = (fetchOwnedEntities: boolean) => {
if (fetchOwnedEntities) {
const teamsIds = (userData.teams ?? []).map((team) => team.id);
const mergedIds = [
...teamsIds.map((id) => `owner.id:${id}`),
`owner.id:${userData.id}`,
].join(' OR ');

return `(${mergedIds})`;
} else {
return `followers:${userData.id}`;
}
};

const fetchEntities = async (
fetchOwnedEntities = false,
handleEntity: Dispatch<SetStateAction<AssetsDataType>>
) => {
const entity = fetchOwnedEntities ? ownedEntities : followingEntities;

if (userData.id) {
setIsUserEntitiesLoading(true);
try {
const response = await searchData(
'',
entity.currPage,
PAGE_SIZE,
fetchOwnedEntities
? `owner.id:${userData.id}`
: `followers:${userData.id}`,
getQueryFilters(fetchOwnedEntities),
'',
'',
myDataSearchIndex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@
overflow-x: hidden;
}
}

.ant-drawer-header {
border-bottom: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@
// Sizing
@left-side-panel-width: 230px;
@entity-details-tab-height: calc(100vh - 236px);
@users-page-tabs-height: calc(
100vh - 122px
); /* navbar+tab_height+padding = 64+46+12 */

0 comments on commit 5e2866d

Please sign in to comment.