Skip to content

Commit 4c073b0

Browse files
committed
Add comprehensive tests for DebounceManager, LazyCache, and ThrottleManager
- Implemented unit tests for DebounceManager covering various scenarios including single calls, rapid calls, and error handling. - Added tests for LazyCache to ensure correct caching behavior, including expiration and error handling. - Created tests for ThrottleManager to validate throttling behavior with leading and trailing executions, as well as concurrent calls. - Ensured all new tests check for proper exception handling and resource management (e.g., disposal).
1 parent 150c4f9 commit 4c073b0

75 files changed

Lines changed: 19942 additions & 3728 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 515 additions & 237 deletions
Large diffs are not rendered by default.

docs-site/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

docs-site/README.md

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
# EasyAppDev.Blazor.Store Documentation Website
2+
3+
Modern, interactive documentation website for EasyAppDev.Blazor.Store built with React and Vite.
4+
5+
## Features
6+
7+
- 📚 **Multi-Page Documentation** - Comprehensive coverage of all library features
8+
- 🎨 **Syntax Highlighting** - Beautiful code examples with Prism.js
9+
- 📱 **Responsive Design** - Works perfectly on desktop, tablet, and mobile
10+
-**Fast Performance** - Built with Vite for lightning-fast development
11+
- 🧭 **Easy Navigation** - Sidebar navigation with clear hierarchy
12+
- 🎯 **Focused Content** - Each page dedicated to a specific topic
13+
- ⚙️ **Async Helpers Showcase** - Detailed documentation for v2.0 features
14+
15+
## Getting Started
16+
17+
### Prerequisites
18+
19+
- Node.js 18.0 or higher
20+
- npm or yarn
21+
22+
### Installation
23+
24+
```bash
25+
cd docs-site
26+
npm install
27+
```
28+
29+
### Development
30+
31+
Run the development server:
32+
33+
```bash
34+
npm run dev
35+
```
36+
37+
The site will be available at `http://localhost:3000`
38+
39+
### Build for Production
40+
41+
```bash
42+
npm run build
43+
```
44+
45+
The built site will be in the `dist/` directory.
46+
47+
### Preview Production Build
48+
49+
```bash
50+
npm run preview
51+
```
52+
53+
## Project Structure
54+
55+
```
56+
docs-site/
57+
├── src/
58+
│ ├── components/
59+
│ │ ├── Layout/ # Main layout with sidebar
60+
│ │ │ ├── Layout.jsx
61+
│ │ │ └── Layout.css
62+
│ │ ├── CodeBlock/ # Syntax-highlighted code blocks
63+
│ │ │ ├── CodeBlock.jsx
64+
│ │ │ └── CodeBlock.css
65+
│ │ └── Alert/ # Alert/notice components
66+
│ │ ├── Alert.jsx
67+
│ │ └── Alert.css
68+
│ ├── pages/
69+
│ │ ├── Home.jsx # Landing page
70+
│ │ ├── GettingStarted.jsx
71+
│ │ ├── CoreConcepts.jsx
72+
│ │ ├── AsyncHelpers/ # v2.0 Async Helpers
73+
│ │ │ ├── AsyncHelpers.jsx # Overview
74+
│ │ │ ├── UpdateDebounced.jsx
75+
│ │ │ ├── AsyncData.jsx
76+
│ │ │ ├── ExecuteAsync.jsx
77+
│ │ │ ├── UpdateThrottled.jsx
78+
│ │ │ └── LazyLoad.jsx
79+
│ │ ├── Performance.jsx
80+
│ │ ├── StateManagement.jsx
81+
│ │ ├── Components.jsx
82+
│ │ ├── DevTools.jsx
83+
│ │ ├── Persistence.jsx
84+
│ │ ├── Middleware.jsx
85+
│ │ ├── BestPractices.jsx
86+
│ │ ├── Migration.jsx
87+
│ │ ├── Examples.jsx
88+
│ │ └── APIReference.jsx
89+
│ ├── App.jsx # React Router setup
90+
│ ├── main.jsx # Entry point
91+
│ └── index.css # Global styles
92+
├── index.html
93+
├── vite.config.js
94+
└── package.json
95+
```
96+
97+
## Navigation Structure
98+
99+
The documentation is organized into logical sections:
100+
101+
### Getting Started
102+
- Introduction
103+
- Quick Start
104+
- Core Concepts
105+
106+
### Core Features
107+
- State Management
108+
- Components
109+
- Performance
110+
111+
### Async Helpers (v2.0)
112+
- Overview
113+
- UpdateDebounced
114+
- AsyncData<T>
115+
- ExecuteAsync
116+
- UpdateThrottled
117+
- LazyLoad
118+
119+
### Advanced
120+
- DevTools
121+
- Persistence
122+
- Middleware
123+
124+
### Resources
125+
- Best Practices
126+
- Migration Guide
127+
- Examples
128+
- API Reference
129+
130+
## Key Pages
131+
132+
### Home (`/`)
133+
- Overview of the library
134+
- Key features and benefits
135+
- Quick start guide
136+
- What's new in v2.0
137+
138+
### Getting Started (`/getting-started`)
139+
- Installation instructions
140+
- 3-step setup guide
141+
- First component example
142+
- Next steps
143+
144+
### Async Helpers (`/async-helpers`)
145+
- Overview of all async helpers
146+
- Code reduction statistics
147+
- Before/after comparisons
148+
- Links to individual helper pages
149+
150+
### Individual Async Helper Pages
151+
Each async helper has a dedicated page with:
152+
- Problem statement
153+
- Solution overview
154+
- Complete code examples
155+
- API reference
156+
- Best practices
157+
- Use cases
158+
- Performance metrics
159+
160+
## Technologies Used
161+
162+
- **React 18.2** - UI library
163+
- **React Router 6.20** - Client-side routing
164+
- **Vite 5.0** - Build tool and dev server
165+
- **Prism.js 1.29** - Syntax highlighting
166+
- **React Icons 4.12** - Icon library
167+
168+
## Design Principles
169+
170+
1. **Developer-Focused** - Clear, concise explanations with plenty of code examples
171+
2. **Progressive Disclosure** - Quick start first, deep dives available
172+
3. **Copy-Paste Friendly** - All code examples are complete and ready to use
173+
4. **Visual Hierarchy** - Color-coded sections, clear headings, proper spacing
174+
5. **Responsive** - Mobile-first design that works on all screen sizes
175+
176+
## Color Scheme
177+
178+
- **Primary:** `#6366f1` (Indigo)
179+
- **Secondary:** `#10b981` (Green)
180+
- **Success:** `#10b981`
181+
- **Warning:** `#f59e0b`
182+
- **Error:** `#ef4444`
183+
- **Info:** `#3b82f6`
184+
185+
## Contributing to Documentation
186+
187+
When adding new pages:
188+
189+
1. Create the page component in `src/pages/`
190+
2. Add the route in `src/App.jsx`
191+
3. Add navigation link in `src/components/Layout/Layout.jsx`
192+
4. Follow existing patterns for consistency
193+
5. Include code examples with syntax highlighting
194+
6. Add alerts for important notes
195+
7. Link to related pages
196+
197+
### Code Example Template
198+
199+
```jsx
200+
import CodeBlock from '../components/CodeBlock/CodeBlock';
201+
202+
const example = `// Your C# code here
203+
public record MyState(int Value)
204+
{
205+
public MyState Increment() => this with { Value = Value + 1 };
206+
}`;
207+
208+
<CodeBlock code={example} title="MyState.cs" />
209+
```
210+
211+
### Alert Template
212+
213+
```jsx
214+
import Alert from '../components/Alert/Alert';
215+
216+
<Alert type="info" title="Pro Tip">
217+
Your helpful message here
218+
</Alert>
219+
```
220+
221+
## Performance
222+
223+
The documentation site is optimized for performance:
224+
225+
- Code splitting via React Router
226+
- Lazy loading of heavy components
227+
- Optimized CSS with CSS variables
228+
- Minimal external dependencies
229+
- Fast Vite build process
230+
231+
## Browser Support
232+
233+
- Chrome (latest)
234+
- Firefox (latest)
235+
- Safari (latest)
236+
- Edge (latest)
237+
238+
## License
239+
240+
MIT © EasyAppDev
241+
242+
## Support
243+
244+
For issues or questions about the documentation:
245+
- Open an issue on GitHub
246+
- Check existing documentation
247+
- Review code examples
248+
249+
---
250+
251+
**Built with ❤️ for the Blazor community**

docs-site/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>EasyAppDev.Blazor.Store - Documentation</title>
8+
<meta name="description" content="State management for Blazor that feels natural, type-safe, and delightfully simple." />
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.jsx"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)