@umituz/react-native-settings 4.20.58 → 4.20.60

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.
Files changed (68) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
  2. package/.github/ISSUE_TEMPLATE/documentation.md +52 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +63 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +84 -0
  5. package/AI_AGENT_GUIDELINES.md +367 -0
  6. package/ARCHITECTURE.md +246 -0
  7. package/CHANGELOG.md +67 -0
  8. package/CODE_OF_CONDUCT.md +75 -0
  9. package/CONTRIBUTING.md +107 -0
  10. package/DOCUMENTATION_MIGRATION.md +319 -0
  11. package/DOCUMENTATION_TEMPLATE.md +155 -0
  12. package/LICENSE +21 -0
  13. package/README.md +321 -498
  14. package/SECURITY.md +98 -0
  15. package/SETTINGS_SCREEN_GUIDE.md +185 -0
  16. package/TESTING.md +358 -0
  17. package/package.json +13 -2
  18. package/src/application/README.md +85 -271
  19. package/src/domains/about/README.md +85 -440
  20. package/src/domains/about/presentation/hooks/README.md +93 -348
  21. package/src/domains/appearance/README.md +95 -584
  22. package/src/domains/appearance/hooks/README.md +95 -303
  23. package/src/domains/appearance/infrastructure/services/README.md +83 -397
  24. package/src/domains/appearance/presentation/components/README.md +95 -489
  25. package/src/domains/cloud-sync/README.md +73 -439
  26. package/src/domains/cloud-sync/presentation/components/README.md +95 -493
  27. package/src/domains/dev/README.md +71 -457
  28. package/src/domains/disclaimer/README.md +77 -411
  29. package/src/domains/disclaimer/presentation/components/README.md +95 -392
  30. package/src/domains/faqs/README.md +86 -574
  31. package/src/domains/feedback/README.md +79 -553
  32. package/src/domains/feedback/presentation/hooks/README.md +93 -426
  33. package/src/domains/legal/README.md +88 -537
  34. package/src/domains/rating/README.md +73 -440
  35. package/src/domains/rating/presentation/components/README.md +95 -475
  36. package/src/domains/video-tutorials/README.md +77 -470
  37. package/src/domains/video-tutorials/presentation/components/README.md +95 -431
  38. package/src/infrastructure/README.md +78 -425
  39. package/src/infrastructure/repositories/README.md +88 -420
  40. package/src/infrastructure/services/README.md +74 -460
  41. package/src/presentation/components/README.md +97 -480
  42. package/src/presentation/components/SettingsErrorBoundary/README.md +48 -436
  43. package/src/presentation/components/SettingsFooter/README.md +48 -427
  44. package/src/presentation/components/SettingsItemCard/README.md +152 -391
  45. package/src/presentation/components/SettingsItemCard/STRATEGY.md +164 -0
  46. package/src/presentation/components/SettingsSection/README.md +47 -401
  47. package/src/presentation/hooks/README.md +95 -389
  48. package/src/presentation/hooks/mutations/README.md +99 -376
  49. package/src/presentation/hooks/queries/README.md +111 -353
  50. package/src/presentation/navigation/README.md +70 -502
  51. package/src/presentation/navigation/SettingsStackNavigator.tsx +2 -0
  52. package/src/presentation/navigation/components/README.md +70 -295
  53. package/src/presentation/navigation/components/wrappers/SettingsScreenWrapper.tsx +3 -0
  54. package/src/presentation/navigation/hooks/README.md +75 -367
  55. package/src/presentation/navigation/types.ts +1 -0
  56. package/src/presentation/navigation/utils/README.md +100 -380
  57. package/src/presentation/screens/README.md +53 -504
  58. package/src/presentation/screens/SettingsScreen.tsx +4 -2
  59. package/src/presentation/screens/components/SettingsContent/README.md +53 -382
  60. package/src/presentation/screens/components/SettingsHeader/README.md +48 -303
  61. package/src/presentation/screens/components/sections/CustomSettingsList/README.md +47 -359
  62. package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +81 -176
  63. package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +40 -297
  64. package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +47 -451
  65. package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +45 -361
  66. package/src/presentation/screens/hooks/README.md +64 -354
  67. package/src/presentation/screens/types/README.md +79 -409
  68. package/src/presentation/screens/utils/README.md +65 -255
@@ -2,390 +2,74 @@
2
2
 
3
3
  Section component that displays user support features including feedback, rating, and FAQs.
4
4
 
5
- ## Features
5
+ ## Purpose
6
6
 
