Skip to content

Commit 9df3e8b

Browse files
readme
1 parent 3c25221 commit 9df3e8b

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

GitDiffExample/README.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# GitDiff Example App
2+
3+
A comprehensive showcase app demonstrating all features of the `gitdiff` SwiftUI package.
4+
5+
## Overview
6+
7+
This example app is designed to showcase the full capabilities of the gitdiff package through an interactive and visually appealing interface. Perfect for:
8+
- Creating screenshots for documentation
9+
- Recording demo videos
10+
- Testing different configurations
11+
- Learning the API
12+
13+
## Features
14+
15+
### 1. **Showcase Tab** 🌟
16+
- Animated carousel showcasing all built-in themes
17+
- Auto-play functionality for smooth demos
18+
- Beautiful gradient backgrounds
19+
- Theme transition animations
20+
21+
### 2. **Theme Gallery Tab** 🎨
22+
- Grid view of all 3 built-in themes (Light, Dark, GitLab)
23+
- Interactive theme selection with custom theme creation
24+
- Side-by-side theme comparison
25+
- Custom theme creator with color pickers
26+
- Full-screen preview mode
27+
28+
### 3. **Customization Playground Tab** 🛠
29+
- Real-time configuration controls:
30+
- Font size slider (10-20pt)
31+
- Font weight selector
32+
- Line spacing options
33+
- Line numbers toggle
34+
- Word wrap toggle
35+
- Split view with live preview
36+
- Preset configurations (Default, Code Review, Mobile, Presentation)
37+
- Configuration summary display
38+
39+
### 4. **Examples Tab** 📄
40+
- Categorized diff examples:
41+
- Simple code changes
42+
- File renames
43+
- New/deleted files
44+
- Binary files
45+
- Large diffs
46+
- Multiple files
47+
- Detailed view for each example
48+
- Theme switching within examples
49+
- Share functionality
50+
51+
### 5. **Code Snippets Tab** 💻
52+
- Categorized API examples
53+
- Copy-to-clipboard functionality
54+
- Live previews
55+
- Complete code samples for:
56+
- Basic usage
57+
- Theme application
58+
- Configuration options
59+
- Advanced patterns
60+
61+
## Running the App
62+
63+
1. Open `GitDiffExample.xcodeproj` in Xcode
64+
2. Select an iOS simulator (iPhone 14 Pro recommended for screenshots)
65+
3. Build and run (⌘R)
66+
67+
## Recording Tips
68+
69+
### For Screenshots:
70+
1. Use the **Showcase** tab for hero images
71+
2. Use **Theme Gallery** to show theme variety
72+
3. Use **Customization Playground** to demonstrate configuration options
73+
74+
### For Demo Videos:
75+
1. Start with the auto-playing **Showcase** tab
76+
2. Navigate through each tab to show features
77+
3. Use the **Customization Playground** to show real-time updates
78+
4. End with **Code Snippets** to show implementation ease
79+
80+
## Architecture
81+
82+
The app is built with:
83+
- SwiftUI 3.0+
84+
- Clean MVVM-like structure
85+
- Reusable components
86+
- Sample data in `SampleDiffs.swift`
87+
88+
## Customization
89+
90+
Feel free to modify:
91+
- Sample diff content in `SampleDiffs.swift`
92+
- Theme showcase timing in `ShowcaseView.swift`
93+
- Example categories in `ExamplesView.swift`
94+
- Code snippets in `CodeSnippetsView.swift`
95+
96+
## License
97+
98+
This example app is part of the gitdiff package and follows the same license.

0 commit comments

Comments
 (0)