Skip to content

Commit 22cdf6e

Browse files
Develop (#4)
* ops: updated workflows and unit tests coverage rules * chore: update test coverage rules * chore: setting up env * chore: fixed prettier format errors * ops: updated workflow trigger * 0.0.1 * chore: standardize workflows and ci/cd - Fix SONAR_PROJECT_KEY (critical bug fix) - Add dependabot.yml for dependency management - Add sonarqube_mcp.instructions.md - Standardize branch triggers and Actions versions - Pin SonarQube actions to commit SHA * chore: add copilot-instructions.md for standardization - Add comprehensive copilot-instructions.md guiding notification UI development - Align documentation with other frontend packages - Establish clear naming conventions and testing standards - Define module structure and development workflow * chore: standardize npm scripts (lint, format, typecheck, test, build, clean, verify, prepublishOnly) * chore: Standardize ESLint and Prettier configs with best practices * docs: add standardized instruction files structure - Add comprehensive instruction files in .github/instructions/ - Includes copilot, testing, bugfix, features, general guidelines - Standardize documentation across all repositories * ci: update publish workflow to require version tags - Change trigger from tag push to master branch push - Add tag validation using 'git describe --exact-match' - Prevent failed workflows on feature branch tag pushes - Maintain semantic versioning with mandatory tags * ops: UPDATED publish workflow and dependabot PR limits * Notification UI (#3) * Develop (#1) * ops: updated workflows and unit tests coverage rules * chore: update test coverage rules * chore: setting up env * chore: fixed prettier format errors * ops: updated workflow trigger * 0.0.1 * first version * fixed a style issue and added changeset --------- Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> * ops (ci): standardize publish validation and dependabot across all packages - Replace git tag --list strategy with package.json-driven tag validation in all 16 publish workflows; use git rev-parse to verify the exact tag exists rather than guessing the latest repo-wide tag - Update error guidance to reflect feat/** → develop → master flow - Standardize dependabot to npm-only, grouped, monthly cadence across all 16 packages; remove github-actions ecosystem updates - Add missing dependabot.yml to AuthKit-UI, ChartKit-UI, HealthKit, HooksKit, paymentkit, StorageKit * fix: missing dependencies for test coverage * tests: added test files to pass thresholds * fix: release check Sonar test directory * fix: added `lcov`to reporter --------- Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com>
1 parent 2d5a94d commit 22cdf6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5207
-160
lines changed

.changeset/bright-owls-approve.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
'@ciscode/ui-notification-kit': minor
3+
---
4+
5+
Ship the first functional release of NotificationKit-UI.
6+
7+
### Added
8+
9+
- Notification provider and hook API (`NotificationProvider`, `useNotification`)
10+
- Notification types: success, error, warning, info, loading, default
11+
- Position support: top-left, top-center, top-right, center, bottom-left, bottom-center, bottom-right
12+
- Configurable animations (slide, fade, scale), durations, auto-dismiss, close button, actions, and custom icons
13+
- Store lifecycle with add/update/dismiss/clear/restore and history tracking
14+
- Route-aware clearing support (`clearOnNavigate`, `navigationKey`)
15+
- Accessibility support (live-region announcements, ARIA roles, keyboard escape-to-dismiss)
16+
- Tailwind + RTL styling support and published style asset export (`./style.css`)
17+
- Test coverage for store behavior, provider behavior, and a11y essentials
18+
19+
### Changed
20+
21+
- Package entry exports updated to align with generated build outputs
22+
- Notification rendering moved to a portal to avoid stacking-context issues in host apps
23+
- Layering hardened so notifications stay above dashboard content
24+
25+
### Notes
26+
27+
- Import styles in host apps using: `@ciscode/ui-notification-kit/style.css`

.github/copilot-instructions.md

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# Copilot Instructions - NotificationKit-UI
2+
3+
> **Purpose**: Development guidelines for NotificationKit-UI - reusable React notification UI components.
4+
5+
---
6+
7+
## 🎯 Package Overview
8+
9+
**Package**: `@ciscode/ui-notification-kit`
10+
**Type**: React Frontend Component Library
11+
**Purpose**: Pre-built notification and alert UI components for React apps
12+
13+
### This Package Provides:
14+
15+
- Notification display components
16+
- Toast/alert components
17+
- Notification context providers
18+
- Notification state management hooks
19+
- TypeScript types for notification state
20+
- Vitest unit tests with 80%+ coverage
21+
- Changesets for version management
22+
- Husky + lint-staged for code quality
23+
24+
---
25+
26+
## 🏗️ Project Structure
27+
28+
```
29+
src/
30+
├── components/ # React components
31+
│ ├── Notification/
32+
│ ├── Toast/
33+
│ └── index.ts
34+
├── hooks/ # Custom hooks
35+
│ ├── useNotification.ts
36+
│ └── useToast.ts
37+
├── context/ # Context providers
38+
│ └── NotificationProvider.tsx
39+
├── types/ # TypeScript types
40+
│ └── notification.types.ts
41+
└── index.ts # Public exports
42+
```
43+
44+
---
45+
46+
## 📝 Naming Conventions
47+
48+
**Components**: `PascalCase.tsx`
49+
50+
- `Notification.tsx`
51+
- `Toast.tsx`
52+
- `Alert.tsx`
53+
54+
**Hooks**: `camelCase.ts` with `use` prefix
55+
56+
- `useNotification.ts`
57+
- `useToast.ts`
58+
59+
**Types**: `kebab-case.ts`
60+
61+
- `notification.types.ts`
62+
63+
---
64+
65+
## 🧪 Testing Standards
66+
67+
### Coverage Target: 80%+
68+
69+
**Unit Tests:**
70+
71+
- ✅ All components
72+
- ✅ All custom hooks
73+
- ✅ Context logic
74+
- ✅ Type definitions
75+
76+
**Component Tests:**
77+
78+
- ✅ Rendering checks
79+
- ✅ User interactions
80+
- ✅ State changes
81+
82+
**Test file location:**
83+
84+
```
85+
Notification/
86+
├── Notification.tsx
87+
└── Notification.test.tsx
88+
```
89+
90+
---
91+
92+
## 📚 Documentation
93+
94+
### JSDoc Required For:
95+
96+
- All exported components
97+
- All exported hooks
98+
- All exported types/interfaces
99+
- All public functions
100+
101+
### Example:
102+
103+
```typescript
104+
/**
105+
* Displays a notification message
106+
* @param message - The notification message
107+
* @param type - Type of notification (success, error, warning, info)
108+
* @returns Notification component
109+
*/
110+
export function Notification({ message, type }: Props): JSX.Element;
111+
```
112+
113+
---
114+
115+
## 🎨 Code Style
116+
117+
- ESLint with TypeScript support (`--max-warnings=0`)
118+
- Prettier formatting
119+
- TypeScript strict mode
120+
- Functional components only
121+
- No `React.FC` - always explicit `JSX.Element` return type
122+
123+
---
124+
125+
## 🔄 Development Workflow
126+
127+
### Branch Naming:
128+
129+
```bash
130+
feature/NK-UI-123-add-notification
131+
bugfix/NK-UI-456-fix-toast-timing
132+
refactor/NK-UI-789-extract-styles
133+
```
134+
135+
### Before Publishing:
136+
137+
- [ ] All tests passing
138+
- [ ] Coverage >= 80%
139+
- [ ] ESLint checks pass
140+
- [ ] TypeScript strict mode passes
141+
- [ ] All public APIs documented
142+
- [ ] Changeset created
143+
- [ ] README updated
144+
145+
---
146+
147+
## 📦 Versioning
148+
149+
**MAJOR** (x.0.0): Breaking API changes
150+
**MINOR** (0.x.0): New features (backward compatible)
151+
**PATCH** (0.0.x): Bug fixes and improvements
152+
153+
Always create a changeset for user-facing changes using `npm run changeset`.
154+
155+
---
156+
157+
## 🔐 Security
158+
159+
- Never expose sensitive data in notifications
160+
- Sanitize notification content
161+
- Validate all notification props
162+
- No `dangerouslySetInnerHTML` without approval
163+
164+
---
165+
166+
## 🚫 Restrictions
167+
168+
**NEVER without approval:**
169+
170+
- Breaking changes to component APIs
171+
- Removing exported components/hooks
172+
- Major dependency upgrades
173+
174+
**CAN do autonomously:**
175+
176+
- Bug fixes (non-breaking)
177+
- Internal refactoring
178+
- Adding new features (additive)
179+
- Test improvements
180+
181+
---
182+
183+
## 💬 Communication
184+
185+
- Brief and direct
186+
- Reference component names when discussing changes
187+
- Flag breaking changes immediately
188+
- This package is consumed by multiple applications
189+
190+
---
191+
192+
_Last Updated: March 3, 2026_
193+
_Version: 0.1.0_

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 1
8+
groups:
9+
npm-dependencies:
10+
patterns:
11+
- '*'
12+
assignees:
13+
- CISCODE-MA/cloud-devops
14+
labels:
15+
- 'dependencies'
16+
- 'npm'
17+
commit-message:
18+
prefix: 'chore(deps)'
19+
include: 'scope'
20+
rebase-strategy: auto

0 commit comments

Comments
 (0)