7
- - **Feedback System**: User feedback collection and submission
8
- - **Rating System**: App rating and review functionality
9
- - **FAQ Access**: Quick access to frequently asked questions
10
- - **Modals**: Feedback modal with rating and description
11
- - **Internationalization**: Full i18n support
7
+ Provides a dedicated section for user support options, enabling users to provide feedback, rate the app, and access frequently asked questions. Centralizes all support-related interactions in one cohesive interface.
12
8
 
13
- ## Installation
9
+ ## File Paths
14
10
 
15
- This component is part of `@umituz/react-native-settings`.
11
+ - **Component**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/components/sections/SupportSettingsSection/SupportSettingsSection.tsx`
12
+ - **Support Section**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/presentation/screens/components/sections/SupportSettingsSection/SupportSection.tsx`
13
+ - **Feedback Domain**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domain/feedback/`
14
+ - **Rating Domain**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domain/rating/`
15
+ - **FAQs Domain**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domain/faqs/`
16
16
 
17
- ## Usage
17
+ ## Strategy
18
18
 
19
- ### Basic Usage
19
+ 1. **Section Grouping**: Group Feedback and Rating items under a single "Support" section while keeping FAQ as a separate item
20
+ 2. **Conditional Rendering**: Render each support feature (feedback, rating, FAQs) only when enabled via feature flags
21
+ 3. **Modal Integration**: Use feedback modal components for collecting user feedback with rating and description
22
+ 4. **Domain Delegation**: Delegate feature-specific logic to respective domain components (Feedback, Rating, FAQs)
23
+ 5. **Navigation Handling**: Provide navigation handlers for FAQ access and external store URLs for app rating
20
24
 
21
- ```tsx
22
- import { SupportSettingsSection } from '@umituz/react-native-settings';
25
+ ## Restrictions
23
26
 
