feat: add mui formik text editor#277
Conversation
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a ChangesFormikTextEditor and HTML Normalization
Sequence Diagram(s)sequenceDiagram
participant FormikTextEditor
participant normalizeHtmlString
participant FormikHelpers
participant TextEditorV3
TextEditorV3->>FormikTextEditor: onChange(html)
FormikTextEditor->>normalizeHtmlString: normalizeHtmlString(html)
normalizeHtmlString-->>FormikTextEditor: normalized value
FormikTextEditor->>FormikHelpers: setValue(normalized value)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/components/mui/formik-inputs/mui-formik-text-editor.js (1)
7-7: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueInconsistent prop naming:
licencevslicense.The component accepts
licence(British spelling) but passes it through aslicensetoTextEditorV3(Line 25). This mismatch is easy to miss for consumers and inconsistent with the rest of the codebase's likely American-English convention.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/mui/formik-inputs/mui-formik-text-editor.js` at line 7, The prop name on FormikTextEditor is inconsistent: it currently accepts licence but forwards it to TextEditorV3 as license, which can confuse consumers. Update the FormikTextEditor signature and its prop usage so the component consistently uses license end-to-end, and make sure any references in the TextEditorV3 call and destructuring match the renamed prop.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/mui/formik-inputs/mui-formik-text-editor.js`:
- Around line 7-15: The FormikTextEditor component references label in its
InputLabel render even though it is not defined in scope, causing a
ReferenceError on render. Update the FormikTextEditor props destructuring to
include label (or otherwise source it from props) and make sure the component
uses that value consistently alongside useField, mergedOptions, and the existing
name/options handling.
---
Nitpick comments:
In `@src/components/mui/formik-inputs/mui-formik-text-editor.js`:
- Line 7: The prop name on FormikTextEditor is inconsistent: it currently
accepts licence but forwards it to TextEditorV3 as license, which can confuse
consumers. Update the FormikTextEditor signature and its prop usage so the
component consistently uses license end-to-end, and make sure any references in
the TextEditorV3 call and destructuring match the renamed prop.
🪄 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: ad75c400-ad07-4c20-8150-5f6645e7eb9e
📒 Files selected for processing (2)
src/components/mui/formik-inputs/mui-formik-text-editor.jssrc/utils/methods.js
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
ref: https://app.clickup.com/t/9014802374/86b94xa4t
from https://github.com/fntechgit/sponsor-services/pull/57#discussion_r3474155581
Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com
Summary by CodeRabbit