Fix: replace all mui formik datepicker with uicore counterpart#864
Fix: replace all mui formik datepicker with uicore counterpart#864priscila-moneo wants to merge 1 commit intomasterfrom
Conversation
📝 WalkthroughWalkthroughThis PR upgrades Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…r with lib counterpart
c2e8c4d to
09548fe
Compare
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (10)
package.jsonsrc/components/forms/sponsor-settings-form/index.jssrc/components/mui/FormItemTable/__tests__/FormItemTable.test.jssrc/components/mui/FormItemTable/components/ItemTableField.jssrc/components/mui/__tests__/mui-formik-datepicker.test.jssrc/components/mui/formik-inputs/mui-formik-datepicker.jssrc/pages/sponsors-global/page-templates/page-template-popup/modules/page-template-media-request-module.jssrc/pages/sponsors-global/page-templates/page-template-popup/page-template-module-form.test.jssrc/pages/sponsors/sponsor-forms-list-page/components/form-template/form-template-form.jssrc/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", |
There was a problem hiding this comment.
🧩 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 likefont-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.jsin the published artifact (5.0.3), soopenstack-uicore-foundation/lib/components/mui/formik-inputs/datepickerwill typically resolve in bundlers that allow extensionless deep imports. [3] - However, because the package does not publish an
exportsmap and only declares a singlemainentry, deep imports likelib/components/mui/formik-inputs/datepickerare 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:
- 1: https://cdn.jsdelivr.net/npm/openstack-uicore-foundation%405.0.3/package.json
- 2: https://npm.io/package/openstack-uicore-foundation
- 3: https://cdn.jsdelivr.net/npm/openstack-uicore-foundation%405.0.3/lib/components/mui/formik-inputs/
🏁 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 1Repository: 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-foundationRepository: fntechgit/summit-admin
Length of output: 252
🏁 Script executed:
# Or get the previous version from git history
git log --oneline -n 20 package.jsonRepository: fntechgit/summit-admin
Length of output: 165
🏁 Script executed:
# Get the full commit details to understand the change
git show 09548fe --statRepository: 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 -40Repository: 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-foundationRepository: 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 -50Repository: 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.
ref: https://app.clickup.com/t/86b943gxq
Summary by CodeRabbit
openstack-uicore-foundationdependency to version 5.0.2.