Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix logic for multiple entities found and clean up messy code #8113

Conversation

joshuaeilers
Copy link
Contributor

Changes

  • Refactors a bit of messy code I had introduced
  • Condition for multiple entities found would never be triggered (always would be caught by not found)
  • Improve loading

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@joshuaeilers joshuaeilers marked this pull request as ready for review May 24, 2023 02:12
@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label May 24, 2023
if (error) return <ErrorSection />;
if (count === 0 || !entity) return <LookupNotFound url={encodedUrl} />;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was my logic problem, entity would be null unless there was exactly 1 search result.

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.

all looks good to me

@joshuaeilers joshuaeilers merged commit e60b827 into datahub-project:master May 24, 2023
33 of 34 checks passed
@joshuaeilers joshuaeilers deleted the je--fix-loading-stutter-on-embed-lookup branch May 24, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants