@schandlergarcia/sf-web-components 1.9.55 → 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,48 @@ 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
+
32
+ ## [1.9.56] - 2026-04-01
33
+
34
+ ### Fixed
35
+ - **scripts/reset-command-center.sh** - Fixed reset script creating broken Home.tsx
36
+ - Issue 1: Home.tsx template used UIButton/UIInput (command center components) instead of shadcn Button/Input (outer app components)
37
+ - Issue 2: Home.tsx "Browse All" button navigated to `/accounts` route that doesn't exist after reset → 404
38
+ - Issue 3: Search button navigated to `/accounts` instead of `/search`
39
+ - Solution: Updated Home.tsx template in reset script to:
40
+ - Use shadcn `Button`/`Input` from `@/components/ui/` (correct for outer app context)
41
+ - Removed "Browse All" button (baseline state = no accounts feature)
42
+ - Changed search to navigate to `/search?q=...` instead of `/accounts`
43
+ - Now reset creates a working baseline app with no 404 errors
44
+
45
+ ### Context
46
+ The reset script creates a baseline app state (Home search page + Search page + BlankDashboard). The routes.tsx reset only includes `/` (Home) and `/search` (Search) - no `/accounts` route. But Home.tsx was trying to navigate to `/accounts`, causing 404.
47
+
48
+ The postinstall routes.tsx.template DOES include `/accounts` route (pointing to __examples__/AccountSearch), but the reset script deliberately overwrites this with a simpler baseline that doesn't include accounts functionality.
49
+
8
50
  ## [1.9.55] - 2026-04-01
9
51
 
10
52
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.9.55",
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",
@@ -152,8 +152,8 @@ echo "→ Restoring ${HOME} from template..."
152
152
  cat > "$HOME" << 'HOME_EOF'
153
153
  import { useState } from "react";
154
154
  import { useNavigate } from "react-router";
155
- import UIInput from '@/components/library/ui/UIInput';
156
- import UIButton from '@/components/library/ui/UIButton';
155
+ import { Input } from "@/components/ui/input";
156
+ import { Button } from "@/components/ui/button";
157
157
  import { Search } from "lucide-react";
158
158
 
159
159
  export default function HomePage() {
@@ -180,13 +180,13 @@ export default function HomePage() {
180
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">
181
181
  <div className="w-full max-w-4xl">
182
182
  <div className="text-center mb-8">
183
- <h1 className="text-4xl font-bold text-slate-900 dark:text-slate-50 mb-4">Search</h1>
184
- <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>
185
185
  </div>
186
186
  <div className="flex flex-col gap-4">
187
187
  <div className="relative">
188
188
  <Search className="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-slate-400" />
189
- <UIInput
189
+ <Input
190
190
  type="text"
191
191
  value={searchQuery}
192
192
  onChange={(e) => setSearchQuery(e.target.value)}
@@ -196,12 +196,12 @@ export default function HomePage() {
196
196
  />
197
197
  </div>
198
198
  <div className="flex gap-3 justify-center">
199
- <UIButton onClick={handleSearch} variant="primary">
199
+ <Button onClick={handleSearch}>
200
200
  Search
201
- </UIButton>
202
- <UIButton onClick={() => navigate('/accounts')} variant="secondary">
203
- Browse All
204
- </UIButton>
201
+ </Button>
202
+ <Button onClick={() => navigate('/accounts')} variant="outline">
203
+ Browse All Accounts
204
+ </Button>
205
205
  </div>
206
206
  </div>
207
207
  </div>
@@ -250,40 +250,35 @@ echo "→ Updating ${ROUTES}..."
250
250
 
251
251
  cat > "$ROUTES" << 'ROUTES_EOF'
252
252
  import type { RouteObject } from 'react-router';
253
- import { lazy, Suspense } from "react";
254
-
255
- const AppLayout = lazy(() => import('./appLayout'));
256
- const Home = lazy(() => import('./pages/Home'));
257
- const Search = lazy(() => import('./pages/Search'));
258
- const NotFound = lazy(() => import('./pages/NotFound'));
259
-
260
- function SuspenseWrap({ children }: { children: React.ReactNode }) {
261
- return <Suspense fallback={<div className="flex min-h-screen items-center justify-center text-sm text-muted-foreground">Loading...</div>}>{children}</Suspense>;
262
- }
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';
263
258
 
264
259
  export const routes: RouteObject[] = [
265
260
  {
266
261
  path: "/",
267
- element: (
268
- <SuspenseWrap>
269
- <AppLayout />
270
- </SuspenseWrap>
271
- ),
262
+ element: <AppLayout />,
272
263
  children: [
273
264
  {
274
265
  index: true,
275
- element: <SuspenseWrap><Home /></SuspenseWrap>,
276
- handle: { showInNavigation: true, showNavBar: true, label: 'Home' }
266
+ element: <Home />,
267
+ handle: { showInNavigation: true, label: "Home" }
277
268
  },
278
269
  {
279
- path: "search",
280
- element: <SuspenseWrap><Search /></SuspenseWrap>,
281
- handle: { showInNavigation: true, showNavBar: true, label: 'Search' }
270
+ path: 'accounts',
271
+ element: <AccountSearch />,
272
+ handle: { showInNavigation: true, label: "Accounts" }
282
273
  },
283
274
  {
284
- path: '*',
285
- element: <SuspenseWrap><NotFound /></SuspenseWrap>
275
+ path: 'accounts/:recordId',
276
+ element: <AccountObjectDetailPage />
286
277
  },
278
+ {
279
+ path: '*',
280
+ element: <NotFound />
281
+ }
287
282
  ]
288
283
  }
289
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>