Skip to content

feat(ui): Learning Resources page improvements and form updates - #25681

Merged
anuj-kumary merged 12 commits into
mainfrom
learning-resources-feedback
Feb 6, 2026
Merged

anuj-kumary merged 12 commits into
mainfrom
learning-resources-feedback

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Feb 3, 2026 •

Copy link
Copy Markdown
Member

Refactor Learning Resources Page

  • Fixed table scroll so the header stays fixed and only the body scrolls
  • Added table/card view toggle
  • Implemented card view
  • Replaced filters with SearchDropdown (Type, Category, Context, Status)
  • Added filter chips for active filters with remove and "Clear all"
  • Categories/contexts count chips (+N): clicking opens ResourcePlayerModal (same as Content Name)
  • Removed display name field
  • Removed Embedded Content section
  • In details page show all category tags instead of truncating with +N
  • Hide meta section when neither date nor duration is available
  • Duration label: "watch" for Video/Storylane, "read" for Article
Screen.Recording.2026-02-05.at.10.02.15.AM.mov

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 commented Feb 3, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.83% (56032/85110) 45.18% (29334/64934) 47.95% (8848/18454)

@gitar-bot

gitar-bot Bot commented Feb 6, 2026 •

Copy link
Copy Markdown
🔍 CI failure analysis for dd2d471: 26 Playwright test failures across 2 job shards in unmodified test suites (Notifications, Glossary, Permissions, Services, Users, Metrics, Custom Properties, etc.) - all unrelated to Learning Resources changes

Issue

26 total test failures across 2 playwright-ci-postgresql jobs (shards 3 and 6 of 6) - all unrelated to PR changes

Root Cause

Pre-existing test infrastructure issues in unmodified test suites. This PR only modifies Learning Resources page files, while all failures occur in completely different modules.

Details

Job: playwright-ci-postgresql (3, 6) - 12 failures

Failed test modules:

  • NotificationAlerts (timeout 60s × 2)
  • Large Glossary Performance (element not visible)
  • Impact Analysis (timeout 60s in beforeEach)
  • Glossary/Service Permissions (timeout 180s)
  • KPI Widget (element not attached)
  • Explore Discovery (timeout 180s)
  • Lineage Settings (timeout 180s)
  • Metric Entity (type error: fill expects string, got undefined)
  • Service Form Superset (ENOENT: cannot unlink certificate file)
  • Custom Properties × 2 (timeout 60s on scrollIntoViewIfNeeded)

Job: playwright-ci-postgresql (6, 6) - 14 failures

Failed test modules:

  • Users management (user deletion, custom properties)
  • Glossary import/export (bulk operations)
  • AutoPilot MySQL connector
  • Service entity operations
  • Roles/Tags management
  • Input/Output Ports
  • Entity version pages

Common failure patterns across both jobs:

  1. Timeouts - 60s/180s/540s limits exceeded (page.waitForResponse, page.reload, scrollIntoViewIfNeeded)
  2. Type errors - Cannot read properties of undefined, fill: expected string, got undefined
  3. Strict mode violations - Locators finding multiple elements (2 loaders, 6 badges)
  4. Element issues - Not found, not visible, not attached after timeout
  5. Browser context closed - Page/context closed during operations
  6. File system errors - Cannot unlink non-existent files

Example failures:

Job 3/6:
- NotificationAlerts: Test timeout 60000ms exceeded
- Metric update: page.fill: value: expected string, got undefined
- SSL upload: ENOENT: no such file or directory to unlink

Job 6/6:
- User deletion: TypeError reading 'toUpperCase' from undefined
- Glossary import: Element not found after 5s
- AutoPilot: Strict mode - 6 badges found instead of 1

Conclusion

None of the 26 failing tests are in files modified by this PR. This PR only touches Learning Resources components, hooks, tests, SVG assets, locale strings, and styles. All failures are in unrelated modules: Notifications, Glossary, Permissions, Services, Metrics, Custom Properties, Users, Roles, Tags, AutoPilot, Version Pages, Ports, Impact Analysis, Lineage, and Widgets.

Code Review ✅ Approved 6 resolved / 6 findings

Solid refactoring PR migrating from Ant Design to MUI components with improved multi-select filters and duration handling. All three previous findings (duration conversion bug, multi-select filter bugs) have been properly addressed in this iteration.

✅ 6 resolved
✅ Bug: Duration stored as raw value but form previously converted to seconds

