Commit 70e8c18
feat(examples): comprehensive UX overhaul with inline code examples (#819)
* feat(examples): comprehensive UX overhaul with inline code examples
This PR completely rebuilds the Examples app with modern UX patterns,
extensive inline code examples, and comprehensive feature coverage across
all Supabase SDK capabilities.
## Major Changes
### New Authentication Examples
- Created AuthExamplesView as main navigation hub with ExampleRow components
- Enhanced all auth methods with inline CodeExample blocks and educational content
- Added comprehensive "About" sections explaining each method
- Improved loading states, success messages, and error handling
- Updated: Email/Password, Magic Link, Phone OTP, Anonymous Sign-In
- Enhanced MFA flow with better UX and code examples
### New Storage Examples (8 comprehensive views)
- StorageExamplesView: Main navigation hub
- BucketOperationsView: Create, update, delete, empty buckets
- FileUploadView: Photo library, documents, progress tracking
- FileDownloadView: Download with image/text preview
- ImageTransformView: Resize, quality, format with side-by-side comparison
- SignedURLsView: Temporary download/upload URLs, public URLs
- FileManagementView: Move, copy, delete operations
- FileSearchView: Advanced search, sorting, metadata
### New Database Examples
- DatabaseExamplesView: Main navigation hub
- FilteringView: Query filters and ordering
- RPCExamplesView: PostgreSQL function calls
- AggregationsView: Count and aggregate operations
- RelationshipsView: Joins and related data
### New Realtime Examples
- RealtimeExamplesView: Main navigation hub
- PostgresChangesView: Database change listeners
- TodoRealtimeView: Live todo updates
- BroadcastView: Real-time messaging
- PresenceView: Online user tracking
### Enhanced Profile Management
- ProfileView: Complete redesign with MFA integration, pull-to-refresh
- UpdateProfileView: Better UX with inline verification guidance
- ResetPasswordView: Step-by-step password reset flow
- UserIdentityList: Swipe-to-delete, provider icons, rich metadata
### New Database Schema
- Added comprehensive migration (20251009000000_examples_schema.sql)
- Tables: todos, profiles, messages with RLS policies
- PostgreSQL functions for RPC demonstrations
- Updated seed data for testing
### UX Improvements Applied Across All Views
- ✅ Inline CodeExample components showing exact API usage
- ✅ Educational "About" sections with use cases and tips
- ✅ Consistent loading states with descriptive messages
- ✅ Success/error feedback with clear next steps
- ✅ Pull-to-refresh, swipe actions, empty states
- ✅ ExampleRow navigation components with icons
- ✅ Modern iOS design patterns throughout
### Documentation
- Completely rewrote Examples/README.md
- Added comprehensive feature documentation
- Included setup instructions and troubleshooting
- Documented all new views and patterns
- Added learning resources and developer tips
## Technical Details
### New Reusable Components
- ExampleRow: Consistent navigation items
- CodeExample: Syntax-highlighted code snippets
- Improved ActionState usage across all views
### Patterns Established
- Consistent error handling with ErrorText
- Loading states with ProgressView
- Success confirmations in green
- Warning messages in orange
- Educational tooltips and guidance
### Files Changed
- 13 new files in Auth/
- 8 new files in Storage/
- 5 new files in Database/
- 5 new files in Realtime/
- 4 updated files in Profile/
- 1 new migration file
- Updated README.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat(examples): implement github source link
* docs: add link to example in readme
---------
Co-authored-by: Claude <[email protected]>1 parent f05a1bf commit 70e8c18
File tree
56 files changed
+6202
-516
lines changed- Examples
- Examples.xcodeproj
- Examples
- Auth
- Database
- Functions
- Profile
- Realtime
- Storage
- SlackClone
- UserManagement
- Sources/Storage
- supabase
- migrations
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
56 files changed
+6202
-516
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
45 | 55 | | |
46 | 56 | | |
47 | 57 | | |
48 | | - | |
| 58 | + | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| 63 | + | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
58 | 69 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 70 | | |
64 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
65 | 81 | | |
66 | | - | |
| 82 | + | |
67 | 83 | | |
68 | 84 | | |
69 | 85 | | |
| |||
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
76 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
77 | 95 | | |
78 | 96 | | |
79 | 97 | | |
| |||
87 | 105 | | |
88 | 106 | | |
89 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
90 | 134 | | |
| 135 | + | |
| 136 | + | |
91 | 137 | | |
92 | 138 | | |
93 | 139 | | |
| |||
0 commit comments