@allurereport/web-awesome 3.8.1 → 3.9.0

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 (207) hide show
  1. package/README.md +112 -0
  2. package/allurerc-dev.mjs +10 -0
  3. package/dist/multi/121.app-d36b0855e3e7a53eeee9.js +1 -0
  4. package/dist/multi/173.app-d36b0855e3e7a53eeee9.js +1 -0
  5. package/dist/multi/174.app-d36b0855e3e7a53eeee9.js +1 -0
  6. package/dist/multi/252.app-d36b0855e3e7a53eeee9.js +1 -0
  7. package/dist/multi/282.app-d36b0855e3e7a53eeee9.js +1 -0
  8. package/dist/multi/29.app-d36b0855e3e7a53eeee9.js +1 -0
  9. package/dist/multi/310.app-d36b0855e3e7a53eeee9.js +1 -0
  10. package/dist/multi/{416.app-200938be3feda27d7b80.js → 416.app-d36b0855e3e7a53eeee9.js} +1 -1
  11. package/dist/multi/{507.app-200938be3feda27d7b80.js → 507.app-d36b0855e3e7a53eeee9.js} +1 -1
  12. package/dist/multi/527.app-d36b0855e3e7a53eeee9.js +1 -0
  13. package/dist/multi/600.app-d36b0855e3e7a53eeee9.js +1 -0
  14. package/dist/multi/605.app-d36b0855e3e7a53eeee9.js +1 -0
  15. package/dist/multi/638.app-d36b0855e3e7a53eeee9.js +1 -0
  16. package/dist/multi/672.app-d36b0855e3e7a53eeee9.js +1 -0
  17. package/dist/multi/686.app-d36b0855e3e7a53eeee9.js +1 -0
  18. package/dist/multi/725.app-d36b0855e3e7a53eeee9.js +1 -0
  19. package/dist/multi/741.app-d36b0855e3e7a53eeee9.js +1 -0
  20. package/dist/multi/749.app-d36b0855e3e7a53eeee9.js +1 -0
  21. package/dist/multi/755.app-d36b0855e3e7a53eeee9.js +1 -0
  22. package/dist/multi/779.app-d36b0855e3e7a53eeee9.js +1 -0
  23. package/dist/multi/{894.app-200938be3feda27d7b80.js → 894.app-d36b0855e3e7a53eeee9.js} +1 -1
  24. package/dist/multi/943.app-d36b0855e3e7a53eeee9.js +1 -0
  25. package/dist/multi/980.app-d36b0855e3e7a53eeee9.js +1 -0
  26. package/dist/multi/app-d36b0855e3e7a53eeee9.js +2 -0
  27. package/dist/multi/manifest.json +26 -23
  28. package/dist/multi/styles-212da6c68fa0beb4c6c5.css +1 -0
  29. package/dist/multi/styles-468416ffee9a9dea6cae.css +58 -0
  30. package/dist/multi/styles-5c882b14b6f3112e40c4.css +1 -0
  31. package/dist/single/app-62171f5f51b5954a787c.js +2 -0
  32. package/dist/single/manifest.json +1 -1
  33. package/package.json +13 -8
  34. package/src/assets/scss/_common.scss +2 -2
  35. package/src/assets/scss/index.scss +8 -6
  36. package/src/components/BaseLayout/index.tsx +14 -2
  37. package/src/components/BaseLayout/styles.scss +5 -5
  38. package/src/components/Categories/CategoryHeaderItem/styles.scss +2 -2
  39. package/src/components/Categories/CategoryTreeItem/styles.scss +2 -2
  40. package/src/components/Categories/GroupTreeItem/styles.scss +4 -5
  41. package/src/components/Categories/HistoryTreeItem/styles.scss +2 -2
  42. package/src/components/Categories/LabelTreeItem/styles.scss +2 -2
  43. package/src/components/Categories/MessageTreeItem/index.tsx +1 -1
  44. package/src/components/Categories/MessageTreeItem/styles.scss +18 -18
  45. package/src/components/Categories/sticky.ts +1 -1
  46. package/src/components/Footer/styles.scss +2 -2
  47. package/src/components/Header/CiInfo/styles.scss +1 -1
  48. package/src/components/Header/styles.scss +2 -2
  49. package/src/components/HotkeysProvider/index.tsx +556 -0
  50. package/src/components/KeyboardShortcuts/index.tsx +73 -0
  51. package/src/components/KeyboardShortcuts/shortcutsConfig.ts +91 -0
  52. package/src/components/KeyboardShortcuts/styles.scss +69 -0
  53. package/src/components/MainReport/index.tsx +89 -72
  54. package/src/components/MainReport/styles.scss +40 -4
  55. package/src/components/Metadata/styles.scss +9 -9
  56. package/src/components/MetadataButton/index.tsx +2 -0
  57. package/src/components/MetadataButton/styles.scss +1 -1
  58. package/src/components/NavTabs/styles.scss +8 -8
  59. package/src/components/ReportBody/index.tsx +11 -2
  60. package/src/components/ReportBody/styles.scss +24 -4
  61. package/src/components/ReportCategories/styles.scss +1 -1
  62. package/src/components/ReportFilters/styles.scss +1 -1
  63. package/src/components/ReportGlobalAttachments/styles.scss +1 -1
  64. package/src/components/ReportGlobalErrors/styles.scss +1 -1
  65. package/src/components/ReportHeader/styles.scss +2 -2
  66. package/src/components/ReportMetadata/index.tsx +9 -11
  67. package/src/components/ReportMetadata/styles.scss +6 -6
  68. package/src/components/ReportQualityGateResults/styles.scss +2 -2
  69. package/src/components/ReportSearch/index.tsx +1 -5
  70. package/src/components/ReportTabs/styles.scss +9 -9
  71. package/src/components/SectionSwitcher/index.tsx +87 -10
  72. package/src/components/SideBySide/index.tsx +20 -2
  73. package/src/components/SideBySide/styles.scss +9 -1
  74. package/src/components/SplitLayout/index.tsx +10 -1
  75. package/src/components/SplitLayout/styles.scss +20 -4
  76. package/src/components/TestResult/TestStepsEmpty/styles.scss +1 -1
  77. package/src/components/TestResult/TrDescription/styles.scss +1 -1
  78. package/src/components/TestResult/TrDropdown/index.tsx +2 -2
  79. package/src/components/TestResult/TrDropdown/styles.scss +1 -1
  80. package/src/components/TestResult/TrEmpty/styles.scss +1 -1
  81. package/src/components/TestResult/TrEnvironmentItem/styles.scss +4 -4
  82. package/src/components/TestResult/TrError/index.tsx +32 -7
  83. package/src/components/TestResult/TrError/styles.scss +23 -23
  84. package/src/components/TestResult/TrHeader/styles.scss +2 -2
  85. package/src/components/TestResult/TrHistory/styles.scss +6 -6
  86. package/src/components/TestResult/TrInfo/styles.scss +8 -8
  87. package/src/components/TestResult/TrLinks/index.tsx +2 -2
  88. package/src/components/TestResult/TrLinks/styles.scss +2 -2
  89. package/src/components/TestResult/TrMetadata/index.tsx +1 -1
  90. package/src/components/TestResult/TrMetadata/styles.scss +1 -1
  91. package/src/components/TestResult/TrNavigation/index.tsx +1 -1
  92. package/src/components/TestResult/TrNavigation/styles.scss +2 -2
  93. package/src/components/TestResult/TrOverview.tsx +2 -0
  94. package/src/components/TestResult/TrParameters/index.tsx +1 -1
  95. package/src/components/TestResult/TrParameters/styles.scss +1 -1
  96. package/src/components/TestResult/TrPrevStatuses/styles.scss +8 -8
  97. package/src/components/TestResult/TrPwTraces/openPwTraceInNewTab.ts +2 -2
  98. package/src/components/TestResult/TrPwTraces/styles.scss +1 -1
  99. package/src/components/TestResult/TrRetriesView/styles.scss +3 -3
  100. package/src/components/TestResult/TrSetup/index.tsx +9 -3
  101. package/src/components/TestResult/TrSeverity/styles.scss +7 -7
  102. package/src/components/TestResult/TrStatus/styles.scss +2 -35
  103. package/src/components/TestResult/TrSteps/TrAttachment.tsx +79 -43
  104. package/src/components/TestResult/TrSteps/TrAttachmentInfo.tsx +44 -17
  105. package/src/components/TestResult/TrSteps/TrErrorStep.tsx +3 -0
  106. package/src/components/TestResult/TrSteps/TrStep.tsx +9 -4
  107. package/src/components/TestResult/TrSteps/TrStepHeader.tsx +8 -5
  108. package/src/components/TestResult/TrSteps/index.tsx +7 -4
  109. package/src/components/TestResult/TrSteps/stepTreeExpansion.ts +27 -9
  110. package/src/components/TestResult/TrSteps/styles.scss +80 -20
  111. package/src/components/TestResult/TrTeardown/index.tsx +9 -3
  112. package/src/components/TestResult/bodyItems.ts +1 -1
  113. package/src/components/TestResult/index.tsx +8 -2
  114. package/src/components/TestResult/styles.scss +10 -1
  115. package/src/components/TestResult/trOverviewFocus.scss +4 -0
  116. package/src/components/Timeline/styles.scss +6 -6
  117. package/src/components/Tree/index.tsx +54 -5
  118. package/src/components/Tree/styles.scss +55 -35
  119. package/src/hooks/useTestResultOverviewFocusScroll.ts +23 -0
  120. package/src/index.html +30 -33
  121. package/src/index.tsx +12 -6
  122. package/src/locales/ar.json +61 -1
  123. package/src/locales/az.json +61 -1
  124. package/src/locales/de.json +61 -1
  125. package/src/locales/en.json +61 -1
  126. package/src/locales/es.json +61 -1
  127. package/src/locales/fr.json +61 -1
  128. package/src/locales/he.json +61 -1
  129. package/src/locales/hy.json +61 -1
  130. package/src/locales/it.json +61 -1
  131. package/src/locales/ja.json +61 -1
  132. package/src/locales/ka.json +61 -1
  133. package/src/locales/kr.json +61 -1
  134. package/src/locales/nl.json +61 -1
  135. package/src/locales/pl.json +61 -1
  136. package/src/locales/pt.json +61 -1
  137. package/src/locales/ru.json +61 -1
  138. package/src/locales/sv.json +61 -1
  139. package/src/locales/tr.json +61 -1
  140. package/src/locales/uk.json +61 -1
  141. package/src/locales/zh-TW.json +61 -1
  142. package/src/locales/zh.json +61 -1
  143. package/src/stores/keyboard.ts +371 -0
  144. package/src/stores/keyboardActions.ts +769 -0
  145. package/src/stores/locale.ts +1 -0
  146. package/src/stores/reportEnvSections.ts +6 -0
  147. package/src/stores/reportRootTabs.ts +95 -0
  148. package/src/stores/search.ts +147 -0
  149. package/src/stores/testResultOverviewNav.ts +119 -0
  150. package/src/stores/testResultTabs.ts +62 -0
  151. package/src/stores/timeline.ts +1 -1
  152. package/src/stores/tree.ts +42 -4
  153. package/src/stores/treeFilters/store.ts +3 -36
  154. package/src/styles/_pane-active.scss +8 -0
  155. package/src/styles.scss +1 -1
  156. package/src/utils/flattenTestResultOverview.ts +182 -0
  157. package/src/utils/trOverviewFocus.ts +18 -0
  158. package/test/components/EnvironmentPicker.test.tsx +21 -3
  159. package/test/components/Header/CiInfo.test.tsx +8 -0
  160. package/test/components/Header.test.tsx +8 -0
  161. package/test/components/ReportGlobals.test.tsx +9 -1
  162. package/test/components/TestResult/PwTraceButton.test.tsx +8 -0
  163. package/test/components/TestResult/TrErrorStep.test.tsx +8 -0
  164. package/test/components/TestResult/TrOverview.test.tsx +30 -10
  165. package/test/components/TestResult/TrSteps.test.tsx +73 -0
  166. package/test/components/TestResult/bodyItems.test.ts +9 -1
  167. package/test/components/TestResult/openPwTraceInNewTab.test.ts +8 -0
  168. package/test/components/TestResult/stepTreeExpansion.test.ts +10 -2
  169. package/test/components/Timeline.test.tsx +15 -7
  170. package/test/stores/keyboard/keyboardActions.test.ts +615 -0
  171. package/test/stores/search.test.ts +143 -0
  172. package/test/stores/treeFilters/actions.test.ts +8 -0
  173. package/test/utils/flattenTestResultOverview.test.ts +57 -0
  174. package/test/utils/ownerAddress.test.ts +9 -1
  175. package/test/utils/treeFilters.test.ts +9 -1
  176. package/types.d.ts +17 -0
  177. package/webpack.config.js +3 -0
  178. package/CONTRIBUTING.md +0 -34
  179. package/dist/multi/173.app-200938be3feda27d7b80.js +0 -1
  180. package/dist/multi/174.app-200938be3feda27d7b80.js +0 -1
  181. package/dist/multi/252.app-200938be3feda27d7b80.js +0 -1
  182. package/dist/multi/282.app-200938be3feda27d7b80.js +0 -1
  183. package/dist/multi/29.app-200938be3feda27d7b80.js +0 -1
  184. package/dist/multi/310.app-200938be3feda27d7b80.js +0 -1
  185. package/dist/multi/527.app-200938be3feda27d7b80.js +0 -1
  186. package/dist/multi/600.app-200938be3feda27d7b80.js +0 -1
  187. package/dist/multi/605.app-200938be3feda27d7b80.js +0 -1
  188. package/dist/multi/638.app-200938be3feda27d7b80.js +0 -1
  189. package/dist/multi/672.app-200938be3feda27d7b80.js +0 -1
  190. package/dist/multi/686.app-200938be3feda27d7b80.js +0 -1
  191. package/dist/multi/725.app-200938be3feda27d7b80.js +0 -1
  192. package/dist/multi/741.app-200938be3feda27d7b80.js +0 -1
  193. package/dist/multi/749.app-200938be3feda27d7b80.js +0 -1
  194. package/dist/multi/755.app-200938be3feda27d7b80.js +0 -1
  195. package/dist/multi/943.app-200938be3feda27d7b80.js +0 -1
  196. package/dist/multi/980.app-200938be3feda27d7b80.js +0 -1
  197. package/dist/multi/app-200938be3feda27d7b80.js +0 -2
  198. package/dist/multi/styles-9f7a23a0c8b79fa76981.css +0 -58
  199. package/dist/single/app-17629d1b119f6c611d49.js +0 -2
  200. package/src/assets/scss/day.scss +0 -53
  201. package/src/assets/scss/fonts.scss +0 -3
  202. package/src/assets/scss/night.scss +0 -63
  203. package/src/assets/scss/palette.scss +0 -393
  204. package/src/assets/scss/theme.scss +0 -330
  205. package/src/assets/scss/vars.scss +0 -11
  206. /package/dist/multi/{app-200938be3feda27d7b80.js.LICENSE.txt → app-d36b0855e3e7a53eeee9.js.LICENSE.txt} +0 -0
  207. /package/dist/single/{app-17629d1b119f6c611d49.js.LICENSE.txt → app-62171f5f51b5954a787c.js.LICENSE.txt} +0 -0
