Conversation
WalkthroughCentralizes META_SEPARATORS by introducing it in src/util/blocks.js, updating imports in dependent modules, and removing its local declaration/export from src/block/posts/util.js. Relocates blockStyleGenerators usage to a local module by removing its re-export from src/util/styles/index.js and importing it directly in the style guide utility. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
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 |
🤖 Pull request artifacts
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/lazy-components/style-guide/utils.js (1)
3-4: Import relocation verified — no stale imports; named export presentNo imports of blockStyleGenerators remain from '~stackable/util'. The local module exists and exports the named export. Files: src/lazy-components/style-guide/utils.js (import at line 3; use at line 213), src/lazy-components/style-guide/block-style-generators.js (export const blockStyleGenerators at line 18). Optional: guard against missing generators before using blockStyleGenerator (e.g. if (!blockStyleGenerator) return block).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/block/posts/util.js(1 hunks)src/components/design-library-list/util.js(1 hunks)src/lazy-components/style-guide/utils.js(1 hunks)src/util/blocks.js(1 hunks)src/util/styles/index.js(0 hunks)
💤 Files with no reviewable changes (1)
- src/util/styles/index.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: PHP 7.3 and WP latest
- GitHub Check: PHP 8.2 and WP 6.7.2
- GitHub Check: PHP 8.2 and WP latest
- GitHub Check: build
- GitHub Check: PHP 8.2 and WP 6.5.5
- GitHub Check: PHP 7.3 and WP 6.5.5
- GitHub Check: PHP 8.2 and WP 6.6.2
🔇 Additional comments (3)
src/components/design-library-list/util.js (1)
7-7: Switched META_SEPARATORS import to central util — verified OK.
No remaining imports from '~stackable/block/posts/util'; META_SEPARATORS exported at src/util/blocks.js:623 and imported at src/components/design-library-list/util.js:7 and src/block/posts/util.js:15.src/util/blocks.js (1)
622-629: Freeze META_SEPARATORS to prevent accidental mutationWrap the exported object with Object.freeze; repo-wide verification failed in the sandbox—verify there are no other definitions or property writes before merging.
Apply:
-export const META_SEPARATORS = { +export const META_SEPARATORS = Object.freeze({ dot: '·', space: ' ', comma: ',', dash: '—', pipe: '|', -} +})src/block/posts/util.js (1)
15-15: Importing META_SEPARATORS from '~stackable/util' — approved.
META_SEPARATORS is defined and exported in src/util/blocks.js (export const META_SEPARATORS); no re-export found in src/block/posts/util.js.
Summary by CodeRabbit