From 37b2e0399f46866e6f56d0ff0d1aff87da45edad Mon Sep 17 00:00:00 2001 From: smoothwizz Date: Mon, 18 Mar 2024 22:05:32 +0200 Subject: [PATCH] feat(planning): update templates --- .../components/overview/OverviewSection.tsx | 4 +- .../TemplateSection.component.tsx | 17 ++- .../planning/TemplateSection/contants.ts | 116 ----------------- .../planning/TemplateSection/templates.ts | 121 ++++++++++++++++++ client/jotai/atoms.ts | 2 +- 5 files changed, 135 insertions(+), 125 deletions(-) delete mode 100644 client/components/planning/TemplateSection/contants.ts create mode 100644 client/components/planning/TemplateSection/templates.ts diff --git a/client/components/overview/OverviewSection.tsx b/client/components/overview/OverviewSection.tsx index fba80de..469c21a 100644 --- a/client/components/overview/OverviewSection.tsx +++ b/client/components/overview/OverviewSection.tsx @@ -48,12 +48,12 @@ const OverviewSection = ({ handleReset }: Props) => { { id: 1, name: 'details', - label: 'Details', + label: 'Preview', }, { id: 2, name: 'edit', - label: 'Edit', + label: 'Markdown', }, { id: 3, diff --git a/client/components/planning/TemplateSection/TemplateSection.component.tsx b/client/components/planning/TemplateSection/TemplateSection.component.tsx index 9963200..f4024a0 100644 --- a/client/components/planning/TemplateSection/TemplateSection.component.tsx +++ b/client/components/planning/TemplateSection/TemplateSection.component.tsx @@ -2,9 +2,9 @@ import ButtonSecondary from '@/components/forms/buttons/ButtonSecondary' import { useAtom } from 'jotai' import { atom_description, atom_title } from 'jotai/atoms' import React from 'react' -import { DEFAULT_TEMPLATES } from './contants' +import { DEFAULT_TEMPLATES } from './templates' -type TemplateVariant = 'feature' | 'bug' | 'code_review' | 'generic' +type TemplateVariant = 'feature' | 'bug' | 'code_review' | 'daily' | 'generic' type Template = { id: number @@ -25,22 +25,27 @@ const TemplateSection = () => { { id: 0, name: 'generic', - label: 'Generic Task', + label: 'Generic', }, { id: 1, name: 'feature', - label: 'Feature Implementation', + label: 'Feature', }, { id: 2, name: 'bug', - label: 'Bug Fix', + label: 'Bug', }, { id: 3, + name: 'daily', + label: 'Daily Standup', + }, + { + id: 4, name: 'code_review', - label: 'Code Review Checklist ', + label: 'Code Review ', }, ] diff --git a/client/components/planning/TemplateSection/contants.ts b/client/components/planning/TemplateSection/contants.ts deleted file mode 100644 index bbd2777..0000000 --- a/client/components/planning/TemplateSection/contants.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { getCurrentDate } from 'utils/functions' - -const currentDate = getCurrentDate() // MM/DD/YYYY - -export const DEFAULT_TEMPLATES = { - feature: { - title: '✨ Feature: [Feature Name]', - description: `## Overview - -### 🎯 Goal -What does this feature aim to achieve? - -### βœ… Key Requirements -- Requirement 1: Brief description -- Requirement 2: Brief description - -### πŸ›  Implementation Steps -1. **Step 1:** Short description -2. **Step 2:** Short description - -### πŸ” Technical Considerations -Any significant technical considerations or decisions? - -### 🚦 Dependencies -List any critical internal or external dependencies. - -### ⏳ Estimated Effort -Rough time estimate for completion. - -### πŸ“Š Impact & Metrics -How will we measure success? - -### πŸ“… Milestones -- **Start Date:** ${currentDate} -- **End Date:** ${currentDate} - -### πŸš€ Launch Plan -High-level overview of rollout strategy. - -### πŸ“ Notes -Any additional notes or important concerns.`, - }, - bug: { - title: '🐞 Bug Fix: [Bug Title] ', - description: `## 🚨 Problem Statement - -### 🎯 Objective -- Clearly define the bug and the expected correct behavior. - -### πŸ•΅οΈβ€β™‚οΈ Reproduction Steps -1. Step one to reproduce the bug. -2. Step two to reproduce the bug. - -### πŸ›  Affected Areas -- List the parts of the application affected by this bug. - -### πŸ’‘ Proposed Fix -- Outline the approach to fix the bug. - -### πŸ”— Dependencies -- Note if the fix is dependent on any other tasks or updates. - -### ⏳ Time Estimate -- [X] hours - -### 🏷 Priority -- High/Medium/Low - -### πŸ“ Notes -- Any temporary workarounds or additional context.`, - }, - code_review: { - title: 'πŸ” Code Review: [Feature/Bugfix Name]', - description: `## πŸ“š Overview - -### 🎯 Objective -- Summarize the purpose of the code changes and the problem it solves. - -### πŸ›  Changes Made -- List the major changes made in the codebase. - -### πŸ“– Instructions for Reviewers -1. Key areas to focus on during the review. -2. Specific concerns or areas where feedback is sought. - -### πŸš€ Testing -- Outline the testing approach and any specific tests that were added. - -### πŸ”— Dependencies -- Mention any dependencies on other code changes or external systems. - -### ⏳ Time Estimate for Review -- [X] hours - -### 🏷 Priority -- High/Medium/Low - -### πŸ“ Notes -- Additional information for reviewers, such as context or reference materials.`, - }, - generic: { - title: 'πŸ“Œ Task Title', - description: `## πŸš€ Objective & Requirements -Briefly describe the main goal of this task and list specific requirements or functionalities needed. - -## ⏰ Timeline -- **Deadline:** ${currentDate} - -## πŸ”— Links -- [Link 1](URL) -- [Link 2](URL) - -## πŸ“ Additional Information -Provide any additional context, resources, or references relevant to the task.`, - }, -} diff --git a/client/components/planning/TemplateSection/templates.ts b/client/components/planning/TemplateSection/templates.ts new file mode 100644 index 0000000..94dae89 --- /dev/null +++ b/client/components/planning/TemplateSection/templates.ts @@ -0,0 +1,121 @@ +export const DEFAULT_TEMPLATES = { + feature: { + title: '✨ Feature: [Feature Name]', + description: `## πŸ“– Overview +A concise description of what this feature is and its expected impact. Mention the key user benefit or problem it solves. + +### 🎯 Goals +- Main goal of the feature. +- Secondary goals or benefits, if any. + +## πŸ“‹ Requirements +Briefly list the core requirements or conditions this feature must meet. Detailed requirements can be managed as subtasks. + +## πŸ”— Links +- **Project Tracking:** [Link_to_project_management_tool_or_ticket](#) +- **Related Documents:** [Link_to_related_documents_or_resources](#) +- **Design Resources:** [Link_to_design_resources_or_assets](#) +- **API Documentation:** [Link_to_API_documentation](#) +- **Other Relevant Links:** [Miscellaneous_links](#) + +## πŸ›  Development Steps +Outline the major steps or phases in development. Use subtasks to manage detailed tasks and changes. + +1. [General step 1] +2. [General step 2] +3. [Add more as needed] + +## πŸ§ͺ Testing Strategy +- **πŸ” Unit Tests:** Key areas to cover. +- **βš™οΈ Integration Tests:** Important interactions with other features or services. +- **πŸ‘₯ User Acceptance Testing (UAT):** Criteria for UAT and key user scenarios. + +## πŸ”— Dependencies +List any internal or external dependencies that could affect this feature's development timeline. + +## ⏳ Time Estimate +Provide a rough estimate for scheduling purposes. Update as the feature progresses. + +## πŸ“ Notes +Include any additional notes, open questions, or considerations here. This section can be updated as the feature development evolves.`, + }, + bug: { + title: '🐞 Bug Fix: [Bug Title] ', + description: `## 🚨 Overview +Briefly describe the issue. + +## πŸ“ Occurrence + Specify the part(s) of the app affected. + +## πŸ•΅οΈ Steps to Reproduce +1. First step +2. Second step +- **Frequency:** Always? Sometimes? + +## 🎯 Expected vs. Actual +- **Expected:** What should happen? +- **Actual:** What actually happens? + +## πŸ“Έ Attachments +- **Screenshots/Videos:** [Link or attach] +- **Logs:** [Link or attach] + +## πŸ›  Suggested Fix (If any) +- **Your thoughts:** Brief idea on fixing it (optional). + +## πŸ”— Useful Links +- [Related_Docs](#) +- [Similar_Issues](#)`, + }, + daily: { + title: 'πŸŒ… Daily Stand-up Update', + description: `## βœ… Yesterday's Achievements +- Completed task 1 +- Reviewed PR from colleague + +## 🎯 Today's Goals +- Start working on feature X +- Fix bug reported by QA + +## ❌ Blockers +- Awaiting design assets for feature Y +- Need clarification on API endpoint + +## πŸ”— Links +- [Yesterday's_PR](#) +- [Bug_Report](#)`, + }, + code_review: { + title: 'πŸ” Code Review: [Feature/Bugfix Name]', + description: `## πŸ›  Functionality +- [ ] Does the code accomplish the task’s objective? + +## πŸ“ Best Practices +- [ ] Is the code clean and following best practices? + +## πŸš€ Performance +- [ ] Any potential performance impacts? + +## πŸ§ͺ Testing +- [ ] Is the task adequately tested?`, + }, + generic: { + title: 'πŸ“Œ Task Title', + description: `## πŸ“– Overview +A brief description of what this task entails and its purpose. + +## 🎯 Objective +Clearly state what success looks like for this task. + +## ⏱ Estimated Time +Rough estimate to complete. + +## πŸ“Œ Steps to Completion +List the key steps in order, if applicable. + +## πŸ”— Resources +- [Documentation](#) +- [Design_Mockups](#) +- [Relevant_Tickets](#)`, + }, +} diff --git a/client/jotai/atoms.ts b/client/jotai/atoms.ts index 423b3d8..3e1e662 100644 --- a/client/jotai/atoms.ts +++ b/client/jotai/atoms.ts @@ -1,6 +1,6 @@ import { atomWithStorage } from 'jotai/utils' import { type Task } from '../types/types' -import { DEFAULT_TEMPLATES } from '@/components/planning/TemplateSection/contants' +import { DEFAULT_TEMPLATES } from '@/components/planning/TemplateSection/templates' export type Snippet = { id: string