Skip to content

Conversation

@jjoyce0510
Copy link
Collaborator

@jjoyce0510 jjoyce0510 commented Nov 26, 2025

Summary

In this PR:

  • Remove context documents from primary search by default (not ready yet)
  • Add specific document search capability from context sidebar
  • Combine related assets and related documents into a single well-designed section under the document editor
  • Hide related assets (distracting) when it edit mode
  • Fix bug related to parsing the URN of tagged assets
  • Minor styling improvements in a few different locations
  • Support manually linking related assets and documents via a new EntitySearchDropdown.tsx which is now reused in multiple places!
  • Adding simple delete for related assets and context docs
  • Match hover styles between context base and other nav sidebar items.

Screenshots

Screenshot 2025-11-25 at 6 39 49 PM Screenshot 2025-11-25 at 6 39 56 PM Screenshot 2025-11-25 at 6 40 05 PM Screenshot 2025-11-25 at 6 40 10 PM Screenshot 2025-11-25 at 8 39 29 PM Screenshot 2025-11-25 at 8 58 10 PM

@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 Nov 26, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Nov 26, 2025
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Nov 26, 2025

✅ Meticulous spotted 0 visual differences across 998 screens tested: view results.

Meticulous evaluated ~8 hours of user flows against your PR.

Expected differences? Click here. Last updated for commit 48bbce0. This comment will update as new commits are pushed.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.72MB 10.13kB (0.04%) ⬆️

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 10.13kB 19.09MB 0.05%

Files in assets/index-*.js:

  • ./src/app/entityV2/document/DocumentNativeProfile.tsx → Total Size: 3.66kB

  • ./src/app/homeV2/layout/sidebar/documents/ContextGroupHeader.tsx → Total Size: 3.52kB

  • ./src/app/homeV2/layout/sidebar/documents/SearchDocumentPopover.tsx → Total Size: 3.86kB

  • ./src/app/homeV2/layout/sidebar/documents/SearchResultItem.tsx → Total Size: 4.42kB

  • ./src/app/document/hooks/useUpdateDocument.ts → Total Size: 3.99kB

  • ./src/app/homeV2/layout/sidebar/documents/DocumentTreeItem.tsx → Total Size: 5.46kB

  • ./src/app/entityV2/document/summary/EditableContent.tsx → Total Size: 7.8kB

  • ./src/app/entityV2/document/summary/RelatedSection.tsx → Total Size: 4.64kB

  • ./src/app/entityV2/shared/EntitySearchSelect/EntitySearchDropdown.tsx → Total Size: 5.15kB

  • ./src/app/entityV2/document/DocumentEntity.tsx → Total Size: 3.85kB

  • ./src/app/homeV2/layout/sidebar/documents/DocumentTreeEmptyState.tsx → Total Size: 717 bytes

  • ./src/app/homeV2/reference/sections/EntityLink.tsx → Total Size: 4.07kB

  • ./src/app/homeV2/layout/sidebar/documents/MoveDocumentPopover.tsx → Total Size: 6.03kB

  • ./src/app/homeV2/layout/sidebar/documents/DocumentActionsMenu.tsx → Total Size: 4.32kB

  • ./src/app/entityV2/document/summary/AddRelatedEntityDropdown.tsx → Total Size: 2.88kB

  • ./src/app/document/hooks/useExtractMentions.ts → Total Size: 741 bytes

  • ./src/app/homeV2/layout/sidebar/documents/useContextMenuItems.tsx → Total Size: 1.84kB

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 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 this makes sense. there's a few things that could use some cleanup and i would love to have consensus on what entity select we're using going forward

nothing blocking approval though!

// Reset to initial state when closing
setSelectedUrns(initialSelectedUrns);
} catch (error) {
console.error('Failed to update related entities:', error);
Copy link
Collaborator

Choose a reason for hiding this comment

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

could show the user an error here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good idea!

const userContext = useUserContext();

// Entity types that can be related (based on RelatedAsset.pdl)
// I don't love this, but I do want to enable searching for documents
Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah i feel that we will definitely forget to add something to this list in the future..

that being said i don't see an obvious solution without muddying up our API for a specific use case like this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree..

relatedAssets?: DocumentRelatedAsset[];
}

export const RelatedAssetsSection: React.FC<RelatedAssetsSectionProps> = ({ relatedAssets }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this component still used after replacing with RelatedSection?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call - removing!

@@ -34,7 +34,7 @@ export const RelatedDocumentsSection: React.FC<RelatedDocumentsSectionProps> = (

return (
Copy link
Collaborator

Choose a reason for hiding this comment

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

same - is this used elsewhere still?

* Handles all search logic internally and provides a clean interface.
* Includes the Dropdown wrapper, so consumers don't need to wrap it themselves.
*/
export const EntitySearchDropdown: React.FC<EntitySearchDropdownProps> = ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

at some point soon we gotta consolidate everything to the final entity selection dropdown and pick our best implementation. too many floating around out there it's hard to know what to use

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes agreed. This is the one i've used for the newer Access Requests feature (so users can search + select an entity) and now this feature -but those are the only two use cases that are curretly using this..

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Nov 26, 2025
@jjoyce0510 jjoyce0510 merged commit 312af9d into master Dec 1, 2025
69 of 70 checks passed
@jjoyce0510 jjoyce0510 deleted the jj--add-context-docs-ui-v2-part2 branch December 1, 2025 04:28
Tim-Visser pushed a commit to Tim-Visser/datahub that referenced this pull request Dec 1, 2025
yonglingsong pushed a commit to yonglingsong/datahub that referenced this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-submitter-merge 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