@@ -15,7 +15,7 @@
15
15
  &:not(:last-child) {
16
16
  padding-bottom: 8px;
17
17
  margin-bottom: 14px;
18
- border-bottom: 1px solid var(--on-border-muted);
18
+ border-bottom: 1px solid var(--color-border-subtle);
19
19
  }
20
20
  }
21
21
 
@@ -16,7 +16,7 @@
16
16
  &:not(:last-child) {
17
17
  padding-bottom: 8px;
18
18
  margin-bottom: 14px;
19
- border-bottom: 1px solid var(--on-border-muted);
19
+ border-bottom: 1px solid var(--color-border-subtle);
20
20
  }
21
21
  }
22
22
 
@@ -4,7 +4,7 @@
4
4
  justify-content: space-between;
5
5
  padding: 24px 24px 0;
6
6
  align-items: flex-start;
7
- background: var(--bg-base-primary);
7
+ background: var(--color-bg-primary);
8
8
  border-radius: 8px;
9
9
  }
10
10
 
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  .report-date {
23
- color: var(--on-text-secondary);
23
+ color: var(--color-text-secondary);
24
24
  display: block;
25
25
  }
26
26
 
@@ -9,6 +9,7 @@ import { MetadataSummary } from "@/components/ReportMetadata/MetadataSummary";
9
9
  import { reportStatsStore, statsByEnvStore, useI18n } from "@/stores";
10
10
  import { currentEnvironment } from "@/stores/env";
11
11
  import { envInfoStore } from "@/stores/envInfo";
12
+ import { getReportEnvSectionId } from "@/stores/reportEnvSections";
12
13
  import { collapsedTrees, toggleTree } from "@/stores/tree";
13
14
  import { fetchVariables, variables } from "@/stores/variables";
14
15
 
@@ -34,9 +35,8 @@ export type MetadataVariablesProps = {
34
35
  };
35
36
 
36
37
  const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo = [] }) => {
37
- const envKey = currentEnvironment.value ?? "default";
38
- const sectionId = `report-${envKey}-metadata`;
39
- const showAllId = `report-${envKey}-metadata-showAll`;
38
+ const sectionId = getReportEnvSectionId("metadata");
39
+ const showAllId = `${sectionId}-showAll`;
40
40
  const isOpened = !collapsedTrees.value.has(sectionId);
41
41
  const showAll = collapsedTrees.value.has(showAllId);
42
42
  const list = envInfo.map((env) => ({ ...env, value: env.values.join(", ") }));
@@ -71,9 +71,8 @@ const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo = [] }) => {
71
71
 
72
72
  const MetadataVariables: FunctionalComponent<MetadataVariablesProps> = (props) => {
73
73
  const { t } = useI18n("ui");
74
- const envKey = currentEnvironment.value ?? "default";
75
- const sectionId = `report-${envKey}-variables`;
76
- const showAllId = `report-${envKey}-variables-showAll`;
74
+ const sectionId = getReportEnvSectionId("variables");
75
+ const showAllId = `${sectionId}-showAll`;
77
76
  const isOpened = !collapsedTrees.value.has(sectionId);
78
77
  const showAll = collapsedTrees.value.has(showAllId);
79
78
  const fullList = Object.entries(props.variables).map(([key, value]) => ({
@@ -111,13 +110,12 @@ const MetadataVariables: FunctionalComponent<MetadataVariablesProps> = (props) =
111
110
  };
112
111
 
113
112
  export const ReportMetadata = () => {
114
- const stats = currentEnvironment.value
115
- ? statsByEnvStore.value.data[currentEnvironment.value]
116
- : reportStatsStore.value.data;
113
+ const envId = currentEnvironment.value;
114
+ const stats = envId ? statsByEnvStore.value.data[envId] : reportStatsStore.value.data;
117
115
 
118
116
  useEffect(() => {
119
- fetchVariables(currentEnvironment.value);
120
- }, [currentEnvironment.value]);
117
+ fetchVariables(envId);
118
+ }, [envId]);
121
119
 
122
120
  return (
123
121
  <div className={styles["report-metadata-wrapper"]}>
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  .report-metadata-separator {
13
- border-left: 1px solid var(--on-border-primary);
13
+ border-left: 1px solid var(--color-border-default);
14
14
  height: 24px;
15
15
  margin: 11px 0;
16
16
  }
@@ -26,7 +26,7 @@
26
26
  justify-content: space-between;
27
27
  align-items: baseline;
28
28
  padding: 16px 0;
29
- border-bottom: 1px solid var(--on-border-primary);
29
+ border-bottom: 1px solid var(--color-border-default);
30
30
  width: 100%;
31
31
  }
32
32
 
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  .metadata-item-title {
40
- color: var(--on-text-secondary);
40
+ color: var(--color-text-secondary);
41
41
  margin-bottom: 6px;
42
42
  }
43
43
 
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  .report-metadata {
49
- border-bottom: 1px solid var(--on-border-primary);
49
+ border-bottom: 1px solid var(--color-border-default);
50
50
  }
51
51
 
52
52
  .report-metadata-keyvalue {
@@ -80,7 +80,7 @@
80
80
  width: 4px;
81
81
  height: 12px;
82
82
  border-radius: 2px;
83
- background: var(--on-text-secondary);
83
+ background: var(--color-text-secondary);
84
84
  margin-right: 8px;
85
85
  align-self: center;
86
86
  @include status-bg-and-text();
@@ -93,5 +93,5 @@
93
93
 
94
94
  .metadata-icon {
95
95
  margin-right: 8px;
96
- color: var(--on-icon-secondary);
96
+ color: var(--color-icon-secondary);
97
97
  }
@@ -33,7 +33,7 @@
33
33
  .report-quality-gate-result-icon {
34
34
  flex: 0 0 auto;
35
35
  margin-top: 3px;
36
- color: var(--bg-support-capella);
36
+ color: var(--color-status-failed-chart);
37
37
  }
38
38
 
39
39
  .report-quality-gate-result-content {
@@ -52,6 +52,6 @@
52
52
  &:not(:last-child) {
53
53
  padding-bottom: 8px;
54
54
  margin-bottom: 14px;
55
- border-bottom: 1px solid var(--on-border-muted);
55
+ border-bottom: 1px solid var(--color-border-subtle);
56
56
  }
57
57
  }
@@ -12,7 +12,7 @@ const handleQuerySearch = (value: string) => {
12
12
  setTreeQueryFilter(value);
13
13
  };
14
14
 
15
- const QuerySearch = () => {
15
+ export const ReportSearch = () => {
16
16
  const { t } = useI18n("search");
17
17
 
18
18
  return (
@@ -24,7 +24,3 @@ const QuerySearch = () => {
24
24
  />
25
25
  );
26
26
  };
27
-
28
- export const ReportSearch = () => {
29
- return <QuerySearch />;
30
- };
@@ -1,5 +1,5 @@
1
1
  .tabsList {
2
- background-color: var(--bg-base-secondary);
2
+ background-color: var(--color-bg-secondary);
3
3
  padding: 2px;
4
4
  border-radius: 8px;
5
5
  display: flex;
@@ -9,8 +9,8 @@
9
9
  }
10
10
 
11
11
  .tab {
12
- background-color: var(--bg-control-flat);
13
- color: var(--on-text-primary);
12
+ background-color: var(--color-control-bg-ghost);
13
+ color: var(--color-text-primary);
14
14
  border-radius: 6px;
15
15
  border: 1px solid transparent;
16
16
  padding: 2px 8px;
@@ -28,17 +28,17 @@
28
28
  border-color var(--color-change-transition-duration);
29
29
 
30
30
  &[aria-current] {
31
- background-color: var(--bg-base-modal);
32
- border-color: var(--on-border-primary);
31
+ background-color: var(--color-bg-raised);
32
+ border-color: var(--color-border-default);
33
33
  cursor: default;
34
34
  }
35
35
 
36
36
  &:hover:not([aria-current]) {
37
- background-color: var(--bg-control-flat-medium);
37
+ background-color: var(--color-control-bg-ghost-hover);
38
38
  }
39
39
 
40
40
  &:active:not([aria-current]) {
41
- background-color: var(--bg-control-flat-heavy);
41
+ background-color: var(--color-control-bg-ghost-active);
42
42
  transform: scale(0.94);
43
43
  }
44
44
 
@@ -47,10 +47,10 @@
47
47
  }
48
48
 
49
49
  &:focus-visible {
50
- outline: 1px solid var(--ad-other-focus);
50
+ outline: 1px solid var(--color-focus-ring);
51
51
 
52
52
  &:not([aria-current]) {
53
- background-color: var(--bg-control-flat-medium);
53
+ background-color: var(--color-control-bg-ghost-hover);
54
54
  }
55
55
  }
56
56
  }
@@ -1,19 +1,96 @@
1
- import type { VNode } from "preact";
1
+ import { PageLoader } from "@allurereport/web-components";
2
+ import type { ComponentType } from "preact";
3
+ import { useEffect, useState } from "preact/hooks";
2
4
 
3
- import { Charts } from "@/components/Charts";
4
5
  import { Report } from "@/components/Report";
5
6
  import { currentSection } from "@/stores/sections";
6
7
 
7
- import { Timeline } from "../Timeline";
8
-
9
8
  import * as styles from "./styles.scss";
10
9
 
10
+ type SectionName = "report" | "charts" | "timeline";
11
+
12
+ const sectionLoaders: Record<Exclude<SectionName, "report">, () => Promise<ComponentType>> = {
13
+ charts: () => import("@/components/Charts").then((module) => module.Charts),
14
+ timeline: () => import("@/components/Timeline").then((module) => module.Timeline),
15
+ };
16
+
17
+ const sectionCache = new Map<string, ComponentType>();
18
+
19
+ type LoadedSection = {
20
+ section: SectionName;
21
+ Component: ComponentType;
22
+ };
23
+
24
+ const LazySection = ({ section }: { section: SectionName }) => {
25
+ const cached = sectionCache.get(section);
26
+ const [loaded, setLoaded] = useState<LoadedSection | null>(cached ? { section, Component: cached } : null);
27
+
28
+ useEffect(() => {
29
+ if (section === "report") {
30
+ setLoaded({ section, Component: Report });
31
+ return;
32
+ }
33
+
34
+ const loader = sectionLoaders[section];
35
+ let mounted = true;
36
+
37
+ if (!loader) {
38
+ setLoaded(null);
39
+ return;
40
+ }
41
+
42
+ const cachedComponent = sectionCache.get(section);
43
+ if (cachedComponent) {
44
+ if (mounted) {
45
+ setLoaded({ section, Component: cachedComponent });
46
+ }
47
+ return;
48
+ }
49
+
50
+ setLoaded(null);
51
+
52
+ loader()
53
+ .then((LoadedComponent) => {
54
+ if (mounted) {
55
+ sectionCache.set(section, LoadedComponent);
56
+ setLoaded({ section, Component: LoadedComponent });
57
+ }
58
+ })
59
+ .catch((err) => {
60
+ console.error(`Failed to load section "${section}":`, err);
61
+ if (mounted) {
62
+ setLoaded({ section, Component: Report });
63
+ }
64
+ });
65
+
66
+ return () => {
67
+ mounted = false;
68
+ };
69
+ }, [section]);
70
+
71
+ if (section === "report" || !sectionLoaders[section]) {
72
+ return <Report />;
73
+ }
74
+
75
+ if (!loaded || loaded.section !== section) {
76
+ return <PageLoader />;
77
+ }
78
+
79
+ const { Component } = loaded;
80
+
81
+ return <Component />;
82
+ };
83
+
84
+ const VALID_SECTIONS: SectionName[] = ["report", "charts", "timeline"];
85
+
11
86
  export const SectionSwitcher = () => {
12
- const sectionMap: Record<string, VNode> = {
13
- report: <Report />,
14
- charts: <Charts />,
15
- timeline: <Timeline />,
16
- };
87
+ const section = VALID_SECTIONS.includes(currentSection.value as SectionName)
88
+ ? (currentSection.value as SectionName)
89
+ : "report";
17
90
 
18
- return <div className={styles.layout}>{sectionMap[currentSection.value] || sectionMap.report}</div>;
91
+ return (
92
+ <div className={styles.layout}>
93
+ <LazySection section={section} />
94
+ </div>
95
+ );
19
96
  };
@@ -2,6 +2,8 @@ import type { JSX } from "preact";
2
2
  import { useEffect, useMemo, useRef } from "preact/hooks";
3
3
  import Split from "split.js";
4
4
 
5
+ import { activePane, focusTestResultPane, focusTreePane } from "@/stores/keyboard";
6
+
5
7
  import * as styles from "./styles.scss";
6
8
 
7
9
  const SideBySide = ({ left, right }: { left: JSX.Element; right: JSX.Element }) => {
@@ -42,10 +44,26 @@ const SideBySide = ({ left, right }: { left: JSX.Element; right: JSX.Element })
42
44
  };
43
45
  }, []);
44
46
 
47
+ const pane = activePane.value;
48
+
45
49
  return (
46
50
  <div class={styles.side} ref={containerRef}>
47
- <div class={styles["side-left"]}>{leftContent}</div>
48
- <div class={styles["side-right"]}>{rightContent}</div>
51
+ <div
52
+ class={styles["side-left"]}
53
+ data-pane="tree"
54
+ data-pane-active={pane === "tree" ? "true" : undefined}
55
+ onMouseDown={() => focusTreePane()}
56
+ >
57
+ {leftContent}
58
+ </div>
59
+ <div
60
+ class={styles["side-right"]}
61
+ data-pane="testResult"
62
+ data-pane-active={pane === "testResult" ? "true" : undefined}
63
+ onMouseDown={() => focusTestResultPane()}
64
+ >
65
+ {rightContent}
66
+ </div>
49
67
  </div>
50
68
  );
51
69
  };
@@ -15,10 +15,18 @@
15
15
  }
16
16
 
17
17
  .side-left {
18
+ display: flex;
19
+ flex-direction: column;
18
20
  margin-right: auto;
19
21
  border-radius: 12px 0 0 12px;
20
22
  box-shadow: var(--shadow-small);
21
23
  overflow: hidden;
24
+ min-height: 0;
25
+
26
+ > * {
27
+ flex: 1 1 auto;
28
+ min-height: 0;
29
+ }
22
30
  }
23
31
 
24
32
  .side-right {
@@ -56,7 +64,7 @@
56
64
  }
57
65
 
58
66
  .gutter {
59
- background: var(--bg-base-secondary) no-repeat 50%;
67
+ background: var(--color-bg-secondary) no-repeat 50%;
60
68
  height: 100%;
61
69
  }
62
70
 
@@ -1,5 +1,6 @@
1
1
  import { Loadable, PageLoader, Text } from "@allurereport/web-components";
2
2
  import { computed } from "@preact/signals";
3
+ import clsx from "clsx";
3
4
  import type { JSX } from "preact";
4
5
  import { useEffect, useRef, useState } from "preact/hooks";
5
6
 
@@ -7,6 +8,8 @@ import MainReport from "@/components/MainReport";
7
8
  import SideBySide from "@/components/SideBySide";
8
9
  import TestResult from "@/components/TestResult";
9
10
  import { useI18n } from "@/stores";
11
+ import { activePane } from "@/stores/keyboard";
12
+ import { isSplitMode } from "@/stores/layout";
10
13
  import { rootTabRoute, testResultRoute } from "@/stores/router";
11
14
  import { currentTrId } from "@/stores/testResult";
12
15
  import { testResultStore } from "@/stores/testResults";
@@ -59,7 +62,13 @@ export const SplitLayout = () => {
59
62
  }}
