@umituz/react-native-settings 4.20.61 → 4.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -60
- package/src/domains/gamification/README.md +343 -0
- package/src/domains/gamification/components/AchievementCard.tsx +142 -0
- package/src/domains/gamification/components/AchievementItem.tsx +182 -0
- package/src/domains/gamification/components/AchievementToast.tsx +122 -0
- package/src/domains/gamification/components/GamificationScreen/AchievementsList.tsx +84 -0
- package/src/domains/gamification/components/GamificationScreen/Header.tsx +29 -0
- package/src/domains/gamification/components/GamificationScreen/StatsGrid.tsx +51 -0
- package/src/domains/gamification/components/GamificationScreen/index.tsx +111 -0
- package/src/domains/gamification/components/GamificationScreen/styles.ts +43 -0
- package/src/domains/gamification/components/GamificationScreen/types.ts +77 -0
- package/src/domains/gamification/components/GamificationScreenWrapper.tsx +91 -0
- package/src/domains/gamification/components/GamificationSettingsItem.tsx +33 -0
- package/src/domains/gamification/components/LevelProgress.tsx +129 -0
- package/src/domains/gamification/components/PointsBadge.tsx +60 -0
- package/src/domains/gamification/components/StatsCard.tsx +89 -0
- package/src/domains/gamification/components/StreakDisplay.tsx +119 -0
- package/src/domains/gamification/components/index.ts +13 -0
- package/src/domains/gamification/examples/gamification.config.example.ts +70 -0
- package/src/domains/gamification/examples/localization.example.json +71 -0
- package/src/domains/gamification/hooks/useGamification.ts +91 -0
- package/src/domains/gamification/index.ts +65 -0
- package/src/domains/gamification/store/gamificationStore.ts +162 -0
- package/src/domains/gamification/types/index.ts +103 -0
- package/src/domains/gamification/types/settings.ts +28 -0
- package/src/domains/gamification/utils/calculations.ts +85 -0
- package/src/index.ts +18 -8
- package/src/presentation/navigation/SettingsStackNavigator.tsx +12 -0
- package/src/presentation/navigation/types.ts +2 -0
- package/src/presentation/navigation/utils/navigationScreenOptions.ts +7 -0
- package/src/presentation/screens/types/UserFeatureConfig.ts +2 -0
- package/src/presentation/utils/configCreators.ts +147 -0
- package/src/presentation/utils/index.ts +5 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -51
- package/.github/ISSUE_TEMPLATE/documentation.md +0 -52
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -63
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -84
- package/AI_AGENT_GUIDELINES.md +0 -367
- package/ARCHITECTURE.md +0 -246
- package/CHANGELOG.md +0 -67
- package/CODE_OF_CONDUCT.md +0 -75
- package/CONTRIBUTING.md +0 -107
- package/DOCUMENTATION_MIGRATION.md +0 -319
- package/DOCUMENTATION_TEMPLATE.md +0 -155
- package/SECURITY.md +0 -98
- package/SETTINGS_SCREEN_GUIDE.md +0 -185
- package/TESTING.md +0 -358
- package/src/__tests__/integration.test.tsx +0 -371
- package/src/__tests__/performance.test.tsx +0 -369
- package/src/__tests__/setup.test.tsx +0 -20
- package/src/__tests__/setup.ts +0 -154
- package/src/domains/about/__tests__/integration.test.tsx +0 -328
- package/src/domains/about/__tests__/types.d.ts +0 -5
- package/src/domains/about/domain/entities/__tests__/AppInfo.test.ts +0 -93
- package/src/domains/about/infrastructure/repositories/__tests__/AboutRepository.test.ts +0 -153
- package/src/domains/about/presentation/components/__tests__/AboutContent.simple.test.tsx +0 -178
- package/src/domains/about/presentation/components/__tests__/AboutContent.test.tsx +0 -293
- package/src/domains/about/presentation/components/__tests__/AboutHeader.test.tsx +0 -201
- package/src/domains/about/presentation/components/__tests__/AboutSettingItem.test.tsx +0 -71
- package/src/domains/about/presentation/hooks/__tests__/useAboutInfo.simple.test.tsx +0 -229
- package/src/domains/about/presentation/hooks/__tests__/useAboutInfo.test.tsx +0 -240
- package/src/domains/about/presentation/screens/__tests__/AboutScreen.simple.test.tsx +0 -199
- package/src/domains/about/presentation/screens/__tests__/AboutScreen.test.tsx +0 -366
- package/src/domains/about/utils/__tests__/index.test.ts +0 -408
- package/src/domains/appearance/__tests__/components/AppearanceScreen.test.tsx +0 -195
- package/src/domains/appearance/__tests__/hooks/index.test.tsx +0 -232
- package/src/domains/appearance/__tests__/integration/index.test.tsx +0 -207
- package/src/domains/appearance/__tests__/services/appearanceService.test.ts +0 -299
- package/src/domains/appearance/__tests__/setup.ts +0 -88
- package/src/domains/appearance/__tests__/stores/appearanceStore.test.tsx +0 -175
- package/src/domains/cloud-sync/presentation/components/__tests__/CloudSyncSetting.test.tsx +0 -78
- package/src/domains/legal/__tests__/ContentValidationService.test.ts +0 -195
- package/src/domains/legal/__tests__/StyleCacheService.test.ts +0 -110
- package/src/domains/legal/__tests__/UrlHandlerService.test.ts +0 -71
- package/src/domains/legal/__tests__/setup.ts +0 -82
- package/src/presentation/components/__tests__/SettingsErrorBoundary.test.tsx +0 -186
- package/src/presentation/screens/__tests__/SettingsScreen.test.tsx +0 -322
- package/src/presentation/screens/hooks/__tests__/useFeatureDetection.test.tsx +0 -261
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
### Positive Behavior
|
|
18
|
-
|
|
19
|
-
- Using welcoming and inclusive language
|
|
20
|
-
- Being respectful of differing viewpoints and experiences
|
|
21
|
-
- Gracefully accepting constructive criticism
|
|
22
|
-
- Focusing on what is best for the community
|
|
23
|
-
- Showing empathy towards other community members
|
|
24
|
-
|
|
25
|
-
### Unacceptable Behavior
|
|
26
|
-
|
|
27
|
-
- The use of sexualized language or imagery
|
|
28
|
-
- Trolling, insulting or derogatory comments
|
|
29
|
-
- Personal or political attacks
|
|
30
|
-
- Public or private harassment
|
|
31
|
-
- Publishing others' private information
|
|
32
|
-
- Other unethical or unprofessional conduct
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying and enforcing our standards of
|
|
37
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or reject
|
|
41
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
42
|
-
not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
|
43
|
-
contributor for other behaviors that they deem inappropriate, threatening,
|
|
44
|
-
offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies within all project spaces, and it also applies when
|
|
49
|
-
an individual is officially representing the project or its community in public
|
|
50
|
-
spaces. Examples of representing a project or community include using an official
|
|
51
|
-
project e-mail address, posting via an official social media account, or acting
|
|
52
|
-
as an appointed representative at an online or offline event.
|
|
53
|
-
|
|
54
|
-
## Enforcement
|
|
55
|
-
|
|
56
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
57
|
-
reported to the project team at umit@umituz.com. All complaints will be reviewed
|
|
58
|
-
and investigated and will result in a response that is deemed necessary and
|
|
59
|
-
appropriate to the circumstances. The project team is obligated to maintain
|
|
60
|
-
confidentiality with regard to the reporter of an incident.
|
|
61
|
-
|
|
62
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
63
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
64
|
-
members of the project's leadership.
|
|
65
|
-
|
|
66
|
-
## Attribution
|
|
67
|
-
|
|
68
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
69
|
-
version 2.0, available at
|
|
70
|
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
71
|
-
|
|
72
|
-
[homepage]: https://www.contributor-covenant.org
|
|
73
|
-
|
|
74
|
-
For answers to common questions about this code of conduct, see
|
|
75
|
-
https://www.contributor-covenant.org/faq
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# Contributing to @umituz/react-native-settings
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing to this package! This document provides guidelines for contributing.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
This document guides contributors on how to effectively participate in the development of `@umituz/react-native-settings`, ensuring code quality, consistency, and maintainability.
|
|
8
|
-
|
|
9
|
-
## How to Contribute
|
|
10
|
-
|
|
11
|
-
### Reporting Issues
|
|
12
|
-
|
|
13
|
-
Before creating issues:
|
|
14
|
-
- Check existing issues for duplicates
|
|
15
|
-
- Use clear, descriptive titles
|
|
16
|
-
- Provide reproduction steps
|
|
17
|
-
- Include environment details (React Native version, platform, etc.)
|
|
18
|
-
- Add screenshots for UI issues
|
|
19
|
-
|
|
20
|
-
### Submitting Pull Requests
|
|
21
|
-
|
|
22
|
-
1. Fork the repository
|
|
23
|
-
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
24
|
-
3. Make your changes following our guidelines
|
|
25
|
-
4. Write tests for new functionality
|
|
26
|
-
5. Ensure all tests pass
|
|
27
|
-
6. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
28
|
-
7. Push to the branch (`git push origin feature/amazing-feature`)
|
|
29
|
-
8. Open a Pull Request
|
|
30
|
-
|
|
31
|
-
## Development Workflow
|
|
32
|
-
|
|
33
|
-
### Getting Started
|
|
34
|
-
|
|
35
|
-
1. Clone the repository
|
|
36
|
-
2. Install dependencies: `npm install`
|
|
37
|
-
3. Run type checking: `npm run typecheck`
|
|
38
|
-
4. Run linting: `npm run lint`
|
|
39
|
-
|
|
40
|
-
### Code Style
|
|
41
|
-
|
|
42
|
-
Follow the existing code style:
|
|
43
|
-
- Use TypeScript strict mode
|
|
44
|
-
- Follow naming conventions
|
|
45
|
-
- Add JSDoc comments for public APIs
|
|
46
|
-
- Use meaningful variable names
|
|
47
|
-
- Keep functions focused and small
|
|
48
|
-
|
|
49
|
-
### Testing
|
|
50
|
-
|
|
51
|
-
- Write unit tests for new features
|
|
52
|
-
- Maintain test coverage above 80%
|
|
53
|
-
- Test error conditions
|
|
54
|
-
- Include accessibility tests
|
|
55
|
-
- Update documentation for changes
|
|
56
|
-
|
|
57
|
-
## Project Structure
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
src/
|
|
61
|
-
├── domains/ # Feature domains
|
|
62
|
-
├── presentation/ # UI layer
|
|
63
|
-
├── application/ # Interfaces
|
|
64
|
-
└── infrastructure/ # Data layer
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Follow Domain-Driven Design principles when adding features.
|
|
68
|
-
|
|
69
|
-
## Documentation
|
|
70
|
-
|
|
71
|
-
All documentation must follow the new format:
|
|
72
|
-
- No code examples
|
|
73
|
-
- Use file paths instead
|
|
74
|
-
- Include Purpose, File Paths, Strategy sections
|
|
75
|
-
- Add Restrictions with ❌ markers
|
|
76
|
-
- Add Rules with ✅ markers
|
|
77
|
-
- Include AI Agent Guidelines
|
|
78
|
-
|
|
79
|
-
See `DOCUMENTATION_TEMPLATE.md` for the template.
|
|
80
|
-
|
|
81
|
-
## Commit Messages
|
|
82
|
-
|
|
83
|
-
Use clear, descriptive commit messages:
|
|
84
|
-
- `feat:` - New features
|
|
85
|
-
- `fix:` - Bug fixes
|
|
86
|
-
- `docs:` - Documentation changes
|
|
87
|
-
- `refactor:` - Code refactoring
|
|
88
|
-
- `test:` - Adding/updating tests
|
|
89
|
-
- `chore:` - Maintenance tasks
|
|
90
|
-
|
|
91
|
-
Example: `feat(appearance): add custom color palette support`
|
|
92
|
-
|
|
93
|
-
## Code Review Process
|
|
94
|
-
|
|
95
|
-
1. All PRs require review
|
|
96
|
-
2. Address review feedback
|
|
97
|
-
3. Ensure CI checks pass
|
|
98
|
-
4. Update documentation as needed
|
|
99
|
-
5. Squash commits if necessary
|
|
100
|
-
|
|
101
|
-
## Questions?
|
|
102
|
-
|
|
103
|
-
Feel free to open an issue for questions or discussions.
|
|
104
|
-
|
|
105
|
-
## License
|
|
106
|
-
|
|
107
|
-
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
# Documentation Migration Summary
|
|
2
|
-
|
|
3
|
-
## New Documentation Format
|
|
4
|
-
|
|
5
|
-
All documentation has been migrated to a **code-example-free**, **strategy-based** format.
|
|
6
|
-
|
|
7
|
-
## Key Changes
|
|
8
|
-
|
|
9
|
-
### ❌ Removed
|
|
10
|
-
- All code examples
|
|
11
|
-
- Code snippets
|
|
12
|
-
- Inline code blocks
|
|
13
|
-
- Implementation examples
|
|
14
|
-
|
|
15
|
-
### ✅ Added
|
|
16
|
-
- **Strategy Section**: How to use effectively
|
|
17
|
-
- **Restrictions Section**: What NOT to do (with ❌ markers)
|
|
18
|
-
- **Rules Section**: What MUST be done (with ✅ markers)
|
|
19
|
-
- **AI Agent Guidelines**: Specific instructions for AI coding
|
|
20
|
-
- **File Path References**: Exact paths to implementation
|
|
21
|
-
|
|
22
|
-
## Documentation Template
|
|
23
|
-
|
|
24
|
-
Every README now follows this structure:
|
|
25
|
-
|
|
26
|
-
```markdown
|
|
27
|
-
# [Component Name]
|
|
28
|
-
|
|
29
|
-
## Purpose
|
|
30
|
-
[Brief description]
|
|
31
|
-
|
|
32
|
-
## File Path
|
|
33
|
-
`src/path/to/File.tsx`
|
|
34
|
-
|
|
35
|
-
## Imports
|
|
36
|
-
[Import statements]
|
|
37
|
-
|
|
38
|
-
## Strategy
|
|
39
|
-
- [Strategic point 1]
|
|
40
|
-
- [Strategic point 2]
|
|
41
|
-
|
|
42
|
-
## Restrictions (Forbidden)
|
|
43
|
-
### ❌ DO NOT
|
|
44
|
-
- [What to avoid]
|
|
45
|
-
|
|
46
|
-
### ❌ NEVER
|
|
47
|
-
- [Critical restrictions]
|
|
48
|
-
|
|
49
|
-
### ❌ AVOID
|
|
50
|
-
- [Common mistakes]
|
|
51
|
-
|
|
52
|
-
## Rules
|
|
53
|
-
### ✅ ALWAYS
|
|
54
|
-
- [Mandatory requirements]
|
|
55
|
-
|
|
56
|
-
### ✅ MUST
|
|
57
|
-
- [Critical rules]
|
|
58
|
-
|
|
59
|
-
### ✅ SHOULD
|
|
60
|
-
- [Recommended practices]
|
|
61
|
-
|
|
62
|
-
## AI Agent Guidelines
|
|
63
|
-
[Specific AI instructions]
|
|
64
|
-
|
|
65
|
-
## Related Components
|
|
66
|
-
- [Component]: [File path]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Updated Documentation
|
|
70
|
-
|
|
71
|
-
### ✅ Completed
|
|
72
|
-
|
|
73
|
-
1. **Main README** (`README.md`)
|
|
74
|
-
- Package overview
|
|
75
|
-
- Strategy, Restrictions, Rules
|
|
76
|
-
- Component file references
|
|
77
|
-
- AI guidelines
|
|
78
|
-
|
|
79
|
-
2. **Documentation Template** (`DOCUMENTATION_TEMPLATE.md`)
|
|
80
|
-
- Standard template for all docs
|
|
81
|
-
- Philosophy explanation
|
|
82
|
-
|
|
83
|
-
3. **AI Guidelines** (`AI_AGENT_GUIDELINES.md`)
|
|
84
|
-
- Comprehensive AI coding rules
|
|
85
|
-
- File reference patterns
|
|
86
|
-
- Component creation checklist
|
|
87
|
-
|
|
88
|
-
4. **Settings Screen Guide** (`SETTINGS_SCREEN_GUIDE.md`)
|
|
89
|
-
- Screen strategy
|
|
90
|
-
- Configuration patterns
|
|
91
|
-
- Restrictions and rules
|
|
92
|
-
|
|
93
|
-
5. **SettingsItemCard Strategy** (`src/presentation/components/SettingsItemCard/STRATEGY.md`)
|
|
94
|
-
- Component-specific strategy
|
|
95
|
-
- Usage guidelines
|
|
96
|
-
- AI instructions
|
|
97
|
-
|
|
98
|
-
### 🔄 In Progress (Background Tasks)
|
|
99
|
-
|
|
100
|
-
Three background tasks are updating:
|
|
101
|
-
|
|
102
|
-
**Task 1: Domain READMEs** (10 files)
|
|
103
|
-
- src/domains/about/README.md
|
|
104
|
-
- src/domains/appearance/README.md
|
|
105
|
-
- src/domains/legal/README.md
|
|
106
|
-
- src/domains/disclaimer/README.md
|
|
107
|
-
- src/domains/feedback/README.md
|
|
108
|
-
- src/domains/faqs/README.md
|
|
109
|
-
- src/domains/rating/README.md
|
|
110
|
-
- src/domains/video-tutorials/README.md
|
|
111
|
-
- src/domains/cloud-sync/README.md
|
|
112
|
-
- src/domains/dev/README.md
|
|
113
|
-
|
|
114
|
-
**Task 2: Component READMEs** (14 files)
|
|
115
|
-
- src/presentation/components/SettingsSection/README.md
|
|
116
|
-
- src/presentation/components/SettingsErrorBoundary/README.md
|
|
117
|
-
- src/presentation/components/SettingsFooter/README.md
|
|
118
|
-
- src/presentation/screens/README.md
|
|
119
|
-
- src/presentation/screens/components/SettingsHeader/README.md
|
|
120
|
-
- src/presentation/screens/components/SettingsContent/README.md
|
|
121
|
-
- src/presentation/screens/hooks/README.md
|
|
122
|
-
- src/presentation/screens/utils/README.md
|
|
123
|
-
- src/presentation/screens/types/README.md
|
|
124
|
-
- src/presentation/hooks/README.md
|
|
125
|
-
- src/presentation/navigation/README.md
|
|
126
|
-
- src/presentation/navigation/components/README.md
|
|
127
|
-
- src/presentation/navigation/hooks/README.md
|
|
128
|
-
- src/presentation/navigation/utils/README.md
|
|
129
|
-
|
|
130
|
-
**Task 3: Remaining READMEs** (15+ files)
|
|
131
|
-
- src/application/README.md
|
|
132
|
-
- src/infrastructure/README.md
|
|
133
|
-
- src/presentation/hooks/mutations/README.md
|
|
134
|
-
- src/presentation/hooks/queries/README.md
|
|
135
|
-
- All domain component READMEs
|
|
136
|
-
- All section component READMEs
|
|
137
|
-
- And more...
|
|
138
|
-
|
|
139
|
-
## Documentation Philosophy
|
|
140
|
-
|
|
141
|
-
### Why No Code Examples?
|
|
142
|
-
|
|
143
|
-
**Problem**: Code examples become outdated when implementation changes
|
|
144
|
-
**Solution**: Reference file paths that stay stable
|
|
145
|
-
|
|
146
|
-
**Benefits:**
|
|
147
|
-
1. ✅ Documentation stays valid when code changes
|
|
148
|
-
2. ✅ Developers check current implementation
|
|
149
|
-
3. ✅ No maintenance overhead
|
|
150
|
-
4. ✅ Always accurate
|
|
151
|
-
5. ✅ AI-friendly
|
|
152
|
-
|
|
153
|
-
### Why Strategy/Restrictions/Rules?
|
|
154
|
-
|
|
155
|
-
**Strategy**: High-level guidance
|
|
156
|
-
- When to use component
|
|
157
|
-
- How to integrate it
|
|
158
|
-
- Best practices
|
|
159
|
-
- Common patterns
|
|
160
|
-
|
|
161
|
-
**Restrictions (Forbidden)**: Clear anti-patterns
|
|
162
|
-
- ❌ DO NOT: Common mistakes
|
|
163
|
-
- ❌ NEVER: Critical restrictions
|
|
164
|
-
- ❌ AVOID: Performance issues
|
|
165
|
-
|
|
166
|
-
**Rules**: Mandatory requirements
|
|
167
|
-
- ✅ ALWAYS: Required practices
|
|
168
|
-
- ✅ MUST: Critical rules
|
|
169
|
-
- ✅ SHOULD: Recommendations
|
|
170
|
-
|
|
171
|
-
### Why AI-Friendly?
|
|
172
|
-
|
|
173
|
-
AI agents need:
|
|
174
|
-
- Clear guidelines
|
|
175
|
-
- File paths to reference
|
|
176
|
-
- Rules to follow
|
|
177
|
-
- No outdated code examples
|
|
178
|
-
- Specific restrictions
|
|
179
|
-
- Mandatory requirements
|
|
180
|
-
|
|
181
|
-
## File Reference Pattern
|
|
182
|
-
|
|
183
|
-
### Old Way (Outdated)
|
|
184
|
-
```tsx
|
|
185
|
-
// Code example that becomes stale
|
|
186
|
-
<SettingsItemCard icon="settings" title="Settings" />
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### New Way (Always Valid)
|
|
190
|
-
```markdown
|
|
191
|
-
## File Path
|
|
192
|
-
`src/presentation/components/SettingsItemCard/SettingsItemCard.tsx`
|
|
193
|
-
|
|
194
|
-
## Strategy
|
|
195
|
-
Use SettingsItemCard for ALL settings items
|
|
196
|
-
|
|
197
|
-
## Restrictions
|
|
198
|
-
❌ DO NOT create custom items
|
|
199
|
-
|
|
200
|
-
## Rules
|
|
201
|
-
✅ MUST provide icon and title props
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## AI Agent Workflow
|
|
205
|
-
|
|
206
|
-
When AI agent implements features:
|
|
207
|
-
|
|
208
|
-
1. **Read Documentation**
|
|
209
|
-
- Check README for strategy
|
|
210
|
-
- Understand restrictions
|
|
211
|
-
- Know the rules
|
|
212
|
-
|
|
213
|
-
2. **Reference Implementation**
|
|
214
|
-
- Open file path from docs
|
|
215
|
-
- Check current implementation
|
|
216
|
-
- Follow patterns
|
|
217
|
-
|
|
218
|
-
3. **Follow Guidelines**
|
|
219
|
-
- Adhere to restrictions
|
|
220
|
-
- Apply rules
|
|
221
|
-
- Use existing components
|
|
222
|
-
|
|
223
|
-
4. **No Guessing**
|
|
224
|
-
- File paths show exactly where to look
|
|
225
|
-
- Strategy shows how to use
|
|
226
|
-
- Rules show what to do
|
|
227
|
-
|
|
228
|
-
## Migration Checklist
|
|
229
|
-
|
|
230
|
-
For each documentation file:
|
|
231
|
-
|
|
232
|
-
- [x] Remove all code examples
|
|
233
|
-
- [x] Add file path section
|
|
234
|
-
- [x] Add imports section
|
|
235
|
-
- [x] Add strategy section
|
|
236
|
-
- [x] Add restrictions section
|
|
237
|
-
- [x] Add rules section
|
|
238
|
-
- [x] Add AI guidelines section
|
|
239
|
-
- [x] Update related components with file paths
|
|
240
|
-
- [x] Keep in English
|
|
241
|
-
- [x] Follow standard template
|
|
242
|
-
|
|
243
|
-
## Benefits
|
|
244
|
-
|
|
245
|
-
### For Developers
|
|
246
|
-
- Always accurate documentation
|
|
247
|
-
- Clear guidelines on what to do/not do
|
|
248
|
-
- File paths for quick reference
|
|
249
|
-
- Strategy-based approach
|
|
250
|
-
|
|
251
|
-
### For AI Agents
|
|
252
|
-
- Clear coding rules
|
|
253
|
-
- Specific restrictions
|
|
254
|
-
- Mandatory requirements
|
|
255
|
-
- File paths to reference
|
|
256
|
-
- No outdated examples to confuse
|
|
257
|
-
|
|
258
|
-
### For Maintainers
|
|
259
|
-
- No code example maintenance
|
|
260
|
-
- Documentation stays valid
|
|
261
|
-
- Easy to update strategies
|
|
262
|
-
- Clear rules for new features
|
|
263
|
-
|
|
264
|
-
## Next Steps
|
|
265
|
-
|
|
266
|
-
### For New Documentation
|
|
267
|
-
1. Use `DOCUMENTATION_TEMPLATE.md`
|
|
268
|
-
2. Follow structure
|
|
269
|
-
3. No code examples
|
|
270
|
-
4. Strategy-focused
|
|
271
|
-
5. File path references
|
|
272
|
-
|
|
273
|
-
### For Existing Documentation
|
|
274
|
-
1. Background tasks updating all READMEs
|
|
275
|
-
2. Removing code examples
|
|
276
|
-
3. Adding strategy/restrictions/rules
|
|
277
|
-
4. Maintaining file references
|
|
278
|
-
|
|
279
|
-
### For AI Coding
|
|
280
|
-
1. Read `AI_AGENT_GUIDELINES.md`
|
|
281
|
-
2. Check component STRATEGY.md files
|
|
282
|
-
3. Follow restrictions and rules
|
|
283
|
-
4. Reference implementation files
|
|
284
|
-
5. Use existing components
|
|
285
|
-
|
|
286
|
-
## Quality Assurance
|
|
287
|
-
|
|
288
|
-
### Documentation Quality
|
|
289
|
-
|
|
290
|
-
- ✅ No code examples
|
|
291
|
-
- ✅ Clear file paths
|
|
292
|
-
- ✅ Strategy sections
|
|
293
|
-
- ✅ Restrictions with ❌ markers
|
|
294
|
-
- ✅ Rules with ✅ markers
|
|
295
|
-
- ✅ AI guidelines
|
|
296
|
-
- ✅ All in English
|
|
297
|
-
- ✅ Consistent format
|
|
298
|
-
|
|
299
|
-
### Validation
|
|
300
|
-
|
|
301
|
-
Check each README has:
|
|
302
|
-
- Purpose section
|
|
303
|
-
- File path section
|
|
304
|
-
- Strategy section (3+ points)
|
|
305
|
-
- Restrictions section with subsections
|
|
306
|
-
- Rules section with subsections
|
|
307
|
-
- AI guidelines section
|
|
308
|
-
- Related components with file paths
|
|
309
|
-
|
|
310
|
-
## Status
|
|
311
|
-
|
|
312
|
-
- ✅ Main README updated
|
|
313
|
-
- ✅ Template created
|
|
314
|
-
- ✅ AI guidelines created
|
|
315
|
-
- 🔄 Domain READMEs updating (background)
|
|
316
|
-
- 🔄 Component READMEs updating (background)
|
|
317
|
-
- 🔄 Remaining READMEs updating (background)
|
|
318
|
-
|
|
319
|
-
All documentation is being migrated to the new format systematically!
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
# Documentation Template
|
|
2
|
-
|
|
3
|
-
Standard template for all `@umituz/react-native-settings` documentation.
|
|
4
|
-
|
|
5
|
-
## Structure
|
|
6
|
-
|
|
7
|
-
Each documentation file MUST include these sections:
|
|
8
|
-
|
|
9
|
-
1. **Purpose** - What this component/module does
|
|
10
|
-
2. **File Path** - Where to find the implementation
|
|
11
|
-
3. **Imports** - What to import and from where
|
|
12
|
-
4. **Strategy** - How to use it effectively
|
|
13
|
-
5. **Restrictions** - What NOT to do (Forbidden)
|
|
14
|
-
6. **Rules** - What MUST be followed
|
|
15
|
-
7. **Related Components** - Related files and components
|
|
16
|
-
|
|
17
|
-
## Example Template
|
|
18
|
-
|
|
19
|
-
```markdown
|
|
20
|
-
# [Component/Module Name]
|
|
21
|
-
|
|
22
|
-
## Purpose
|
|
23
|
-
[Brief description of what this does]
|
|
24
|
-
|
|
25
|
-
## File Path
|
|
26
|
-
`src/path/to/file.tsx`
|
|
27
|
-
|
|
28
|
-
## Imports
|
|
29
|
-
```typescript
|
|
30
|
-
import { ComponentName } from '@umituz/react-native-settings';
|
|
31
|
-
// OR
|
|
32
|
-
import { ComponentName } from '../../path/to/file';
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Strategy
|
|
36
|
-
- [Strategic point 1]
|
|
37
|
-
- [Strategic point 2]
|
|
38
|
-
- [Best practices]
|
|
39
|
-
|
|
40
|
-
## Restrictions (Forbidden)
|
|
41
|
-
- ❌ **DO NOT**: [What to avoid]
|
|
42
|
-
- ❌ **NEVER**: [Critical restrictions]
|
|
43
|
-
- ❌ **AVOID**: [Common mistakes]
|
|
44
|
-
|
|
45
|
-
## Rules
|
|
46
|
-
- ✅ **ALWAYS**: [Mandatory requirements]
|
|
47
|
-
- ✅ **MUST**: [Critical rules]
|
|
48
|
-
- ✅ **SHOULD**: [Recommended practices]
|
|
49
|
-
|
|
50
|
-
## Related Components
|
|
51
|
-
- **ComponentName**: Path/to/component
|
|
52
|
-
- **ModuleName**: Path/to/module
|
|
53
|
-
|
|
54
|
-
## AI Agent Guidelines
|
|
55
|
-
When working with this component:
|
|
56
|
-
1. [AI instruction 1]
|
|
57
|
-
2. [AI instruction 2]
|
|
58
|
-
3. [AI instruction 3]
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Philosophy
|
|
62
|
-
|
|
63
|
-
### Why No Code Examples?
|
|
64
|
-
|
|
65
|
-
**Problem**: Code examples become outdated when implementation changes
|
|
66
|
-
**Solution**: Reference file paths that stay stable
|
|
67
|
-
|
|
68
|
-
### Why Strategy/Restrictions/Rules?
|
|
69
|
-
|
|
70
|
-
**Strategy**: High-level approach and best practices
|
|
71
|
-
**Restrictions**: Clear anti-patterns to avoid
|
|
72
|
-
**Rules**: Mandatory requirements for consistency
|
|
73
|
-
|
|
74
|
-
### Why AI-Friendly?
|
|
75
|
-
|
|
76
|
-
AI agents need:
|
|
77
|
-
- Clear guidelines on what to do/not do
|
|
78
|
-
- File paths to reference
|
|
79
|
-
- Rules to follow
|
|
80
|
-
- No outdated code examples to confuse them
|
|
81
|
-
|
|
82
|
-
## Sections Explained
|
|
83
|
-
|
|
84
|
-
### Purpose
|
|
85
|
-
Single sentence describing what the component does.
|
|
86
|
-
|
|
87
|
-
### File Path
|
|
88
|
-
Exact path to the main implementation file.
|
|
89
|
-
|
|
90
|
-
### Imports
|
|
91
|
-
Show import statements (these rarely change).
|
|
92
|
-
|
|
93
|
-
### Strategy
|
|
94
|
-
High-level guidance:
|
|
95
|
-
- When to use this component
|
|
96
|
-
- How to integrate it
|
|
97
|
-
- Best practices
|
|
98
|
-
- Common patterns
|
|
99
|
-
|
|
100
|
-
### Restrictions (Forbidden)
|
|
101
|
-
What NOT to do:
|
|
102
|
-
- ❌ Clear anti-patterns
|
|
103
|
-
- ❌ Common mistakes
|
|
104
|
-
- ❌ Performance issues to avoid
|
|
105
|
-
- ❌ Security concerns
|
|
106
|
-
|
|
107
|
-
### Rules
|
|
108
|
-
What MUST be done:
|
|
109
|
-
- ✅ Mandatory requirements
|
|
110
|
-
- ✅ Consistency rules
|
|
111
|
-
- ✅ Error handling requirements
|
|
112
|
-
- ✅ TypeScript usage rules
|
|
113
|
-
|
|
114
|
-
### Related Components
|
|
115
|
-
Cross-references to related files.
|
|
116
|
-
|
|
117
|
-
### AI Agent Guidelines
|
|
118
|
-
Specific instructions for AI agents:
|
|
119
|
-
- How to generate code for this component
|
|
120
|
-
- What patterns to follow
|
|
121
|
-
- What to avoid
|
|
122
|
-
|
|
123
|
-
## Usage Pattern
|
|
124
|
-
|
|
125
|
-
Instead of:
|
|
126
|
-
|
|
127
|
-
```tsx
|
|
128
|
-
// BAD: Code example that becomes outdated
|
|
129
|
-
<SettingsItemCard icon="settings" title="Settings" />
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Use:
|
|
133
|
-
|
|
134
|
-
```markdown
|
|
135
|
-
## File Path
|
|
136
|
-
`src/presentation/components/SettingsItemCard/SettingsItemCard.tsx`
|
|
137
|
-
|
|
138
|
-
## Strategy
|
|
139
|
-
Use SettingsItemCard for all settings list items. Reference the implementation file for current props and usage patterns.
|
|
140
|
-
|
|
141
|
-
## Restrictions
|
|
142
|
-
- ❌ DO NOT create custom item cards - use SettingsItemCard
|
|
143
|
-
- ❌ NEVER inline settings logic - keep in separate components
|
|
144
|
-
|
|
145
|
-
## Rules
|
|
146
|
-
- ✅ ALWAYS use SettingsItemCard from components
|
|
147
|
-
- ✅ MUST pass required props: icon, title
|
|
148
|
-
- ✅ SHOULD provide onPress handler for navigation
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
This approach:
|
|
152
|
-
- Stays valid when code changes
|
|
153
|
-
- Provides clear guidance
|
|
154
|
-
- Easy to maintain
|
|
155
|
-
- AI-friendly
|