@salesforcedevs/docs-components 1.34.3-style-fix-alpha1 → 1.34.3-style-fix-alpha2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.34.3-style-fix-alpha1",
3
+ "version": "1.34.3-style-fix-alpha2",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -20,9 +20,9 @@ const TOPIC_TYPE_SPEC = "spec";
20
20
  * Translates per-topic `topicType` into the generic `showForwardArrow` flag
21
21
  * that `dx-tree-tile` reads (spec topics get the forward arrow icon for Redoc).
22
22
  *
23
- * Content-less parents are left without a link. The tree treats them as
24
- * parent-only sections and selects the first markdown descendant. Copying that
25
- * child's href onto the parent makes the parent win selection.
23
+ * Content-less parents are flagged with redirectToChild and left without a
24
+ * link. The tree selects the first markdown descendant. Copying that child's
25
+ * href onto the parent makes the parent win selection.
26
26
  */
27
27
  function decorateTopicsWithForwardArrow(
28
28
  topics:
@@ -44,6 +44,12 @@ function decorateTopicsWithForwardArrow(
44
44
  );
45
45
  }
46
46
 
47
+ // Flag a parent with no page of its own. Leave its link empty so the
48
+ // child's URL stays indexed to the child.
49
+ if (!!decorated.children?.length && !decorated.link?.href) {
50
+ decorated.redirectToChild = true;
51
+ }
52
+
47
53
  return decorated;
48
54
  });
49
55
  }