60
63
  />
61
64
  ) : (
62
- <div className={styles.empty}>
65
+ <div
66
+ className={clsx(
67
+ styles.empty,
68
+ isSplitMode.value && styles["empty-split-pane"],
69
+ isSplitMode.value && activePane.value === "testResult" && styles["pane-active"],
70
+ )}
71
+ >
63
72
  <Text>{t("noSelectedTR")}</Text>
64
73
  </div>
65
74
  );
@@ -1,22 +1,26 @@
1
+ @use "../../styles/pane-active" as paneActive;
2
+
1
3
  .layout {
2
4
  margin: auto;
3
5
  padding: 12px 32px;
4
- background: var(--bg-base-secondary);
5
- color: var(--on-text-primary);
6
+ background: var(--color-bg-canvas);
7
+ color: var(--color-text-primary);
6
8
  font-size: 14px;
7
9
  }
8
10
 
9
11
  .wrapper {
12
+ display: flex;
10
13
  width: 100%;
11
14
  flex-direction: column;
12
15
  margin: auto;
13
16
  position: relative;
14
17
  height: 100%;
18
+ min-height: 0;
15
19
  }
16
20
 
17
21
  .content {
18
22
  box-shadow: var(--shadow-small);
19
- background: var(--bg-base-primary);
23
+ background: var(--color-bg-primary);
20
24
  border-radius: 12px;
21
25
  width: 100%;
22
26
  overflow: hidden;
@@ -39,7 +43,7 @@
39
43
  .title {
40
44
  font-size: 14px;
41
45
  line-height: 1.25;
42
- color: var(--on-text-primary);
46
+ color: var(--color-text-primary);
43
47
  margin-bottom: 8px;
44
48
  }
45
49
 
@@ -79,6 +83,18 @@
79
83
  height: 100%;
80
84
  }
