@digital-realty/ui-knowledgebase 0.1.5 → 0.1.6

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.
Files changed (2) hide show
  1. package/README.md +17 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -492,19 +492,34 @@ _Note: the search input appears on the landing hero and on the category/topic pa
492
492
  component, different scope). Result navigation target (`/details/:uid`) is an assumption
493
493
  pending final PO confirmation — trivially switchable since the component builds the href._
494
494
 
495
- ### KB-17 · `kb-back-button`
495
+ ### KB-17 · `kb-back-btn`
496
496
 
497
497
  **Type:** Story
498
498
 
499
499
  ![KB-17 back button](docs/KB-17-back-button.png)
500
500
 
501
501
  **Summary**
502
- The "← BACK" control shown top-left on the category, topic, and any nested page.
502
+ The "← BACK" control shown top-left on the category, topic, and details pages.
503
503
 
504
504
  **Renders:** a back arrow + "BACK" label; navigates to the previous route (history back, falling back to the KB landing).
505
505
 
506
506
  **Dependencies:** none (pure navigation).
507
507
 
508
+ **Implemented:** `src/components/kb-back-btn.ts` wraps `<ix-button appearance="text" has-icon>`
509
+ with `<md-icon slot="icon">arrow_back</md-icon>` + a "BACK" label — ix-button owns the styling
510
+ and icon (mirrors `ui-service-management`'s `sm-back-button`). The navigation lives in
511
+ `src/routes/kb-nav-history.ts`: **if the previous page is a KB route, `history.back()`;
512
+ otherwise go to the KB landing** — so arriving from an external site or another MFE (e.g.
513
+ google.com or the launchpad `/`) and pressing back lands on the KB home rather than leaving the
514
+ MFE. Since the History API can't reveal previous entries' URLs, it keeps a small in-session
515
+ stack fed by the router's `vaadin-router-location-changed` events (self-reconciling on
516
+ back/forward); tracking starts when the first back button mounts, so the stack begins at the KB
517
+ page the user first landed on. Wired into the category, topic, and details views (replacing the
518
+ stub back-link). Vitest covers the three journeys (external→landing, non-KB-previous→landing,
519
+ KB-previous→history.back) plus stack reconciliation; the ix-button chrome is verified in
520
+ Storybook (the wrapper itself isn't unit-tested because ix-button is externalized, not
521
+ installed in this package).
522
+
508
523
  ### KB-18 · `kb-category-nav`
509
524
 
510
525
  **Type:** Story
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-realty/ui-knowledgebase",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"