24
- function MySettingsScreen() {
25
- const normalizedConfig = {
26
- feedback: { config: {} },
27
- rating: { config: {} },
28
- faqs: { config: {} },
29
- };
27
+ - DO NOT hardcode store URLs; always use configuration
28
+ - DO NOT render feedback or rating items if their feature flags are disabled
29
+ - ❌ NEVER bypass the SupportSection wrapper for feedback and rating items
30
+ - AVOID adding non-support related features to this section
31
+ - DO NOT duplicate feedback modal logic within this component
32
+ - ❌ NEVER assume all support features are enabled
33
+ - ❌ AVOID mixing support features with other feature categories
30
34
 
31
- const features = {
32
- feedback: true,
33
- rating: true,
34
- faqs: true,
35
- };
35
+ ## Rules
36
36
 
37
- return (
38
- <SupportSettingsSection
39
- normalizedConfig={normalizedConfig}
40
- features={features}
41
- />
42
- );
43
- }
44
- ```
37
+ - ✅ MUST receive both normalizedConfig and features as required props
38
+ - ✅ ALWAYS wrap Feedback and Rating items within SupportSection component
39
+ - ✅ MUST render FAQ item separately from the Support section
40
+ - ✅ MUST support internationalization for all text content
41
+ - ✅ SHOULD handle missing or undefined configuration gracefully
42
+ - ✅ MUST provide proper navigation handlers for FAQ access
43
+ - ✅ ALWAYS use translation keys for consistent localization
44
+ - ✅ MUST support custom feedback types when configured
45
45
 
46
- ## Props
46
+ ## AI Agent Guidelines
47
47
 
48
- ### SupportSettingsSectionProps
48
+ When working with SupportSettingsSection:
49
49
 
50
- | Prop | Type | Default | Description |
51
- |------|------|---------|-------------|
52
- | `normalizedConfig` | `NormalizedConfig` | **Required** | Normalized settings configuration |
53
- | `features` | `FeatureFlags` | **Required** | Feature visibility flags |
50
+ 1. **Adding Support Features**: Only add features that relate to user support (Feedback, Rating, Help, FAQs, Contact). Do not add non-support features.
54
51
 
55
- ### FeatureFlags
52
+ 2. **Section Organization**: Keep Feedback and Rating grouped within SupportSection. Place FAQ as a separate item for better visual hierarchy.
56
53
 
57
- ```typescript
58
- interface FeatureFlags {
59
- feedback: boolean; // Show feedback option
60
- rating: boolean; // Show rating option
61
- faqs: boolean; // Show FAQ access
62
- }
63
- ```
54
+ 3. **Modal Configuration**: When modifying feedback behavior, ensure the modal configuration is properly passed to feedback domain components.
64
55
 
65
- ## Component Structure
56
+ 4. **Feature Flag Logic**: When adding new support features, implement corresponding feature flags to control visibility.
66
57
 
67
- ```
68
- SupportSettingsSection
69
- └── SettingsSection "Support"
70
- ├── SupportSection
71
- │ ├── Feedback Item (if features.feedback)
72
- │ └── Rating Item (if features.rating)
73
- └── FAQ Item (if features.faqs)
74
- ```
58
+ 5. **Domain Delegation**: Always delegate rendering to domain-specific components. Do not reimplement feedback, rating, or FAQ logic.
75
59
 
76
- ## Examples
60
+ 6. **Translation Keys**: When adding new text elements or feedback types, always define translation keys in the i18n configuration files.
77
61
 
78
- ### All Support Features
62
+ 7. **Store URLs**: Store URLs should be configurable and not hardcoded. Support both App Store and Play Store URLs.
79
63
 
80
- ```tsx
81
- function FullSupportSettings() {
82
- const normalizedConfig = {
83
- feedback: {
84
- config: {
85
- title: 'Send Feedback',
86
- description: 'Help us improve',
87
- },
88
- },
89
- rating: {
90
- config: {
91
- title: 'Rate This App',
92
- description: 'Love it? Rate us!',
93
- },
94
- },
95
- faqs: {
96
- config: {
97
- title: 'Help & FAQs',
98
- description: 'Find answers',
99
- },
100
- },
101
- };
64
+ 8. **Testing**: Test all combinations of enabled/disabled support features to ensure proper conditional rendering.
102
65
 
103
- const features = {
104
- feedback: true,
105
- rating: true,
106
- faqs: true,
107
- };
66
+ 9. **User Experience**: Ensure feedback submission flow is smooth and provides user feedback (success/error states).
108
67
 
109
- return (
110
- <SupportSettingsSection
111
- normalizedConfig={normalizedConfig}
112
- features={features}
113
- />
114
- );
115
- }
116
- ```
68
+ 10. **FAQ Navigation**: Provide flexible navigation handlers for FAQ access to support different navigation patterns.
117
69
 
118
- ### Feedback Only
119
-
120
- ```tsx
121
- function FeedbackOnlySettings() {
122
- const features = {
123
- feedback: true,
124
- rating: false,
125
- faqs: false,
126
- };
127
-
128
- return (
129
- <SupportSettingsSection
130
- normalizedConfig={{}}
131
- features={features}
132
- />
133
- );
134
- }
135
- ```
136
-
137
- ### Custom Feedback Configuration
138
-
139
- ```tsx
140
- function CustomFeedbackSettings() {
141
- const normalizedConfig = {
142
- feedback: {
143
- config: {
144
- title: 'Share Your Thoughts',
145
- description: 'We value your feedback',
146
- feedbackTypes: ['general', 'bug', 'feature'],
147
- },
148
- },
149
- };
150
-
151
- return (
152
- <SupportSettingsSection
153
- normalizedConfig={normalizedConfig}
154
- features={{ feedback: true, rating: false, faqs: false }}
155
- />
156
- );
157
- }
158
- ```
159
-
160
- ## Sub-Components
161
-
162
- ### SupportSection
163
-
164
- Wrapper component for feedback and rating items.
165
-
166
- ```tsx
167
- <SupportSection
168
- renderSection={(props) => <SettingsSection>{props.children}</SettingsSection>}
169
- renderItem={(props) => <SettingsItemCard {...props} />}
170
- feedbackConfig={{
171
- enabled: true,
172
- config: {
173
- title: 'Send Feedback',
174
- description: 'Tell us what you think',
175
- },
176
- }}
177
- ratingConfig={{
178
- enabled: true,
179
- config: {
180
- title: 'Rate Us',
181
- description: '5 stars would be great!',
182
- },
183
- }}
184
- />
185
- ```
186
-
187
- ### SupportSection Props
188
-
189
- | Prop | Type | Description |
190
- |------|------|-------------|
191
- | `renderSection` | `(props) => ReactNode` | Section renderer |
192
- | `renderItem` | `(props) => ReactNode` | Item renderer |
193
- | `feedbackConfig` | `FeedbackConfig` | Feedback configuration |
194
- | `ratingConfig` | `RatingConfig` | Rating configuration |
195
-
196
- ### FeedbackModalTexts
197
-
198
- Configuration for feedback modal texts:
199
-
200
- ```typescript
201
- interface FeedbackModalTexts {
202
- title: string;
203
- ratingLabel: string;
204
- descriptionPlaceholder: string;
205
- submitButton: string;
206
- submittingButton: string;
207
- feedbackTypes: Array<{
208
- type: FeedbackType;
209
- label: string;
210
- }>;
211
- defaultTitle: (type) => string;
212
- }
213
- ```
214
-
215
- ## Feedback Configuration
216
-
217
- ```typescript
218
- interface FeedbackConfig {
219
- enabled: boolean;
220
- config?: {
221
- title?: string;
222
- description?: string;
223
- feedbackTypes?: FeedbackType[];
224
- };
225
- }
226
- ```
227
-
228
- ### Rating Configuration
229
-
230
- ```typescript
231
- interface RatingConfig {
232
- enabled: boolean;
233
- config?: {
234
- title?: string;
235
- description?: string;
236
- storeUrl?: string;
237
- };
238
- }
239
- ```
240
-
241
- ### FAQ Configuration
242
-
243
- ```typescript
244
- interface FAQConfig {
245
- enabled: boolean;
246
- config?: {
247
- title?: string;
248
- description?: string;
249
- categories?: FAQCategory[];
250
- };
251
- }
252
- ```
253
-
254
- ## Internationalization
255
-
256
- Translation keys used:
257
-
258
- ```typescript
259
- // Section
260
- t("settings.support.title")
261
-
262
- // Feedback
263
- t("settings.feedback.title")
264
- t("settings.feedback.description")
265
- t("settings.feedback.modal.title")
266
- t("settings.feedback.modal.ratingLabel")
267
- t("settings.feedback.modal.descriptionPlaceholder")
268
- t("settings.feedback.modal.submitButton")
269
- t("settings.feedback.modal.submittingButton")
270
-
271
- // Feedback Types
272
- t("settings.feedback.types.general")
273
- t("settings.feedback.types.bugReport")
274
- t("settings.feedback.types.featureRequest")
275
- t("settings.feedback.types.improvement")
276
- t("settings.feedback.types.other")
277
-
278
- // Rating
279
- t("settings.rating.title")
280
- t("settings.rating.description")
281
-
282
- // FAQ
283
- t("settings.faqs.title")
284
- t("settings.faqs.description")
285
- ```
286
-
287
- ## Examples
288
-
289
- ### With Store Rating
290
-
291
- ```tsx
292
- function StoreRatingSupport() {
293
- const config = {
294
- rating: {
295
- config: {
296
- title: 'Rate Us on App Store',
297
- description: 'Your feedback helps us improve',
298
- storeUrl: 'https://apps.apple.com/app/id123',
299
- },
300
- },
301
- };
302
-
303
- return (
304
- <SupportSettingsSection
305
- normalizedConfig={config}
306
- features={{ rating: true }}
307
- />
308
- );
309
- }
310
- ```
311
-
312
- ### Custom Feedback Types
313
-
314
- ```tsx
315
- function CustomFeedbackTypes() {
316
- const config = {
317
- feedback: {
318
- config: {
319
- feedbackTypes: ['bug_report', 'feature_request', 'ui_issue'],
320
- },
321
- },
322
- };
323
-
324
- return (
325
- <SupportSettingsSection
326
- normalizedConfig={config}
327
- features={{ feedback: true }}
328
- />
329
- );
330
- }
331
- ```
332
-
333
- ### With FAQ Categories
334
-
335
- ```tsx
336
- function FAQWithCategories() {
337
- const config = {
338
- faqs: {
339
- config: {
340
- categories: [
341
- {
342
- id: 'getting-started',
343
- title: 'Getting Started',
344
- questions: [
345
- { id: 'q1', question: 'How to begin?', answer: '...' },
346
- ],
347
- },
348
- ],
349
- },
350
- },
351
- };
352
-
353
- return (
354
- <SupportSettingsSection
355
- normalizedConfig={config}
356
- features={{ faqs: true }}
357
- />
358
- );
359
- }
360
- ```
361
-
362
- ## Navigation
363
-
364
- FAQ navigation handler:
365
-
366
- ```tsx
367
- const handleFAQPress = useCallback(() => {
368
- navigation.navigate("FAQ");
369
- }, [navigation]);
370
- ```
371
-
372
- ## Best Practices
373
-
374
- 1. **User Feedback**: Always provide feedback option
375
- 2. **Rating Prompt**: Show rating prompt at appropriate times
376
- 3. **FAQ Access**: Make FAQs easily accessible
377
- 4. **Modal Design**: Keep feedback modal simple and clear
378
- 5. **Feedback Types**: Provide relevant feedback categories
379
- 6. **Thank Users**: Always thank users for feedback
380
- 7. **Follow Up**: Consider providing support contact
381
-
382
- ## Related
70
+ ## Related Components
383
71
 
384
72
  - **Feedback Domain**: Feedback system components
385
73
  - **Rating Domain**: Rating components
386
74
  - **FAQs Domain**: FAQ system
387
- - **Support Section**: Support components
388
-
389
- ## License
390
-
391
- MIT
75
+ - **Support Section**: Support components wrapper