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

Paging improvement #13943

Merged
merged 7 commits into from
Nov 10, 2023
Merged

Paging improvement #13943

merged 7 commits into from
Nov 10, 2023

Conversation

chirag-madlani
Copy link
Collaborator

Describe your changes:

Fixes #13925

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@github-actions github-actions bot added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Nov 10, 2023
Copy link
Contributor

github-actions bot commented Nov 10, 2023

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 48%
48.89% (23641/48359) 30.44% (8850/29074) 30.31% (2679/8838)

@chirag-madlani chirag-madlani marked this pull request as ready for review November 10, 2023 15:33
Copy link

[open-metadata-ui] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

showPagination,
} = usePaging();

const fetchDatabaseSchema = useCallback(
Copy link
Contributor

@mgorsk1 mgorsk1 Nov 10, 2023

Choose a reason for hiding this comment

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

wouldn't it simplify this component if fetchDatabaseSchema and searchSchema are replaced by single function that uses same query but query_text is:

  • * when search box is empty and
  • (name.keyword:*${searchValue}*) OR (description.keyword:*${searchValue}*) when search box is not empty

it would:

  • centralize the way data is fetched (and from where it's fetched) and follow DRY approach
  • keep just one logic of pagination

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @mgorsk1 Thanks for the comment and suggestion. We were following listing from DB calls and searching through ES at all the places. I will certainly take your feedback and see if we can club them in near future.
cc: @harshach

@chirag-madlani chirag-madlani merged commit e2418ae into main Nov 10, 2023
14 checks passed
@chirag-madlani chirag-madlani deleted the paging-improvement branch November 10, 2023 18:30
chirag-madlani added a commit that referenced this pull request Nov 10, 2023
* fix(ui): databaseschema paging issue

* fix minor issues

* test fixes

* fix path issue and some cypress

* fix sonarcloud

(cherry picked from commit e2418ae)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test Add this label to run secure Github workflows on PRs UI UI specific issues
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Pagination button at DatabaseDetails page doesn't work
3 participants