Skip to content

Conversation

sakethvarma397
Copy link
Contributor

@sakethvarma397 sakethvarma397 commented Oct 10, 2025

Currently, the only way to see all the views in the instance is via the Views bar next to the Search. In the Manage Views page the users can only see the views created by themselves and not the public views.
This would be confusing to users (especially admins and other with manage_global_views permission) who'd want to manage all the views available in the instance.
Adding this new tab under views page can resolve that confusion. If they have the permissions they can edit these public views, otherwise they can just preview them.

Before:
Screenshot 2025-09-22 at 5 30 47 PM

After:
Screenshot 2025-09-23 at 5 21 38 PM
Screenshot 2025-10-10 at 3 28 32 PM

Notes:

  • The 'My Views' section under Settings is renamed to just 'Views' as they can see all views here. Even the header "Manage Views' is changed to just 'Views'. Can revert these if needed.
  • The click on View name currently opens the Edit View modal.. which is confusing and not consistent with tables in the app. Removed that functionality now. The users can simply use the actions dropdown.
  • Tested responsiveness with different scenarios

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX smoke_test Contains changes related to smoke tests labels Oct 10, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Oct 10, 2025
Copy link

codecov bot commented Oct 10, 2025

Bundle Report

Changes will increase total bundle size by 5.4kB (0.02%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.59MB 5.4kB (0.02%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 5.4kB 18.94MB 0.03%

Files in assets/index-*.js:

  • ./src/app/settingsV2/SettingsPage.tsx → Total Size: 7.91kB

  • ./src/app/entityV2/view/ViewTypeLabel.tsx → Total Size: 1.05kB

  • ./src/app/entityV2/view/select/ViewsTableColumns.tsx → Total Size: 1.69kB

  • ./src/app/entityV2/view/ViewsTable.tsx → Total Size: 1.29kB

  • ./src/app/entityV2/view/ViewsList.tsx → Total Size: 3.73kB

  • ./src/app/settingsV2/settingsPaths.tsx → Total Size: 897 bytes

  • ./src/app/entityV2/view/ManageViews.tsx → Total Size: 3.15kB

Copy link

codecov bot commented Oct 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! overall looking solid. two minor comments then will be ready to merge i think

Comment on lines +88 to +99
const currentPath = window.location.pathname;

const currentTab = Object.entries(tabUrlMap).find(([, url]) => url === currentPath)?.[0] as TabType;
if (currentTab) {
setSelectedTab(currentTab);
} else {
setSelectedTab(null);
}
}
}, [selectedTab]);

const getCurrentUrl = useCallback(() => window.location.pathname, []);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's always try to use location from useLocation instead of the window object directly - it's generally safer and factors in stuff like if we have a basePath prefixed to our site. which we now support :)

Comment on lines +134 to +135
? (data as ListMyViewsQuery)?.listMyViews
: (data as ListGlobalViewsQuery)?.listGlobalViews;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are trying to set a hard constraint against type casting. is it possible to do this without casting and in a type safe way?

you could have both queries and skip if you're not on the correct view. then get data from one or the other based on isPersonal

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-response Issue/request has been reviewed but requires a response from the submitter product PR or Issue related to the DataHub UI/UX smoke_test Contains changes related to smoke tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants