@schandlergarcia/sf-web-components 1.9.56 → 1.9.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.57] - 2026-04-01
9
+
10
+ ### Fixed
11
+ - **src/templates/pages/Home.tsx.template** - Restored "Browse All Accounts" button
12
+ - Issue: v1.9.56 removed the Browse All button thinking it was broken
13
+ - Reality: The postinstall routes.tsx.template DOES have /accounts route (pointing to __examples__/AccountSearch)
14
+ - The button should exist and work correctly after postinstall
15
+ - Changed title from "Search" to "Account Search"
16
+ - Changed button text from "Browse All" to "Browse All Accounts"
17
+ - Now matches the __examples__/pages/Home.tsx reference implementation
18
+
19
+ - **scripts/reset-command-center.sh** - Added /accounts route to reset
20
+ - Issue: Reset routes.tsx didn't include /accounts route, causing Browse All button → 404
21
+ - Solution: Updated reset routes.tsx to match postinstall routes.tsx.template
22
+ - Now includes routes for: Home (→ __examples__/Home), /accounts (→ __examples__/AccountSearch), /accounts/:recordId (→ __examples__/AccountObjectDetailPage)
23
+ - Also updated reset Home.tsx template to restore Browse All button (even though routes points to __examples__/Home)
24
+
25
+ ### Context
26
+ The correct architecture (matching react5 and postinstall):
27
+ - Home route points to `features/object-search/__examples__/pages/Home.tsx` (has Browse All button)
28
+ - /accounts route points to `features/object-search/__examples__/pages/AccountSearch.tsx` (account list page)
29
+ - /accounts/:recordId route points to `features/object-search/__examples__/pages/AccountObjectDetailPage.tsx` (detail page)
30
+ - All use shadcn Button/Input (correct for outer app context)
31
+
8
32
  ## [1.9.56] - 2026-04-01
9
33
 
10
34
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.56",
3
+ "version": "1.9.57",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -163,7 +163,9 @@ export default function HomePage() {
163
163
  const handleSearch = () => {
164
164
  const trimmed = searchQuery.trim();
165
165
  if (trimmed) {
166
- navigate(`/search?q=${encodeURIComponent(trimmed)}`);
166
+ navigate(`/accounts?search=${encodeURIComponent(trimmed)}`);
167
+ } else {
168
+ navigate('/accounts');
167
169
  }
168
170
  };
169
171
 
@@ -178,8 +180,8 @@ export default function HomePage() {
178
180
  <div className="flex min-h-[80vh] items-center justify-center px-4 sm:px-6 lg:px-8 bg-slate-50 dark:bg-slate-950 transition-colors">
179
181
  <div className="w-full max-w-4xl">
180
182
  <div className="text-center mb-8">
181
- <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
182
- <p className="text-lg text-slate-600 dark:text-slate-300">Find records across your organization.</p>
183
+ <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Account Search</h1>
184
+ <p className="text-lg text-slate-600 dark:text-slate-300">Search by name, phone, or industry.</p>
183
185
  </div>
184
186
  <div className="flex flex-col gap-4">
185
187
  <div className="relative">
@@ -197,6 +199,9 @@ export default function HomePage() {
197
199
  <Button onClick={handleSearch}>
198
200
  Search
199
201
  </Button>
202
+ <Button onClick={() => navigate('/accounts')} variant="outline">
203
+ Browse All Accounts
204
+ </Button>
200
205
  </div>
201
206
  </div>
202
207
  </div>
@@ -245,40 +250,35 @@ echo "→ Updating ${ROUTES}..."
245
250
 
246
251
  cat > "$ROUTES" << 'ROUTES_EOF'
247
252
  import type { RouteObject } from 'react-router';
248
- import { lazy, Suspense } from "react";
249
-
250
- const AppLayout = lazy(() => import('./appLayout'));
251
- const Home = lazy(() => import('./pages/Home'));
252
- const Search = lazy(() => import('./pages/Search'));
253
- const NotFound = lazy(() => import('./pages/NotFound'));
254
-
255
- function SuspenseWrap({ children }: { children: React.ReactNode }) {
256
- return <Suspense fallback={<div className="flex min-h-screen items-center justify-center text-sm text-muted-foreground">Loading...</div>}>{children}</Suspense>;
257
- }
253
+ import AppLayout from './appLayout';
254
+ import Home from './features/object-search/__examples__/pages/Home';
255
+ import AccountSearch from './features/object-search/__examples__/pages/AccountSearch';
256
+ import AccountObjectDetailPage from './features/object-search/__examples__/pages/AccountObjectDetailPage';
257
+ import NotFound from './pages/NotFound';
258
258
 
259
259
  export const routes: RouteObject[] = [
260
260
  {
261
261
  path: "/",
262
- element: (
263
- <SuspenseWrap>
264
- <AppLayout />
265
- </SuspenseWrap>
266
- ),
262
+ element: <AppLayout />,
267
263
  children: [
268
264
  {
269
265
  index: true,
270
- element: <SuspenseWrap><Home /></SuspenseWrap>,
271
- handle: { showInNavigation: true, showNavBar: true, label: 'Home' }
266
+ element: <Home />,
267
+ handle: { showInNavigation: true, label: "Home" }
272
268
  },
273
269
  {
274
- path: "search",
275
- element: <SuspenseWrap><Search /></SuspenseWrap>,
276
- handle: { showInNavigation: true, showNavBar: true, label: 'Search' }
270
+ path: 'accounts',
271
+ element: <AccountSearch />,
272
+ handle: { showInNavigation: true, label: "Accounts" }
277
273
  },
278
274
  {
279
- path: '*',
280
- element: <SuspenseWrap><NotFound /></SuspenseWrap>
275
+ path: 'accounts/:recordId',
276
+ element: <AccountObjectDetailPage />
281
277
  },
278
+ {
279
+ path: '*',
280
+ element: <NotFound />
281
+ }
282
282
  ]
283
283
  }
284
284
  ];
@@ -28,8 +28,8 @@ export default function HomePage() {
28
28
  <div className="flex min-h-[80vh] items-center justify-center px-4 sm:px-6 lg:px-8 bg-slate-50 dark:bg-slate-950 transition-colors">
29
29
  <div className="w-full max-w-4xl">
30
30
  <div className="text-center mb-8">
31
- <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
32
- <p className="text-lg text-slate-600 dark:text-slate-300">Find records across your organization.</p>
31
+ <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Account Search</h1>
32
+ <p className="text-lg text-slate-600 dark:text-slate-300">Search by name, phone, or industry.</p>
33
33
  </div>
34
34
  <div className="flex flex-col gap-4">
35
35
  <div className="relative">
@@ -48,7 +48,7 @@ export default function HomePage() {
48
48
  Search
49
49
  </Button>
50
50
  <Button onClick={() => navigate('/accounts')} variant="outline">
51
- Browse All
51
+ Browse All Accounts
52
52
  </Button>
53
53
  </div>
54
54
  </div>