@mittwald/flow-react-components 1.2.0-next.7 → 1.2.0-next.8

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/MIGRATION.md CHANGED
@@ -417,6 +417,94 @@ npx @mittwald/flow-codemods@latest password-tools-subpath-renamed src
417
417
 
418
418
  ---
419
419
 
420
+ <a id="tabs-navigation-usage-to-tab-navigation"></a>
421
+
422
+ ## Tabs restyled; navigation usage moves to TabNavigation
423
+
424
+ **Since `0.2.0-alpha.977`** · migration · manual change · also applies to
425
+ `@mittwald/flow-remote-react-components`
426
+
427
+ `Tabs` restyled: the tab list now fills the available width with equal-size tabs
428
+ and a shared, animated indicator that slides between them, instead of the
429
+ previous fit-content tabs that each carried their own hover/pressed/selected
430
+ background. Nothing else about `Tabs` changed — same props, same panels, same
431
+ collapsing behavior. If `Tabs` switches content within a page, there is nothing
432
+ to do; the new look applies on upgrade.
433
+
434
+ **Real navigation has a proper home now.** React Aria's `Tab` (which `TabTitle`
435
+ extends) accepts the same routing props as a plain link — `href`, `target`,
436
+ `routerOptions`, … — so a `Tabs` could always double as a navigation control:
437
+ give a `TabTitle` an `href` and selecting it pushed a real route change while
438
+ the row still looked and behaved like tabs otherwise. That usage only reached
439
+ for `Tabs` because nothing else looked right for it. Now there is
440
+ `TabNavigation`, introduced in the same version specifically for this case — and
441
+ it keeps the visual language the old `Tabs` used to have.
442
+
443
+ ```diff
444
+ - <Tabs selectedKey={pathname}>
445
+ - <Tab id="/apps">
446
+ - <TabTitle href="/apps">Apps</TabTitle>
447
+ - </Tab>
448
+ - <Tab id="/container">
449
+ - <TabTitle href="/container">Container</TabTitle>
450
+ - </Tab>
451
+ - </Tabs>
452
+ + <TabNavigation aria-label="Projekt-Navigation">
453
+ + <Link href="/apps" aria-current={pathname === "/apps" ? "page" : undefined}>
454
+ + Apps
455
+ + </Link>
456
+ + <Link
457
+ + href="/container"
458
+ + aria-current={pathname === "/container" ? "page" : undefined}
459
+ + >
460
+ + Container
461
+ + </Link>
462
+ + </TabNavigation>
463
+ ```
464
+
465
+ #### What moves and what doesn't
466
+
467
+ **The children.** `Tab` / `TabTitle` / the panel disappear; `TabNavigation`
468
+ takes plain `Link` children directly. There is no panel, because the destination
469
+ page's content lives on that route, not inside the component.
470
+
471
+ **The active state.** `selectedKey` / `defaultSelectedKey` / `onSelectionChange`
472
+ have no counterpart — `TabNavigation` does not track selection itself. Each
473
+ `Link` marks itself current with `aria-current="page"`, which the app's router
474
+ already knows how to derive (e.g. from the current pathname), the same way it
475
+ would for any other navigation link.
476
+
477
+ **Status icons.** An `AlertIcon` moves from inside `TabTitle` to inside the
478
+ `Link`.
479
+
480
+ **Collapsing.** The two do this differently. `Tabs` collapses all at once: as
481
+ soon as any tab stops fitting, the whole tab list turns into a single button
482
+ showing the active tab, which opens every tab in a context menu. `TabNavigation`
483
+ collapses incrementally: links are hidden one by one as space runs out, and only
484
+ those that no longer fit move into the "More" button's menu — the rest stay
485
+ visible as ordinary links.
486
+
487
+ There is no codemod: only the surrounding code knows whether a given `Tabs`
488
+ usage was real navigation (an `href` on `TabTitle`, or a route push from
489
+ `onSelectionChange`) or a genuine content switcher that merely looked similar
490
+ before this change — the two are indistinguishable from the source alone.
491
+
492
+ **Apply:** Tabs' rendering changed: the tab list now fills the available width
493
+ with equal-size tabs and a shared, animated indicator that slides between them,
494
+ replacing the previous fit-content tabs that each carried their own
495
+ hover/pressed/selected background. Nothing else about `Tabs` changed, and a
496
+ `Tabs` that switches content within a page needs no code change — the new look
497
+ applies on upgrade. Where `Tabs` was used to fake real navigation instead — a
498
+ `TabTitle` given an `href` (`Aria.Tab`'s routing props: `href`, `target`,
499
+ `routerOptions`, …) so selecting it pushed a real route change — replace it with
500
+ `TabNavigation`: plain `Link` children instead of `Tab`/`TabTitle`/panels,
501
+ `aria-current="page"` on the active `Link` instead of
502
+ `selectedKey`/`defaultSelectedKey`/`onSelectionChange`. `TabNavigation` keeps
503
+ the visual language the old `Tabs` used to have, because it now owns that use
504
+ case.
505
+
506
+ ---
507
+
420
508
  <a id="table-column-width-props"></a>
421
509
 
422
510
  ## TableColumn: `maxWidth` removed, `width` and `minWidth` retyped