📄 openmetadata-ui/src/main/resources/ui/src/pages/LearningResourcesPage/LearningResourceForm.component.tsx:82 📄 openmetadata-ui/src/main/resources/ui/src/pages/LearningResourcesPage/LearningResourceForm.component.tsx:109 📄 openmetadata-ui/src/main/resources/ui/src/components/Learning/LearningResourceCard/LearningResourceCard.component.tsx:59-64
The form previously multiplied estimatedDuration by 60 on submit (converting minutes to seconds) and divided by 60 on load (converting seconds to minutes). This PR removes both conversions:

  • Line 82 (load): estimatedDuration: resource.estimatedDuration (was Math.floor(resource.estimatedDuration / 60))
  • Line 109 (save): estimatedDuration: values.estimatedDuration (was values.estimatedDuration * 60)

The display code in LearningResourceCard still divides by 60: Math.floor(resource.estimatedDuration / 60) (line 60), indicating the stored value is in seconds.

This means:

  1. New resources: The form collects a value in whatever unit but saves it raw. If a user enters "5" thinking minutes, it saves as "5" instead of "300" (seconds). The card would then display Math.floor(5/60) = 0 min.
  2. Existing resources: Resources previously saved with seconds-based values (e.g., 300) would now load into the form as 300 instead of 5, confusing users editing them.

The fix should either:

  • Restore the conversions (multiply by 60 on save, divide by 60 on load), OR
  • Update the display components to not divide by 60
✅ Edge Case: Multi-select filters only use first value for API call

📄 openmetadata-ui/src/main/resources/ui/src/pages/LearningResourcesPage/hooks/useLearningResources.ts:98-106
In useLearningResources, when filters support multiple selections (via SearchDropdown with multi-select), only the first selected value is sent to the API:

const category = Array.isArray(filterState.category)
  ? filterState.category[0]
  : filterState.category;

This means if a user selects multiple categories (e.g., "Discovery" and "Governance"), only "Discovery" will be sent to the API. While client-side filtering handles additional values, this could:

  1. Fetch unnecessary data (resources that won't match client-side filtering)
  2. Miss resources if server pagination kicks in before all relevant resources are fetched (limit: 100)

Suggested fix: Either document this behavior as intentional, or modify the API call to support multiple filter values if the backend supports it. Alternatively, if the backend doesn't support multiple values, consider making a separate request per filter value and merging results.

✅ Bug: Multi-select filters only send first value to API

📄 openmetadata-ui/src/main/resources/ui/src/pages/LearningResourcesPage/hooks/useLearningResources.ts:89-97
In useLearningResources.ts, when building API params for context and status filters, only the first selected value is used:

const context = filterState.context?.[0];
const status = filterState.status?.[0];

However, the filter UI (useLearningResourceFilters.tsx) uses SearchDropdown which supports multi-select. If a user selects multiple contexts (e.g., "Glossary" and "Lineage"), only "Glossary" is sent to the API. The client-side matchesFilters function correctly checks all selected values, but the API response will only contain resources matching the first value — resources that match only "Lineage" (but not "Glossary") will be missing from the results entirely.

Fix: Either join the array values into a comma-separated string if the API supports it, or make multiple API calls and merge results, or fetch all resources without the filter parameter and rely solely on client-side filtering for these fields.

✅ Edge Case: Popover click on "+N" tags may propagate to card click

📄 openmetadata-ui/src/main/resources/ui/src/components/Learning/LearningResourceCard/LearningResourceCard.component.tsx:295-300
In LearningResourceCard.component.tsx, the handleMoreTagClick correctly calls e.stopPropagation() to prevent the card's onClick from firing. However, the MUI <Popover> at line 295 doesn't use onClick={e => e.stopPropagation()} on its root or backdrop. When the user closes the popover by clicking outside it, the click event may propagate through to the card's onClick handler, which would unintentionally open the ResourcePlayerModal.

Fix: Add onClick={(e) => e.stopPropagation()} to the Popover or its content container to prevent click-through to the card.

✅ Bug: Redundant array checks in filter logic

📄 openmetadata-ui/src/main/resources/ui/src/pages/LearningResourcesPage/hooks/useLearningResources.ts:38-44
In the matchesFilters function, there are redundant array checks that always evaluate to the same value. For example:

const type = Array.isArray(filters.type) ? filters.type : filters.type;

This ternary always returns filters.type regardless of whether it's an array or not. The same pattern is repeated for category, context, and status. This appears to be dead code or an incomplete refactoring that intended to handle both array and non-array filter values.

Suggested fix: Either remove these redundant checks or implement the intended logic. For example, if single values should be converted to arrays:

const type = Array.isArray(filters.type) ? filters.type : filters.type ? [filters.type] : undefined;

...and 1 more resolved from earlier reviews

Rules ✅ All requirements met

Gitar Rules

✅ Summary Enhancement: PR description contains 11 detailed bullet points covering UI improvements, architecture changes are implementation details adequately covered

2 rules not applicable. Show all rules by commenting gitar display:verbose.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
test — dd2d471a Deployed Feb 6, 2026 by anuj-kumary via playwright-ci-postgresql (4, 6) #33148
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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants