Skip to content

Commit b8019e6

Browse files
committed
added docs for skill pulsecheck
1 parent c77bfb2 commit b8019e6

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Pulse Check Skills Feature
2+
3+
## Overview
4+
The Pulse Check Skills feature displays a list of skills that users can track their progress on through pulse check assessments. This feature is controlled by a backend feature toggle and only displays data after users have completed pulse check assessments.
5+
6+
## Feature Toggle
7+
- **Toggle Name**: `pulseCheckIndicator`
8+
- **Configuration Location**: Backend experience/program configuration
9+
- **Type**: Boolean flag in `featureToggle` object
10+
11+
### Backend Configuration
12+
The feature toggle is fetched via GraphQL in the `experiences` query:
13+
14+
```graphql
15+
query experiences {
16+
experiences {
17+
# ... other fields
18+
featureToggle {
19+
pulseCheckIndicator
20+
}
21+
}
22+
}
23+
```
24+
25+
This configuration is stored in the experience object and cached in browser storage.
26+
27+
## Implementation Details
28+
29+
### Data Flow
30+
1. **Feature Check**: On home page initialization, the app checks if `pulseCheckIndicator` is enabled
31+
- Retrieved from: `this.storageService.getFeature('pulseCheckIndicator')`
32+
- Source: `experience.featureToggle.pulseCheckIndicator`
33+
34+
2. **Data Loading**: When enabled, skills are fetched via `homeService.getPulseCheckSkills()`
35+
- Triggered in: `HomePage.updateDashboard()`
36+
- GraphQL Query: `pulseCheckSkills` query
37+
- Condition: Only populates if backend returns skills (`newSkills.length > 0`)
38+
39+
3. **Data Population**:
40+
```typescript
41+
this.homeService.getPulseCheckSkills().pipe(
42+
takeUntil(this.unsubscribe$),
43+
).subscribe((res) => {
44+
const newSkills = res?.data?.pulseCheckSkills || [];
45+
if (newSkills.length > 0) {
46+
this.pulseCheckSkills = newSkills;
47+
}
48+
});
49+
```
50+
51+
### When Skills Appear
52+
- **Initial State**: `pulseCheckSkills` is an empty array `[]`
53+
- **Population Trigger**: Backend returns skills data (typically after user completes their first pulse check assessment)
54+
- **Refresh Timing**:
55+
- On home page load
56+
- On navigation back to home page
57+
- When `updateDashboard()` is called (e.g., via `NavigationEnd` events)
58+
59+
## Related Files
60+
- **Component**: `projects/v3/src/app/pages/home/home.page.ts`
61+
- **Service**: `projects/v3/src/app/services/home.service.ts`
62+
- **Type Definition**: `PulseCheckSkill` interface
63+
- **Experience Service**: `projects/v3/src/app/services/experience.service.ts`
64+
65+
## Type Definition
66+
```typescript
67+
interface PulseCheckSkill {
68+
// specific fields defined in home.service.ts
69+
// typically includes: id, name, rating, status, etc.
70+
}
71+
```
72+
73+
## Usage in Template
74+
The `pulseCheckSkills` array is available in the home page template and can be used to:
75+
- Display skill cards
76+
- Show progress indicators
77+
- Render traffic light status per skill
78+
- Link to pulse check assessment activities
79+
80+
## Feature Toggle Check
81+
```typescript
82+
// in home.page.ts ngOnInit()
83+
this.pulseCheckIndicatorEnabled = this.storageService.getFeature('pulseCheckIndicator');
84+
85+
// conditional loading
86+
if (this.pulseCheckIndicatorEnabled === true) {
87+
this.homeService.getPulseCheckStatuses().pipe(...).subscribe(...);
88+
}
89+
```
90+
91+
## Backend Requirements
92+
To enable this feature:
93+
1. Set `featureToggle.pulseCheckIndicator = true` in the experience/program configuration
94+
2. Ensure the GraphQL endpoint supports the `pulseCheckSkills` query
95+
3. Return skill data once user completes pulse check assessments
96+
97+
## Related Features
98+
- **Pulse Check Status**: Traffic light indicators showing project health
99+
- **Pulse Check Assessments**: The assessment activities that populate skill data
100+
- **Global Skills Info**: Information dialog about the traffic light system (see `onTrackInfo()` method)
101+
102+
## Notes
103+
- Skills data is only fetched when the feature is enabled
104+
- Empty array is maintained until backend provides skill data
105+
- Feature gracefully handles disabled state by not making unnecessary API calls
106+
- Related to team pulse check functionality and project progress tracking

0 commit comments

Comments
 (0)