Commit 6bc4fe4
committed
feat(Map): add top-level autoExpandOnCarouselClick prop for better DX
Promotes autoExpandOnCarouselClick to a top-level Map prop for improved
discoverability and cleaner API.
Better Developer Experience:
Before (nested):
<Map compactMapProps={{ autoExpandOnCarouselClick: true }} />
After (top-level):
<Map autoExpandOnCarouselClick={true} />
Benefits:
- More discoverable (shows in autocomplete immediately)
- Simpler API (no nested objects for common features)
- Intuitive (primary interactions should be top-level)
- Consistent (matches other boolean flags like showPopup, loading, error)
Implementation:
- Added autoExpandOnCarouselClick to MapProps interface with JSDoc
- Default: false (backward compatible)
- Passes directly to CompactMap (not via compactMapProps)
- Excluded from compactMapProps type to prevent duplication
Documentation:
- Updated Maps story Advanced Features section
- Added code example showing top-level usage
- Clarified this is a Map component feature (requires orchestrator)1 parent f6959f0 commit 6bc4fe4
2 files changed
+36
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
20 | | - | |
| 28 | + | |
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
| |||
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| 73 | + | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| |||
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
132 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
133 | 147 | | |
134 | 148 | | |
135 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
988 | | - | |
989 | | - | |
990 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
991 | 991 | | |
992 | | - | |
| 992 | + | |
993 | 993 | | |
994 | 994 | | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
995 | 1011 | | |
996 | 1012 | | |
997 | 1013 | | |
| |||
0 commit comments