@umituz/react-native-settings 4.20.57 → 4.20.59
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/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
- package/.github/ISSUE_TEMPLATE/documentation.md +52 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +63 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +84 -0
- package/AI_AGENT_GUIDELINES.md +367 -0
- package/ARCHITECTURE.md +246 -0
- package/CHANGELOG.md +67 -0
- package/CODE_OF_CONDUCT.md +75 -0
- package/CONTRIBUTING.md +107 -0
- package/DOCUMENTATION_MIGRATION.md +319 -0
- package/DOCUMENTATION_TEMPLATE.md +155 -0
- package/LICENSE +21 -0
- package/README.md +321 -498
- package/SECURITY.md +98 -0
- package/SETTINGS_SCREEN_GUIDE.md +185 -0
- package/TESTING.md +358 -0
- package/package.json +13 -2
- package/src/__tests__/setup.ts +1 -4
- package/src/application/README.md +85 -271
- package/src/domains/about/README.md +85 -440
- package/src/domains/about/presentation/hooks/README.md +93 -348
- package/src/domains/appearance/README.md +95 -584
- package/src/domains/appearance/hooks/README.md +95 -303
- package/src/domains/appearance/infrastructure/services/README.md +83 -397
- package/src/domains/appearance/presentation/components/README.md +99 -0
- package/src/domains/cloud-sync/README.md +73 -439
- package/src/domains/cloud-sync/presentation/components/README.md +95 -493
- package/src/domains/dev/README.md +71 -457
- package/src/domains/disclaimer/README.md +77 -411
- package/src/domains/disclaimer/presentation/components/README.md +95 -392
- package/src/domains/faqs/README.md +86 -574
- package/src/domains/feedback/README.md +79 -553
- package/src/domains/feedback/presentation/hooks/README.md +93 -426
- package/src/domains/legal/README.md +88 -537
- package/src/domains/rating/README.md +73 -440
- package/src/domains/rating/presentation/components/README.md +95 -475
- package/src/domains/video-tutorials/README.md +77 -470
- package/src/domains/video-tutorials/presentation/components/README.md +95 -431
- package/src/infrastructure/README.md +78 -425
- package/src/infrastructure/repositories/README.md +88 -420
- package/src/infrastructure/services/README.md +74 -460
- package/src/presentation/components/README.md +97 -480
- package/src/presentation/components/SettingsErrorBoundary/README.md +48 -442
- package/src/presentation/components/SettingsFooter/README.md +48 -427
- package/src/presentation/components/SettingsItemCard/README.md +153 -392
- package/src/presentation/components/SettingsItemCard/STRATEGY.md +164 -0
- package/src/presentation/components/SettingsSection/README.md +47 -401
- package/src/presentation/hooks/README.md +95 -389
- package/src/presentation/hooks/mutations/README.md +99 -376
- package/src/presentation/hooks/queries/README.md +111 -353
- package/src/presentation/navigation/README.md +70 -502
- package/src/presentation/navigation/components/README.md +70 -295
- package/src/presentation/navigation/hooks/README.md +75 -367
- package/src/presentation/navigation/utils/README.md +100 -380
- package/src/presentation/screens/README.md +53 -504
- package/src/presentation/screens/components/SettingsContent/README.md +53 -382
- package/src/presentation/screens/components/SettingsHeader/README.md +48 -303
- package/src/presentation/screens/components/sections/CustomSettingsList/README.md +47 -359
- package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +81 -176
- package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +40 -297
- package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +47 -451
- package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +45 -361
- package/src/presentation/screens/hooks/README.md +64 -354
- package/src/presentation/screens/types/README.md +79 -409
- 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
|
-
##
|
|
5
|
+
## Purpose
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
##
|
|
9
|
+
## File Paths
|
|
14
10
|
|
|
15
|
-
|
|
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
|
-
##
|
|
17
|
+
## Strategy
|
|
18
18
|
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
import { SupportSettingsSection } from '@umituz/react-native-settings';
|
|
25
|
+
## Restrictions
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
32
|
-
feedback: true,
|
|
33
|
-
rating: true,
|
|
34
|
-
faqs: true,
|
|
35
|
-
};
|
|
35
|
+
## Rules
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
##
|
|
46
|
+
## AI Agent Guidelines
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
When working with SupportSettingsSection:
|
|
49
49
|
|
|
50
|
-
|
|
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
|
-
|
|
52
|
+
2. **Section Organization**: Keep Feedback and Rating grouped within SupportSection. Place FAQ as a separate item for better visual hierarchy.
|
|
56
53
|
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
60
|
+
6. **Translation Keys**: When adding new text elements or feedback types, always define translation keys in the i18n configuration files.
|
|
77
61
|
|
|
78
|
-
|
|
62
|
+
7. **Store URLs**: Store URLs should be configurable and not hardcoded. Support both App Store and Play Store URLs.
|
|
79
63
|
|
|
80
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|