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

refactor(ui): Adding apollo caching to manage domains page. #6494

Merged

Conversation

jjoyce0510
Copy link
Collaborator

Summary

In this PR, we do our first POC of list view caching on the Domains page. No longer will we have the 3 second delay to see newly created domains. Also when navigating between pages, the Domains will be cached so another fetch is not required.

As part of this, I also added a new indexed field to Domains index that tracks the "created time" of a Domain. This allows us to consistently and correctly sort the list of domains, even when a new one is added locally.

Demo

Screen.Recording.2022-11-18.at.12.25.12.PM.mov

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

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Nov 18, 2022
@@ -64,12 +64,12 @@ export const DomainsList = () => {
query,
},
},
fetchPolicy: 'no-cache',
fetchPolicy: 'cache-first',
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting, nice. I know there's been bugs with using apollo cache before, but idk if that's how we were using it or if it's just difficult to work with. If it's working well for domains then we can at the very least extend this to other similar situations! (ie. the glossary)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems to be working!

@github-actions
Copy link

github-actions bot commented Nov 18, 2022

Unit Test Results (metadata ingestion)

       8 files         8 suites   59m 56s ⏱️
   764 tests    762 ✔️ 2 💤 0
1 530 runs  1 525 ✔️ 5 💤 0

Results for commit da45c5b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Nov 18, 2022

Unit Test Results (build & test)

621 tests  ±0   617 ✔️ ±0   15m 43s ⏱️ ±0s
157 suites ±0       4 💤 ±0 
157 files   ±0       0 ±0 

Results for commit da45c5b. ± Comparison against base commit 055196c.

♻️ This comment has been updated with latest results.

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.

very cool!

@jjoyce0510 jjoyce0510 merged commit a400eb0 into datahub-project:master Nov 23, 2022
cccs-Dustin pushed a commit to CybercentreCanada/datahub that referenced this pull request Feb 1, 2023
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