Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2f2b47d
ops: updated workflows and unit tests coverage rules
Zaiidmo Feb 24, 2026
d3ac058
chore: update test coverage rules
Zaiidmo Feb 24, 2026
f6f33da
chore: setting up env
Zaiidmo Feb 24, 2026
c796292
chore: fixed prettier format errors
Zaiidmo Feb 24, 2026
10ca35d
ops: updated workflow trigger
Zaiidmo Feb 24, 2026
63d0ec5
0.0.1
Zaiidmo Feb 24, 2026
f6e7e9c
chore: standardize workflows and ci/cd
Zaiidmo Mar 3, 2026
24ce674
chore: add copilot-instructions.md for standardization
Zaiidmo Mar 3, 2026
55c46de
chore: standardize npm scripts (lint, format, typecheck, test, build,…
Zaiidmo Mar 3, 2026
3324e22
chore: Standardize ESLint and Prettier configs with best practices
Zaiidmo Mar 3, 2026
33520e3
docs: add standardized instruction files structure
Zaiidmo Mar 3, 2026
92789c6
ci: update publish workflow to require version tags
Zaiidmo Mar 3, 2026
3b4e4a0
ops: UPDATED publish workflow and dependabot PR limits
Zaiidmo Mar 12, 2026
fba4739
Notification UI (#3)
a-elkhiraooui-ciscode Mar 27, 2026
306211b
ops (ci): standardize publish validation and dependabot across all pa…
Zaiidmo Mar 30, 2026
0f3c58a
Merge branch 'develop' of github.com:CISCODE-MA/NotificationKit-Ui in…
Zaiidmo Mar 30, 2026
9f690e4
fix: merging conflicts
Zaiidmo Mar 30, 2026
3259b53
fix: missing dependencies for test coverage
Zaiidmo Mar 30, 2026
6af195e
tests: added test files to pass thresholds
Zaiidmo Mar 30, 2026
11b4d92
fix: release check Sonar test directory
Zaiidmo Mar 30, 2026
1e6fa36
fix: added `lcov`to reporter
Zaiidmo Mar 30, 2026
b341391
0.0.2
Zaiidmo Mar 30, 2026
8ffc1db
security: added CODEOWNER file for branches security \\
Zaiidmo Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/bright-owls-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@ciscode/ui-notification-kit': minor
---

Ship the first functional release of NotificationKit-UI.

### Added

- Notification provider and hook API (`NotificationProvider`, `useNotification`)
- Notification types: success, error, warning, info, loading, default
- Position support: top-left, top-center, top-right, center, bottom-left, bottom-center, bottom-right
- Configurable animations (slide, fade, scale), durations, auto-dismiss, close button, actions, and custom icons
- Store lifecycle with add/update/dismiss/clear/restore and history tracking
- Route-aware clearing support (`clearOnNavigate`, `navigationKey`)
- Accessibility support (live-region announcements, ARIA roles, keyboard escape-to-dismiss)
- Tailwind + RTL styling support and published style asset export (`./style.css`)
- Test coverage for store behavior, provider behavior, and a11y essentials

### Changed

- Package entry exports updated to align with generated build outputs
- Notification rendering moved to a portal to avoid stacking-context issues in host apps
- Layering hardened so notifications stay above dashboard content

### Notes

- Import styles in host apps using: `@ciscode/ui-notification-kit/style.css`
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @CISCODE-MA/devops
193 changes: 193 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# Copilot Instructions - NotificationKit-UI

> **Purpose**: Development guidelines for NotificationKit-UI - reusable React notification UI components.

---

## 🎯 Package Overview

**Package**: `@ciscode/ui-notification-kit`
**Type**: React Frontend Component Library
**Purpose**: Pre-built notification and alert UI components for React apps

### This Package Provides:

- Notification display components
- Toast/alert components
- Notification context providers
- Notification state management hooks
- TypeScript types for notification state
- Vitest unit tests with 80%+ coverage
- Changesets for version management
- Husky + lint-staged for code quality

---

## 🏗️ Project Structure

```
src/
├── components/ # React components
│ ├── Notification/
│ ├── Toast/
│ └── index.ts
├── hooks/ # Custom hooks
│ ├── useNotification.ts
│ └── useToast.ts
├── context/ # Context providers
│ └── NotificationProvider.tsx
├── types/ # TypeScript types
│ └── notification.types.ts
└── index.ts # Public exports
```

---

## 📝 Naming Conventions

**Components**: `PascalCase.tsx`

- `Notification.tsx`
- `Toast.tsx`
- `Alert.tsx`

**Hooks**: `camelCase.ts` with `use` prefix

- `useNotification.ts`
- `useToast.ts`

**Types**: `kebab-case.ts`

- `notification.types.ts`

---

## 🧪 Testing Standards

### Coverage Target: 80%+

**Unit Tests:**

- ✅ All components
- ✅ All custom hooks
- ✅ Context logic
- ✅ Type definitions

**Component Tests:**

- ✅ Rendering checks
- ✅ User interactions
- ✅ State changes

**Test file location:**

```
Notification/
├── Notification.tsx
└── Notification.test.tsx
```

---

## 📚 Documentation

### JSDoc Required For:

- All exported components
- All exported hooks
- All exported types/interfaces
- All public functions

### Example:

```typescript
/**
* Displays a notification message
* @param message - The notification message
* @param type - Type of notification (success, error, warning, info)
* @returns Notification component
*/
export function Notification({ message, type }: Props): JSX.Element;
```

---

## 🎨 Code Style

- ESLint with TypeScript support (`--max-warnings=0`)
- Prettier formatting
- TypeScript strict mode
- Functional components only
- No `React.FC` - always explicit `JSX.Element` return type

---

## 🔄 Development Workflow

### Branch Naming:

```bash
feature/NK-UI-123-add-notification
bugfix/NK-UI-456-fix-toast-timing
refactor/NK-UI-789-extract-styles
```

### Before Publishing:

- [ ] All tests passing
- [ ] Coverage >= 80%
- [ ] ESLint checks pass
- [ ] TypeScript strict mode passes
- [ ] All public APIs documented
- [ ] Changeset created
- [ ] README updated

---

## 📦 Versioning

**MAJOR** (x.0.0): Breaking API changes
**MINOR** (0.x.0): New features (backward compatible)
**PATCH** (0.0.x): Bug fixes and improvements

Always create a changeset for user-facing changes using `npm run changeset`.

---

## 🔐 Security

- Never expose sensitive data in notifications
- Sanitize notification content
- Validate all notification props
- No `dangerouslySetInnerHTML` without approval

---

## 🚫 Restrictions

**NEVER without approval:**

- Breaking changes to component APIs
- Removing exported components/hooks
- Major dependency upgrades

**CAN do autonomously:**

- Bug fixes (non-breaking)
- Internal refactoring
- Adding new features (additive)
- Test improvements

---

## 💬 Communication

- Brief and direct
- Reference component names when discussing changes
- Flag breaking changes immediately
- This package is consumed by multiple applications

---

_Last Updated: March 3, 2026_
_Version: 0.1.0_
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 1
groups:
npm-dependencies:
patterns:
- '*'
assignees:
- CISCODE-MA/cloud-devops
labels:
- 'dependencies'
- 'npm'
commit-message:
prefix: 'chore(deps)'
include: 'scope'
rebase-strategy: auto
Loading
Loading