81
85
 
86
+ .empty-split-pane {
87
+ position: relative;
88
+ background: var(--bg-base-primary);
89
+ border-radius: 12px;
90
+ overflow: auto;
91
+ @include paneActive.split-pane-indicator;
92
+
93
+ &.pane-active {
94
+ @include paneActive.split-pane-indicator-active;
95
+ }
96
+ }
97
+
82
98
  .header {
83
99
  padding: 8px;
84
100
  margin-bottom: 0;
@@ -20,6 +20,6 @@
20
20
  }
21
21
 
22
22
  .test-steps-empty-text {
23
- color: var(--on-text-secondary);
23
+ color: var(--color-text-secondary);
24
24
  flex: 1 1 auto;
25
25
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  .test-result-description-wrapper {
6
6
  padding: 16px 0;
7
- border-bottom: 1px solid var(--on-border-primary);
7
+ border-bottom: 1px solid var(--color-border-default);
8
8
  }
9
9
 
10
10
  .test-result-description-text {
@@ -13,9 +13,9 @@ export const TrDropdown: FunctionalComponent<{
13
13
  counter: number;
14
14
  actions?: preact.ComponentChildren;
15
15
  className?: ClassValue;
16
- }> = ({ isOpened, setIsOpen, title, icon, counter, actions, className }) => {
16
+ }> = ({ isOpened, setIsOpen, title, icon, counter, actions, className, ...rest }) => {
17
17
  return (
18
- <div className={clsx(styles["test-result-dropdown"], className)} onClick={() => setIsOpen(!isOpened)}>
18
+ <div className={clsx(styles["test-result-dropdown"], className)} onClick={() => setIsOpen(!isOpened)} {...rest}>
19
19
  <ArrowButton isOpened={isOpened} icon={allureIcons.arrowsChevronDown} />
20
20
  <div className={styles["test-result-dropdown-wrap"]}>
21
21
  <SvgIcon id={icon} />
@@ -29,7 +29,7 @@
29
29
  border-radius: 4px;
30
30
 
31
31
  &:hover {
32
- background: var(--bg-control-flat-medium);
32
+ background: var(--color-row-bg-hover);
33
33
  }
34
34
  }
35
35
 
@@ -20,6 +20,6 @@
20
20
  }
21
21
 
22
22
  .test-result-thumb-text {
23
- color: var(--on-text-secondary);
23
+ color: var(--color-text-secondary);
24
24
  flex: 1 1 auto;
25
25
  }
@@ -3,7 +3,7 @@
3
3
  cursor: pointer;
4
4
 
5
5
  &:hover {
6
- background: var(--bg-control-flat-medium);
6
+ background: var(--color-row-bg-hover);
7
7
  }
8
8
  }
9
9
  }
@@ -44,15 +44,15 @@
44
44
  .test-result-environment-item-time {
45
45
  margin-left: auto;
46
46
  line-height: 20px;
47
- color: var(--on-text-secondary);
47
+ color: var(--color-text-secondary);
48
48
  }
49
49
 
50
50
  .test-result-environment-item-link {
51
51
  :root {
52
- --allure-btn-icon-color: var(--bg-control-flat);
52
+ --allure-btn-icon-color: var(--color-control-bg-ghost);
53
53
  }
54
54
 
55
- color: var(--on-icon-secondary);
55
+ color: var(--color-icon-secondary);
56
56
  }
57
57
 
58
58
  .test-result-environment-item-status {
@@ -15,15 +15,15 @@ import * as styles from "./styles.scss";
15
15
 
16
16
  const TrErrorTrace = ({ trace }: { trace: string }) => {
17
17
  const sanitizedTrace = ansiToHTML(trace, {
18
- fg: "var(--on-text-primary)",
18
+ fg: "var(--color-text-primary)",
19
19
  bg: "none",
20
20
  colors: {
21
21
  0: "none",
22
22
  1: "none",
23
- 2: "var(--on-support-sirius)",
24
- 3: "var(--on-support-atlas)",
25
- 4: "var(--bg-support-skat)",
26
- 5: "var(--on-support-betelgeuse)",
23
+ 2: "var(--color-intent-info-text)",
24
+ 3: "var(--color-intent-warning-text)",
25
+ 4: "var(--color-status-unknown-chart)",
26
+ 5: "var(--color-syntax-type)",
27
27
  },
28
28
  });
29
29
 
@@ -55,7 +55,7 @@ export const TrError: FunctionalComponent<
55
55
  const sanitizedMessage =
56
56
  showMessage && message
57
57
  ? ansiToHTML(message, {
58
- fg: "var(--on-text-primary)",
58
+ fg: "var(--color-text-primary)",
59
59
  colors: {},
60
60
  })
61
61
  : "";
@@ -98,7 +98,32 @@ export const TrError: FunctionalComponent<
98
98
  ) : showMessage ? (
99
99
  empty("no-message-provided")
100
100
  ) : null}
101
- {hasDiff && (
101
+ {!showMessage && message && (
102
+ <div className={styles["test-result-error-header"]}>
103
+ {hasDiff ? (
104
+ <Button
105
+ style={"flat"}
106
+ data-testId={"test-result-diff-button"}
107
+ size={"s"}
108
+ text={tooltip("showDiff")}
109
+ onClick={openDiff}
110
+ />
111
+ ) : (
112
+ <span />
113
+ )}
114
+ <TooltipWrapper tooltipText={tooltip("clipboard")} tooltipTextAfterClick={tooltip("clipboardSuccess")}>
115
+ <IconButton
116
+ style={"ghost"}
117
+ size={"s"}
118
+ icon={allureIcons.lineGeneralCopy3}
119
+ onClick={() => {
120
+ copyToClipboard(message);
121
+ }}
122
+ />
123
+ </TooltipWrapper>
124
+ </div>
125
+ )}
126
+ {(showMessage || !message) && hasDiff && (
102
127
  <Button
103
128
  style={"flat"}
104
129
  data-testId={"test-result-diff-button"}