Deprecate old JS functions#2153
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces two new methods, Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
js/formidable.js (1)
1965-1979: Consider using CSS classes instead of inline styles.For better maintainability and performance, consider:
- Using CSS classes instead of inline styles
- Adding migration guidance in the deprecation notice to help users transition
Example implementation:
invisible: function( classes ) { console.warn( - 'DEPRECATED: function frmFrontForm.invisible in vx.x' + 'DEPRECATED: function frmFrontForm.invisible in v6.0. Will be removed in v7.0.\n' + + 'Migration guide: Use CSS classes instead. Add .frm-hidden { visibility: hidden; } ' + + 'to your CSS and use jQuery(element).addClass("frm-hidden")' ); - jQuery( classes ).css( 'visibility', 'hidden' ); + jQuery( classes ).addClass( 'frm-hidden' ); },🧰 Tools
🪛 eslint
[error] 1965-1967: Missing JSDoc @param "classes" declaration.
(jsdoc/require-param)
[error] 1974-1976: Missing JSDoc @param "classes" declaration.
(jsdoc/require-param)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
js/formidable.js(1 hunks)
🧰 Additional context used
🪛 eslint
js/formidable.js
[error] 1965-1967: Missing JSDoc @param "classes" declaration.
(jsdoc/require-param)
[error] 1974-1976: Missing JSDoc @param "classes" declaration.
(jsdoc/require-param)
I could only find references to this in old Lite code (pre 3.0). It looks like it was really used to toggle elements in the back end.
I think we should be good to remove these functions. For now, I'm deprecating them just in case.