Frontend naming conventions and UI guide#10
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughA new frontend documentation file adds mandatory naming conventions and architectural rules for the Analytics Dashboard, covering component/file naming, directory conventions, export patterns, component architecture, and development guidance. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@4-frontend/ui-naming-conventions-coding-guide.md`:
- Around line 36-38: Update the "No Hardcoding" guidance under the "Development
Principles" section to clarify that .env is only for environment-specific
configuration and secrets, and that UI/static strings should be moved to a
config/constants module or an i18n/localization layer; replace the phrase ".env
for static strings" with explicit guidance to keep only env-specific values in
.env and to store user-facing/static text in config/constants or i18n files
(refer to the "No Hardcoding" bullet and the surrounding "Development
Principles" heading to locate the text to update).
- Around line 36-40: The document jumps from section 2 to "## 5. Development
Principles", which is confusing; update the heading "## 5. Development
Principles" to the correct sequential number (e.g., "## 3. Development
Principles") or insert the missing sections with appropriate headings and
placeholder content so numbering flows correctly; specifically edit the heading
text "## 5. Development Principles" (and any internal references to that
heading) to restore sequential numbering across the file.
🧹 Nitpick comments (1)
4-frontend/ui-naming-conventions-coding-guide.md (1)
16-20: Clarify the “no default export” example.Right now the
export default Header;line appears as a valid example immediately after “Do NOT use default export,” which can be misread. Either remove it or explicitly label it as a “❌ Incorrect” example.Proposed edit
- - `export default Header;` + - ❌ `export default Header;`
| ## 5. Development Principles | ||
| - **No Hardcoding**: Strictly move all configuration values, API endpoints, and static strings to `.env` or configuration modules. | ||
| - **Modularity**: Logic that can exist independently of the project's specific domain must be moved to a separate layer or utility. |
There was a problem hiding this comment.
“.env for static strings” is misleading.
.env should be for environment‑specific values/secrets, not general UI strings. Recommend moving static strings to config/constants or i18n, and keep only env‑specific values in .env.
Proposed edit
-- **No Hardcoding**: Strictly move all configuration values, API endpoints, and static strings to `.env` or configuration modules.
+- **No Hardcoding**: Move environment-specific values (API endpoints, secrets) to `.env`, and place static strings in config/constants or i18n modules.🤖 Prompt for AI Agents
In `@4-frontend/ui-naming-conventions-coding-guide.md` around lines 36 - 38,
Update the "No Hardcoding" guidance under the "Development Principles" section
to clarify that .env is only for environment-specific configuration and secrets,
and that UI/static strings should be moved to a config/constants module or an
i18n/localization layer; replace the phrase ".env for static strings" with
explicit guidance to keep only env-specific values in .env and to store
user-facing/static text in config/constants or i18n files (refer to the "No
Hardcoding" bullet and the surrounding "Development Principles" heading to
locate the text to update).
No description provided.