|
16 | 16 | * action (spec 17 retired `action.bulkEnabled` as a tombstone). Both |
17 | 17 | * names used to dispatch as `{ type: '<name>' }` and never run; the |
18 | 18 | * buttons also carried none of the def's label / icon / params. |
19 | | - * 2. `legacy_only_handler` resolves to no declared action and stays a |
20 | | - * by-name dispatch — it must still render ALONGSIDE the two defs above. |
| 19 | + * 2. `not_declared` names no action the object declares, so the bar draws |
| 20 | + * NO button for it (the spec: a bare name "names an action the object |
| 21 | + * declares"), and the browser console logs one warning naming it. An |
| 22 | + * action a disabled package withholds reads the same way: it leaves the |
| 23 | + * served object, so its name draws nothing (objectstack#30169). |
21 | 24 | * 3. Record `t3` fails server-side (422), proving per-record attribution: the |
22 | 25 | * result panel reports 4/5 with an error row rather than a blanket success. |
23 | 26 | * 4. Rich `bulkActionDefs` with picker params (#3064 / ADR-0059): `Set |
@@ -237,8 +240,9 @@ const schema: any = { |
237 | 240 | { field: 'progress', label: 'Progress' }, |
238 | 241 | ], |
239 | 242 | pagination: { pageSize: 50 }, |
240 | | - // Bare names: two resolve to declared actions, one doesn't. |
241 | | - bulkActions: ['bulk_mark_done', 'bulk_recalc_estimate', 'legacy_only_handler'], |
| 243 | + // Bare names: two resolve to declared actions; `not_declared` names nothing |
| 244 | + // the object declares, so it draws no button and warns once in the console. |
| 245 | + bulkActions: ['bulk_mark_done', 'bulk_recalc_estimate', 'not_declared'], |
242 | 246 | // Rich defs with picker params — the shared-field-widget surface (#3064). |
243 | 247 | bulkActionDefs: [ |
244 | 248 | // Aggregate mode (#3139): names the declared action, ONE dispatch for the |
@@ -285,8 +289,9 @@ function Demo() { |
285 | 289 | Select rows → the bar shows <b>Mark Done</b> and <b>Recalculate Estimate</b> (names |
286 | 290 | from the view's <code>bulkActions</code>, promoted to their declared object |
287 | 291 | actions), <b>Export Zip</b> (an <code>execution: 'aggregate'</code> def — |
288 | | - ONE dispatch carrying every selected id, #3139) and <b>Legacy Only |
289 | | - Handler</b> (unresolvable, dispatched by name). |
| 292 | + ONE dispatch carrying every selected id, #3139). The view also names{' '} |
| 293 | + <code>not_declared</code>, which the object does not declare: no button, and one |
| 294 | + warning in the browser console. |
290 | 295 | </p> |
291 | 296 | </header> |
292 | 297 |
|
@@ -324,16 +329,7 @@ function Demo() { |
324 | 329 |
|
325 | 330 | createRoot(document.getElementById('root')!).render( |
326 | 331 | <I18nProvider resources={{ en }} language="en"> |
327 | | - {/* A handler registered under a bare NAME — the compat path that legacy |
328 | | - `bulkActions` entries must keep working for. */} |
329 | | - <ActionProvider |
330 | | - handlers={{ |
331 | | - legacy_only_handler: async () => { |
332 | | - pushLog({ url: '(runner handler)', recordId: 'all-selected', params: '{}', status: 200 }); |
333 | | - return { success: true }; |
334 | | - }, |
335 | | - }} |
336 | | - > |
| 332 | + <ActionProvider> |
337 | 333 | <Demo /> |
338 | 334 | </ActionProvider> |
339 | 335 | </I18nProvider>, |
|
0 commit comments