Skip to content

Add load more button on header#27787

Merged
anuj-kumary merged 12 commits intomainfrom
ontology-load-more
Apr 28, 2026
Merged

Add load more button on header#27787
anuj-kumary merged 12 commits intomainfrom
ontology-load-more

Conversation

@anuj-kumary
Copy link
Copy Markdown
Member

@anuj-kumary anuj-kumary commented Apr 28, 2026

Describe your changes:

Add load more button with count on ontology header toolbar

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.

Summary by Gitar

  • Test Refactoring:
    • Modified OntologyExplorer.spec.ts to remove state clearing from readNodePositions during search assertions.
    • Removed the OntologyExplorerIntegration.spec.ts test file entirely.

This will update automatically on new commits.

@anuj-kumary anuj-kumary self-assigned this Apr 28, 2026
@anuj-kumary anuj-kumary requested a review from a team as a code owner April 28, 2026 08:11
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Apr 28, 2026
Comment thread openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json Outdated
auto-merge was automatically disabled April 28, 2026 15:29

Pull request was closed

@anuj-kumary anuj-kumary reopened this Apr 28, 2026
@anuj-kumary anuj-kumary enabled auto-merge (squash) April 28, 2026 15:30
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 28, 2026

Code Review ✅ Approved 4 resolved / 4 findings

Integrates the load more functionality into the header while resolving missing i18n keys for pluralization, removing unused translations, improving error handling in paginated fetches, and fixing missing dependency tracking in sync effects.

✅ 4 resolved
Quality: "term-plural-lowercase" not translated in non-English locales

📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json:2124 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json:2124 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ar-sa.json:2124 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json:2124 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json:2124
The new i18n key term-plural-lowercase is set to the English value "terms" in all 19 locale files (de-de, fr-fr, es-es, ar-sa, ja-jp, zh-cn, etc.). This defeats the purpose of localization — users in non-English locales will see the English word "terms" in the toolbar counter (e.g. 42/100 terms).

Quality: Unused i18n key "loaded-x-of-y-entity" added to all locales

📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json:1221 📄 openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/FilterToolbar.tsx:252
The key label.loaded-x-of-y-entity was added to all 19 locale files but is never referenced in any .ts or .tsx file. The toolbar counter at FilterToolbar.tsx:252 uses a hardcoded {loadedTermCount}/{totalTermCount} {t('label.term-plural-lowercase')} pattern instead. Either use the dedicated key or remove it to avoid dead translations.

Edge Case: Silent catch in fetchAllGlossariesPaginated returns partial data

📄 openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/hooks/useOntologyExplorer.ts:157-159
The new try-catch inside the pagination loop (lines 157-159) silently swallows API errors and breaks out of the loop, returning whatever glossaries were collected so far. Downstream code treats this as the complete list — it's used to compute totalTermCount (via g.termCount) and populate glossary filters. A transient network error on page 2 of 5 would show an incorrect total (e.g. "100/500 terms" becomes "100/200 terms") with no indication that data is incomplete.

Quality: Missing exhaustive-deps: searchInput omitted from sync effect

📄 openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.tsx:153-157
The sync-back effect at OntologyExplorer.tsx:153-157 references searchInput in its body but only lists [filters.searchQuery] in the dependency array. While functionally intentional (only fire on external filter changes), this will trigger the react-hooks/exhaustive-deps lint rule. Consider using a ref for the comparison value or adding an eslint-disable comment with justification.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

@anuj-kumary anuj-kumary merged commit a2a0c8e into main Apr 28, 2026
57 of 58 checks passed
@anuj-kumary anuj-kumary deleted the ontology-load-more branch April 28, 2026 20:06
anuj-kumary added a commit that referenced this pull request Apr 29, 2026
* Add load more button on header

* fix lint issue

* fix lint issue and spacing

* fix space issue

* nit

* fix test

* removed unnessaey same test

(cherry picked from commit a2a0c8e)
jatinmasaram pushed a commit to jatinmasaram/OpenMetadata that referenced this pull request May 2, 2026
* Add load more button on header

* fix lint issue

* fix lint issue and spacing

* fix space issue

* nit

* fix test

* removed unnessaey same test
jaya6400 pushed a commit to jaya6400/OpenMetadata that referenced this pull request May 4, 2026
* Add load more button on header

* fix lint issue

* fix lint issue and spacing

* fix space issue

* nit

* fix test

* removed unnessaey same test
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants