Skip to content

Fix: replace all mui formik datepicker with uicore counterpart#864

Open
priscila-moneo wants to merge 1 commit intomasterfrom
fix/replace-all-mui-formik-datepicker-uicore
Open

Fix: replace all mui formik datepicker with uicore counterpart#864
priscila-moneo wants to merge 1 commit intomasterfrom
fix/replace-all-mui-formik-datepicker-uicore

Conversation

@priscila-moneo
Copy link
Copy Markdown

@priscila-moneo priscila-moneo commented Apr 8, 2026

ref: https://app.clickup.com/t/86b943gxq

Summary by CodeRabbit

  • Chores
    • Upgraded openstack-uicore-foundation dependency to version 5.0.2.
    • Consolidated datepicker component to use the foundation library's implementation across the application.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

This PR upgrades openstack-uicore-foundation from version 4.2.23 to 5.0.2 and removes the locally-maintained MuiFormikDatepicker component. All usages across the codebase are updated to import the datepicker from the new dependency version instead.

Changes

Cohort / File(s) Summary
Dependency Update
package.json
Updated openstack-uicore-foundation dependency from 4.2.23 to 5.0.2.
Component Import Refactoring
src/components/forms/sponsor-settings-form/index.js, src/pages/sponsors-global/page-templates/page-template-popup/modules/page-template-media-request-module.js, src/pages/sponsors/sponsor-forms-list-page/components/form-template/form-template-form.js, src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/components/customized-form/customized-form.js
Switched MuiFormikDatepicker imports from local relative paths to openstack-uicore-foundation/lib/components/mui/formik-inputs/datepicker.
Form Item Table Datepicker Reference
src/components/mui/FormItemTable/components/ItemTableField.js
Updated MuiFormikDatepicker import for "DateTime" field type to use the external dependency instead of local component.
Test Mock Updates
src/components/mui/FormItemTable/__tests__/FormItemTable.test.js, src/pages/sponsors-global/page-templates/page-template-popup/page-template-module-form.test.js
Updated Jest mock paths to target openstack-uicore-foundation datepicker instead of local implementation while preserving mock behavior.
Local Component Deletion
src/components/mui/formik-inputs/mui-formik-datepicker.js, src/components/mui/__tests__/mui-formik-datepicker.test.js
Removed the local MuiFormikDatepicker React component implementation and its corresponding test suite.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • caseylocker
  • martinquiroga-exo
  • smarcet

Poem

🐰 The datepicker hops away so far,
From local lands to the foundation's star,
A tidy leap through imports clean,
The cleanest refactor ever seen,
With tests retired, the code runs light! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: migrating from local MuiFormikDatepicker to the uicore foundation counterpart across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/replace-all-mui-formik-datepicker-uicore

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@priscila-moneo priscila-moneo changed the title Fix: replace all mui formik datepickerw with uicore counterpart Fix: replace all mui formik datepicker with uicore counterpart Apr 8, 2026
@priscila-moneo priscila-moneo force-pushed the fix/replace-all-mui-formik-datepicker-uicore branch from c2e8c4d to 09548fe Compare April 8, 2026 23:41
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 93: The project currently depends on "openstack-uicore-foundation":
"5.0.2" and uses unsupported deep imports like
openstack-uicore-foundation/lib/components/mui/formik-inputs/datepicker which
are not guaranteed by an exports map; run the full automated test suite
(unit/integration/UX tests) and manually exercise all datepicker-related flows
to verify nothing breaks, and add a note to the project documentation or
monitoring checklist (e.g., dependency-upgrade or README entry) stating that
deep imports from openstack-uicore-foundation must be reviewed and tested when
upgrading that package in the future so any breaking internal path changes are
caught early.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e5a08bb-148b-4005-b225-2067243d84b2

📥 Commits

Reviewing files that changed from the base of the PR and between 033cf84 and 09548fe.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (10)
  • package.json
  • src/components/forms/sponsor-settings-form/index.js
  • src/components/mui/FormItemTable/__tests__/FormItemTable.test.js
  • src/components/mui/FormItemTable/components/ItemTableField.js
  • src/components/mui/__tests__/mui-formik-datepicker.test.js
  • src/components/mui/formik-inputs/mui-formik-datepicker.js
  • src/pages/sponsors-global/page-templates/page-template-popup/modules/page-template-media-request-module.js
  • src/pages/sponsors-global/page-templates/page-template-popup/page-template-module-form.test.js
  • src/pages/sponsors/sponsor-forms-list-page/components/form-template/form-template-form.js
  • src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/components/customized-form/customized-form.js
💤 Files with no reviewable changes (2)
  • src/components/mui/tests/mui-formik-datepicker.test.js
  • src/components/mui/formik-inputs/mui-formik-datepicker.js

"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.33",
"openstack-uicore-foundation": "4.2.23",
"openstack-uicore-foundation": "5.0.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

What are the peerDependencies and officially supported import paths for openstack-uicore-foundation version 5.0.2, specifically whether lib/components/mui/formik-inputs/datepicker is a supported entry point?

💡 Result:

peerDependencies (published package metadata)

I couldn’t retrieve the 5.0.2 package.json directly with the available sources, but 5.0.3 is accessible and lists the following peerDependencies (very likely identical across 5.0.2 ↔ 5.0.3, but I can only cite 5.0.3):
@emotion/react, @emotion/styled, @mui/icons-material, @mui/material, @mui/x-date-pickers, @react-pdf/renderer, awesome-bootstrap-checkbox, browser-tabs-lock, crypto-js, dropzone, extend, final-form, font-awesome, formik, history, i18n-react, idtoken-verifier, immutability-helper, jodit-react, js-cookie, lodash, moment, moment-timezone, react, react-beautiful-dnd, react-bootstrap, react-datetime, react-dnd, react-dnd-html5-backend, react-dom, react-dropzone, react-final-form, react-google-maps, react-redux, react-rte, react-select, react-star-ratings, react-tooltip, redux, redux-persist, redux-thunk, spark-md5, superagent, sweetalert2, urijs, validator, video.js. [1]

Officially supported import paths / entry points

There is no exports map in the published package metadata (at least in 5.0.3), and the package defines a single JS entry via "main": "lib/openstack-uicore-foundation.js". That means the only “official” JS entry point is:

  • import ... from "openstack-uicore-foundation" (package root / main entry) [1]

Additionally, the README-style usage shown by npm mirrors indicates these stylesheet imports are intended:

  • import "openstack-uicore-foundation/lib/css/components.css" (and other third-party CSS like font-awesome, sweetalert2) [2]

Is lib/components/mui/formik-inputs/datepicker a supported entry point?

  • A file does exist at lib/components/mui/formik-inputs/datepicker.js in the published artifact (5.0.3), so openstack-uicore-foundation/lib/components/mui/formik-inputs/datepicker will typically resolve in bundlers that allow extensionless deep imports. [3]
  • However, because the package does not publish an exports map and only declares a single main entry, deep imports like lib/components/mui/formik-inputs/datepicker are not an officially supported/public API surface (they may change without a semver-major signal).

If you want, tell me what error/behavior you’re seeing with 5.0.2 specifically (Node/webpack/vite + exact import), and I’ll map it to the most stable import that the published artifact supports.

Sources:
[1] openstack-uicore-foundation 5.0.3 package.json (peerDependencies + main) (cdn.jsdelivr.net)
[2] npm.io mirror snippet showing intended CSS import path (npm.io)
[3] jsDelivr file listing showing datepicker.js under lib/components/mui/formik-inputs/ (cdn.jsdelivr.net)

Citations:


🏁 Script executed:

# Search for imports from openstack-uicore-foundation, especially deep imports
rg "from\s+['\"]openstack-uicore-foundation" --type js --type ts --type jsx --type tsx -A 1

Repository: fntechgit/summit-admin

Length of output: 93


🏁 Script executed:

# Also search for the specific datepicker import path mentioned
rg "lib/components/mui/formik-inputs/datepicker"

Repository: fntechgit/summit-admin

Length of output: 1326


🏁 Script executed:

# Check git diff to see what the previous version was
git diff HEAD~1 package.json | grep -A 2 -B 2 openstack-uicore-foundation

Repository: fntechgit/summit-admin

Length of output: 252


🏁 Script executed:

# Or get the previous version from git history
git log --oneline -n 20 package.json

Repository: fntechgit/summit-admin

Length of output: 165


🏁 Script executed:

# Get the full commit details to understand the change
git show 09548fe --stat

Repository: fntechgit/summit-admin

Length of output: 50378


🏁 Script executed:

# Check the actual changes to package.json in that commit
git show 09548fe -- package.json | head -40

Repository: fntechgit/summit-admin

Length of output: 1441


🏁 Script executed:

# Get the current package.json to verify the exact version
cat package.json | grep -A 2 -B 2 openstack-uicore-foundation

Repository: fntechgit/summit-admin

Length of output: 241


🏁 Script executed:

# Search for any older imports or patterns that were replaced
rg "MuiFormikDatepicker" --type js -A 2 -B 2 | head -50

Repository: fntechgit/summit-admin

Length of output: 5963


Unsupported imports require testing and monitoring.

The deep imports like openstack-uicore-foundation/lib/components/mui/formik-inputs/datepicker do exist and function in v5.0.2, and peer dependencies (React, MUI, Formik) are compatible. However, these paths are not documented in an exports map and are not officially supported public APIs, meaning they could change without a semver-major signal in future releases. Before merging, run the full test suite to confirm all datepicker functionality works as expected, and add a note in your documentation or monitoring checklist that these unsupported deep imports should be reviewed when upgrading openstack-uicore-foundation in the future.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 93, The project currently depends on
"openstack-uicore-foundation": "5.0.2" and uses unsupported deep imports like
openstack-uicore-foundation/lib/components/mui/formik-inputs/datepicker which
are not guaranteed by an exports map; run the full automated test suite
(unit/integration/UX tests) and manually exercise all datepicker-related flows
to verify nothing breaks, and add a note to the project documentation or
monitoring checklist (e.g., dependency-upgrade or README entry) stating that
deep imports from openstack-uicore-foundation must be reviewed and tested when
upgrading that package in the future so any breaking internal path changes are
caught early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant