@aws/mynah-ui 4.35.3 → 4.35.4

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 (197) hide show
  1. package/Dockerfile +34 -0
  2. package/README.md +1 -0
  3. package/dist/components/chat-item/chat-prompt-input.d.ts +16 -1
  4. package/dist/components/chat-item/chat-wrapper.d.ts +5 -1
  5. package/dist/components/chat-item/prompt-input/prompt-text-input.d.ts +2 -1
  6. package/dist/components/chat-item/prompt-input/prompt-top-bar/prompt-top-bar.d.ts +47 -0
  7. package/dist/components/chat-item/prompt-input/prompt-top-bar/top-bar-button.d.ts +32 -0
  8. package/dist/components/detailed-list/detailed-list.d.ts +14 -2
  9. package/dist/components/icon.d.ts +1 -0
  10. package/dist/components/overlay.d.ts +7 -0
  11. package/dist/helper/quick-pick-data-handler.d.ts +1 -1
  12. package/dist/helper/test-ids.d.ts +7 -0
  13. package/dist/main.d.ts +8 -0
  14. package/dist/main.js +1 -1
  15. package/dist/main.js.map +1 -1
  16. package/dist/static.d.ts +18 -1
  17. package/docs/DATAMODEL.md +86 -0
  18. package/docs/DEVELOPER.md +2 -1
  19. package/docs/PROPERTIES.md +68 -3
  20. package/docs/TESTING.md +73 -0
  21. package/docs/USAGE.md +58 -1
  22. package/docs/img/data-model/tabStore/promptTopBarButton.png +0 -0
  23. package/docs/img/data-model/tabStore/promptTopBarContextItems.png +0 -0
  24. package/docs/img/data-model/tabStore/promptTopBarTitle.png +0 -0
  25. package/docs/img/topBarButtonOverlay.png +0 -0
  26. package/package.json +12 -5
  27. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-close-the-context-selector-by-clicking-outside/Open-MynahUI-Context-selector-should-close-the-context-selector-by-clicking-outside-1.png +0 -0
  28. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-close-the-context-selector-by-pressing-escape/Open-MynahUI-Context-selector-should-close-the-context-selector-by-pressing-escape-1.png +0 -0
  29. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-filter-context-selector-list/Open-MynahUI-Context-selector-should-filter-context-selector-list-1.png +0 -0
  30. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-render-the-context-selector/Open-MynahUI-Context-selector-should-render-the-context-selector-1.png +0 -0
  31. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-select-context-selector-item-by-clicking/Open-MynahUI-Context-selector-should-select-context-selector-item-by-clicking-1.png +0 -0
  32. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-select-context-selector-item-with-enter/Open-MynahUI-Context-selector-should-select-context-selector-item-with-enter-1.png +0 -0
  33. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-select-context-selector-item-with-space/Open-MynahUI-Context-selector-should-select-context-selector-item-with-space-1.png +0 -0
  34. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Context-selector-should-select-context-selector-item-with-tab/Open-MynahUI-Context-selector-should-select-context-selector-item-with-tab-1.png +0 -0
  35. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Feedback-form-should-cancel-feedback-form/Open-MynahUI-Feedback-form-should-cancel-feedback-form-1.png +0 -0
  36. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Feedback-form-should-render-downvote-results/Open-MynahUI-Feedback-form-should-render-downvote-results-1.png +0 -0
  37. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Feedback-form-should-render-feedback-form/Open-MynahUI-Feedback-form-should-render-feedback-form-1.png +0 -0
  38. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Feedback-form-should-render-upvote-results/Open-MynahUI-Feedback-form-should-render-upvote-results-1.png +0 -0
  39. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Feedback-form-should-render-vote-buttons/Open-MynahUI-Feedback-form-should-render-vote-buttons-1.png +0 -0
  40. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Feedback-form-should-submit-feedback-form/Open-MynahUI-Feedback-form-should-submit-feedback-form-1.png +0 -0
  41. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders-1.png +0 -0
  42. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders-2.png +0 -0
  43. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders-3.png +0 -0
  44. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-render-file-appearance-based-on-its-details/Open-MynahUI-File-tree-should-render-file-appearance-based-on-its-details-1.png +0 -0
  45. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-show-file-tree/Open-MynahUI-File-tree-should-show-file-tree-1.png +0 -0
  46. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover-1.png +0 -0
  47. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover-2.png +0 -0
  48. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click-1.png +0 -0
  49. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click-2.png +0 -0
  50. package/ui-tests/__snapshots__/chromium/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click-3.png +0 -0
  51. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Forms-should-disable-forms-on-submit/Open-MynahUI-Forms-should-disable-forms-on-submit-1.png +0 -0
  52. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Forms-should-remove-form-card-when-canceled/Open-MynahUI-Forms-should-remove-form-card-when-canceled-1.png +0 -0
  53. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Forms-should-render-form-elements-correctly/Open-MynahUI-Forms-should-render-form-elements-correctly-1.png +0 -0
  54. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly-1.png +0 -0
  55. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly-2.png +0 -0
  56. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-1.png +0 -0
  57. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-2.png +0 -0
  58. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-3.png +0 -0
  59. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-4.png +0 -0
  60. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-5.png +0 -0
  61. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-6.png +0 -0
  62. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-1.png +0 -0
  63. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-2.png +0 -0
  64. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-Top-Bar-should-show-tooltip-when-hovering-over-pinned-context-items/Open-MynahUI-Prompt-Top-Bar-should-show-tooltip-when-hovering-over-pinned-context-items-1.png +0 -0
  65. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt-1.png +0 -0
  66. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt-with-code-attachment/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt-with-code-attachment-1.png +0 -0
  67. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-navigation-should-navigate-down-to-current-empty-prompt/Open-MynahUI-Prompt-navigation-should-navigate-down-to-current-empty-prompt-1.png +0 -0
  68. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-navigation-should-navigate-down-to-next-prompt/Open-MynahUI-Prompt-navigation-should-navigate-down-to-next-prompt-1.png +0 -0
  69. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-navigation-should-navigate-up-to-previous-prompt/Open-MynahUI-Prompt-navigation-should-navigate-up-to-previous-prompt-1.png +0 -0
  70. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Prompt-navigation-should-stay-on-current-prompt/Open-MynahUI-Prompt-navigation-should-stay-on-current-prompt-1.png +0 -0
  71. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-clicking-outside/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-clicking-outside-1.png +0 -0
  72. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-pressing-escape/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-pressing-escape-1.png +0 -0
  73. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list-1.png +0 -0
  74. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector-1.png +0 -0
  75. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-by-clicking/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-by-clicking-1.png +0 -0
  76. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-enter/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-enter-1.png +0 -0
  77. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-space/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-space-1.png +0 -0
  78. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-tab/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-tab-1.png +0 -0
  79. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Tabs-should-close-the-tab/Open-MynahUI-Tabs-should-close-the-tab-1.png +0 -0
  80. package/ui-tests/__snapshots__/chromium/Open-MynahUI-Tabs-should-open-a-new-tab/Open-MynahUI-Tabs-should-open-a-new-tab-1.png +0 -0
  81. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-keep-the-content-inside-window-boundaries/Open-MynahUI-should-keep-the-content-inside-window-boundaries-1.png +0 -0
  82. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-keep-the-content-inside-window-boundaries/Open-MynahUI-should-keep-the-content-inside-window-boundaries-2.png +0 -0
  83. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-keep-the-content-inside-window-boundaries/Open-MynahUI-should-keep-the-content-inside-window-boundaries-3.png +0 -0
  84. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-parse-markdown/Open-MynahUI-should-parse-markdown-1.png +0 -0
  85. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-and-remove-dismissible-cards/Open-MynahUI-should-render-and-remove-dismissible-cards-1.png +0 -0
  86. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-buttons-on-cards-correctly/Open-MynahUI-should-render-buttons-on-cards-correctly-1.png +0 -0
  87. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-buttons-on-cards-correctly/Open-MynahUI-should-render-buttons-on-cards-correctly-2.png +0 -0
  88. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-card-headers-correctly/Open-MynahUI-should-render-card-headers-correctly-1.png +0 -0
  89. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-card-headers-correctly/Open-MynahUI-should-render-card-headers-correctly-2.png +0 -0
  90. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-card-headers-correctly/Open-MynahUI-should-render-card-headers-correctly-3.png +0 -0
  91. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-character-limit-counter/Open-MynahUI-should-render-character-limit-counter-1.png +0 -0
  92. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-custom-icons-correctly/Open-MynahUI-should-render-custom-icons-correctly-1.png +0 -0
  93. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-custom-icons-correctly/Open-MynahUI-should-render-custom-icons-correctly-2.png +0 -0
  94. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-information-cards-correctly/Open-MynahUI-should-render-information-cards-correctly-1.png +0 -0
  95. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-initial-data/Open-MynahUI-should-render-initial-data-1.png +0 -0
  96. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-muted-cards-correctly/Open-MynahUI-should-render-muted-cards-correctly-1.png +0 -0
  97. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-muted-cards-correctly/Open-MynahUI-should-render-muted-cards-correctly-2.png +0 -0
  98. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-new-card-when-followup-click/Open-MynahUI-should-render-new-card-when-followup-click-1.png +0 -0
  99. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-tabbed-cards-correctly/Open-MynahUI-should-render-tabbed-cards-correctly-1.png +0 -0
  100. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-tabbed-cards-correctly/Open-MynahUI-should-render-tabbed-cards-correctly-2.png +0 -0
  101. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-user-prompt/Open-MynahUI-should-render-user-prompt-1.png +0 -0
  102. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-welcome-structure/Open-MynahUI-should-render-welcome-structure-1.png +0 -0
  103. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-render-welcome-structure/Open-MynahUI-should-render-welcome-structure-2.png +0 -0
  104. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover-1.png +0 -0
  105. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover-2.png +0 -0
  106. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover-3.png +0 -0
  107. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-show-progress-indicator/Open-MynahUI-should-show-progress-indicator-1.png +0 -0
  108. package/ui-tests/__snapshots__/chromium/Open-MynahUI-should-show-prompt-options/Open-MynahUI-should-show-prompt-options-1.png +0 -0
  109. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-close-the-context-selector-by-clicking-outside/Open-MynahUI-Context-selector-should-close-the-context-selector-by-clicking-outside-1.png +0 -0
  110. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-close-the-context-selector-by-pressing-escape/Open-MynahUI-Context-selector-should-close-the-context-selector-by-pressing-escape-1.png +0 -0
  111. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-filter-context-selector-list/Open-MynahUI-Context-selector-should-filter-context-selector-list-1.png +0 -0
  112. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-render-the-context-selector/Open-MynahUI-Context-selector-should-render-the-context-selector-1.png +0 -0
  113. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-select-context-selector-item-by-clicking/Open-MynahUI-Context-selector-should-select-context-selector-item-by-clicking-1.png +0 -0
  114. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-select-context-selector-item-with-enter/Open-MynahUI-Context-selector-should-select-context-selector-item-with-enter-1.png +0 -0
  115. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-select-context-selector-item-with-space/Open-MynahUI-Context-selector-should-select-context-selector-item-with-space-1.png +0 -0
  116. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Context-selector-should-select-context-selector-item-with-tab/Open-MynahUI-Context-selector-should-select-context-selector-item-with-tab-1.png +0 -0
  117. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Feedback-form-should-cancel-feedback-form/Open-MynahUI-Feedback-form-should-cancel-feedback-form-1.png +0 -0
  118. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Feedback-form-should-render-downvote-results/Open-MynahUI-Feedback-form-should-render-downvote-results-1.png +0 -0
  119. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Feedback-form-should-render-feedback-form/Open-MynahUI-Feedback-form-should-render-feedback-form-1.png +0 -0
  120. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Feedback-form-should-render-upvote-results/Open-MynahUI-Feedback-form-should-render-upvote-results-1.png +0 -0
  121. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Feedback-form-should-render-vote-buttons/Open-MynahUI-Feedback-form-should-render-vote-buttons-1.png +0 -0
  122. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Feedback-form-should-submit-feedback-form/Open-MynahUI-Feedback-form-should-submit-feedback-form-1.png +0 -0
  123. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders-1.png +0 -0
  124. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders-2.png +0 -0
  125. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders/Open-MynahUI-File-tree-should-collapse-and-expand-file-in-folders-3.png +0 -0
  126. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-render-file-appearance-based-on-its-details/Open-MynahUI-File-tree-should-render-file-appearance-based-on-its-details-1.png +0 -0
  127. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-show-file-tree/Open-MynahUI-File-tree-should-show-file-tree-1.png +0 -0
  128. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover-1.png +0 -0
  129. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover/Open-MynahUI-File-tree-should-show-tooltip-with-file-description-on-hover-2.png +0 -0
  130. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click-1.png +0 -0
  131. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click-2.png +0 -0
  132. package/ui-tests/__snapshots__/webkit/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click/Open-MynahUI-File-tree-should-trigger-default-or-sub-action-on-click-3.png +0 -0
  133. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Forms-should-disable-forms-on-submit/Open-MynahUI-Forms-should-disable-forms-on-submit-1.png +0 -0
  134. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Forms-should-remove-form-card-when-canceled/Open-MynahUI-Forms-should-remove-form-card-when-canceled-1.png +0 -0
  135. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Forms-should-render-form-elements-correctly/Open-MynahUI-Forms-should-render-form-elements-correctly-1.png +0 -0
  136. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly-1.png +0 -0
  137. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly/Open-MynahUI-Prompt-Top-Bar-should-manage-context-items-correctly-2.png +0 -0
  138. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-1.png +0 -0
  139. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-2.png +0 -0
  140. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-3.png +0 -0
  141. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-4.png +0 -0
  142. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-5.png +0 -0
  143. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button/Open-MynahUI-Prompt-Top-Bar-should-render-prompt-top-bar-with-title-context-items-and-button-6.png +0 -0
  144. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-1.png +0 -0
  145. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button/Open-MynahUI-Prompt-Top-Bar-should-show-overlay-when-clicking-top-bar-button-2.png +0 -0
  146. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-Top-Bar-should-show-tooltip-when-hovering-over-pinned-context-items/Open-MynahUI-Prompt-Top-Bar-should-show-tooltip-when-hovering-over-pinned-context-items-1.png +0 -0
  147. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt-1.png +0 -0
  148. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt-with-code-attachment/Open-MynahUI-Prompt-navigation-should-navigate-back-to-current-prompt-with-code-attachment-1.png +0 -0
  149. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-navigation-should-navigate-down-to-current-empty-prompt/Open-MynahUI-Prompt-navigation-should-navigate-down-to-current-empty-prompt-1.png +0 -0
  150. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-navigation-should-navigate-down-to-next-prompt/Open-MynahUI-Prompt-navigation-should-navigate-down-to-next-prompt-1.png +0 -0
  151. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-navigation-should-navigate-up-to-previous-prompt/Open-MynahUI-Prompt-navigation-should-navigate-up-to-previous-prompt-1.png +0 -0
  152. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Prompt-navigation-should-stay-on-current-prompt/Open-MynahUI-Prompt-navigation-should-stay-on-current-prompt-1.png +0 -0
  153. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-clicking-outside/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-clicking-outside-1.png +0 -0
  154. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-pressing-escape/Open-MynahUI-Quick-command-selector-should-close-the-quick-command-selector-by-pressing-escape-1.png +0 -0
  155. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list/Open-MynahUI-Quick-command-selector-should-filter-quick-command-selector-list-1.png +0 -0
  156. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector/Open-MynahUI-Quick-command-selector-should-render-the-quick-command-selector-1.png +0 -0
  157. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-by-clicking/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-by-clicking-1.png +0 -0
  158. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-enter/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-enter-1.png +0 -0
  159. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-space/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-space-1.png +0 -0
  160. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-tab/Open-MynahUI-Quick-command-selector-should-select-quick-command-selector-item-with-tab-1.png +0 -0
  161. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Tabs-should-close-the-tab/Open-MynahUI-Tabs-should-close-the-tab-1.png +0 -0
  162. package/ui-tests/__snapshots__/webkit/Open-MynahUI-Tabs-should-open-a-new-tab/Open-MynahUI-Tabs-should-open-a-new-tab-1.png +0 -0
  163. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-keep-the-content-inside-window-boundaries/Open-MynahUI-should-keep-the-content-inside-window-boundaries-1.png +0 -0
  164. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-keep-the-content-inside-window-boundaries/Open-MynahUI-should-keep-the-content-inside-window-boundaries-2.png +0 -0
  165. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-keep-the-content-inside-window-boundaries/Open-MynahUI-should-keep-the-content-inside-window-boundaries-3.png +0 -0
  166. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-parse-markdown/Open-MynahUI-should-parse-markdown-1.png +0 -0
  167. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-and-remove-dismissible-cards/Open-MynahUI-should-render-and-remove-dismissible-cards-1.png +0 -0
  168. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-buttons-on-cards-correctly/Open-MynahUI-should-render-buttons-on-cards-correctly-1.png +0 -0
  169. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-buttons-on-cards-correctly/Open-MynahUI-should-render-buttons-on-cards-correctly-2.png +0 -0
  170. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-card-headers-correctly/Open-MynahUI-should-render-card-headers-correctly-1.png +0 -0
  171. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-card-headers-correctly/Open-MynahUI-should-render-card-headers-correctly-2.png +0 -0
  172. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-card-headers-correctly/Open-MynahUI-should-render-card-headers-correctly-3.png +0 -0
  173. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-character-limit-counter/Open-MynahUI-should-render-character-limit-counter-1.png +0 -0
  174. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-custom-icons-correctly/Open-MynahUI-should-render-custom-icons-correctly-1.png +0 -0
  175. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-custom-icons-correctly/Open-MynahUI-should-render-custom-icons-correctly-2.png +0 -0
  176. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-information-cards-correctly/Open-MynahUI-should-render-information-cards-correctly-1.png +0 -0
  177. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-initial-data/Open-MynahUI-should-render-initial-data-1.png +0 -0
  178. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-muted-cards-correctly/Open-MynahUI-should-render-muted-cards-correctly-1.png +0 -0
  179. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-muted-cards-correctly/Open-MynahUI-should-render-muted-cards-correctly-2.png +0 -0
  180. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-new-card-when-followup-click/Open-MynahUI-should-render-new-card-when-followup-click-1.png +0 -0
  181. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-tabbed-cards-correctly/Open-MynahUI-should-render-tabbed-cards-correctly-1.png +0 -0
  182. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-tabbed-cards-correctly/Open-MynahUI-should-render-tabbed-cards-correctly-2.png +0 -0
  183. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-user-prompt/Open-MynahUI-should-render-user-prompt-1.png +0 -0
  184. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-welcome-structure/Open-MynahUI-should-render-welcome-structure-1.png +0 -0
  185. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-render-welcome-structure/Open-MynahUI-should-render-welcome-structure-2.png +0 -0
  186. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover-1.png +0 -0
  187. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover-2.png +0 -0
  188. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover/Open-MynahUI-should-show-link-preview-in-tooltip-on-link-hover-3.png +0 -0
  189. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-show-progress-indicator/Open-MynahUI-should-show-progress-indicator-1.png +0 -0
  190. package/ui-tests/__snapshots__/webkit/Open-MynahUI-should-show-prompt-options/Open-MynahUI-should-show-prompt-options-1.png +0 -0
  191. package/ui-tests/package.json +10 -11
  192. package/ui-tests/playwright.config.ts +35 -0
  193. package/ui-tests/jest.chromium.config.js +0 -22
  194. package/ui-tests/jest.config.js +0 -22
  195. package/ui-tests/jest.webkit.config.js +0 -22
  196. package/ui-tests/run-browser-tests.ts +0 -30
  197. package/ui-tests/test-results/.last-run.json +0 -4
package/dist/static.d.ts CHANGED
@@ -81,6 +81,18 @@ export interface MynahUIDataModel {
81
81
  * Placeholder to be shown on prompt input
82
82
  */
83
83
  promptInputPlaceholder?: string;
84
+ /**
85
+ * Title to be shown on prompt top bar
86
+ */
87
+ promptTopBarTitle?: string;
88
+ /**
89
+ * Items to be pinned in prompt top bar
90
+ */
91
+ promptTopBarContextItems?: QuickActionCommand[];
92
+ /**
93
+ * Button to display at end of prompt top bar
94
+ */
95
+ promptTopBarButton?: ChatItemButton | null;
84
96
  /**
85
97
  * Prompt input text
86
98
  */
@@ -200,7 +212,11 @@ export declare enum MynahEventNames {
200
212
  TAB_BAR_BUTTON_CLICK = "tabBarButtonClick",
201
213
  PROMPT_PROGRESS_ACTION_CLICK = "promptProgressActionClick",
202
214
  ROOT_RESIZE = "rootResize",
203
- CONTEXT_SELECTED = "contextSelected"
215
+ CONTEXT_SELECTED = "contextSelected",
216
+ TOP_BAR_ITEM_ADD = "promptInputTopBarItemAdd",
217
+ TOP_BAR_ITEM_REMOVE = "promptInputTopBarItemRemove",
218
+ TOP_BAR_BUTTON_CLICK = "promptInputTopBarButtonClick",
219
+ CONTEXT_PINNED = "contextPinned"
204
220
  }
205
221
  export declare enum MynahPortalNames {
206
222
  WRAPPER = "wrapper",
@@ -261,6 +277,7 @@ export interface DetailedListItemGroup {
261
277
  actions?: Action[];
262
278
  icon?: MynahIcons | MynahIconsType;
263
279
  children?: DetailedListItem[];
280
+ childrenIndented?: boolean;
264
281
  }
265
282
  export interface DetailedListItem {
266
283
  title?: string;
package/docs/DATAMODEL.md CHANGED
@@ -573,6 +573,92 @@ mynahUI.updateStore('tab-1', {
573
573
  <img src="./img/data-model/tabStore/promptInputPlaceholder.png" alt="mainTitle" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
574
574
  </p>
575
575
 
576
+ ---
577
+ ### `promptTopBarTitle` (default: `''`)
578
+
579
+ This is the title displayed in the prompt top bar. When set, it enables a top bar that can be used for pinned context items.
580
+
581
+ ```typescript
582
+ const mynahUI = new MynahUI({
583
+ tabs: {
584
+ 'tab-1': {
585
+ ...
586
+ }
587
+ }
588
+ });
589
+
590
+ mynahUI.updateStore('tab-1', {
591
+ promptTopBarTitle: '@Pin Context'
592
+ })
593
+ ```
594
+
595
+ <p align="center">
596
+ <img src="./img/data-model/tabStore/promptTopBarTitle.png" alt="prompt top bar title" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
597
+ </p>
598
+
599
+ ---
600
+
601
+ ### `promptTopBarContextItems` (default: `[]`)
602
+
603
+ These are the context items pinned to the prompt top bar. They appear as pills that can be removed by the user. Top bar only appears when `promptTopBarTitle` is not empty.
604
+
605
+ ```typescript
606
+ const mynahUI = new MynahUI({
607
+ tabs: {
608
+ 'tab-1': {
609
+ ...
610
+ }
611
+ }
612
+ });
613
+
614
+ mynahUI.updateStore('tab-1', {
615
+ promptTopBarContextItems: [
616
+ {
617
+ command: 'ex-dom.ts',
618
+ icon: MynahIcons.FILE,
619
+ description: '.src/helper'
620
+ },
621
+ {
622
+ command: 'main',
623
+ icon: MynahIcons.FOLDER,
624
+ description: '.src/'
625
+ }
626
+ ]
627
+ })
628
+ ```
629
+
630
+ <p align="center">
631
+ <img src="./img/data-model/tabStore/promptTopBarContextItems.png" alt="prompt top bar context items" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
632
+ </p>
633
+
634
+ ---
635
+
636
+ ### `promptTopBarButton` (default: `null`)
637
+
638
+ This is a button displayed at the end of the prompt top bar. Clicking on the button will call onPromptTopBarButtonClick(). Button only appears when `promptTopBarTitle` is not empty.
639
+
640
+ ```typescript
641
+ const mynahUI = new MynahUI({
642
+ tabs: {
643
+ 'tab-1': {
644
+ ...
645
+ }
646
+ }
647
+ });
648
+
649
+ mynahUI.updateStore('tab-1', {
650
+ promptTopBarButton: {
651
+ id: 'project-rules',
652
+ icon: MynahIcons.CHECK_LIST,
653
+ text: 'Rules'
654
+ }
655
+ })
656
+ ```
657
+
658
+ <p align="center">
659
+ <img src="./img/data-model/tabStore/promptTopBarButton.png" alt="prompt top bar button" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
660
+ </p>
661
+
576
662
  ---
577
663
 
578
664
  ### `promptInputText` (default: `''`)
package/docs/DEVELOPER.md CHANGED
@@ -487,8 +487,9 @@ You've created an actuall and usable component. To remind you again about what i
487
487
  - Never create doms other with methods than `DomBuilder`
488
488
  - Use `MynahUITabsStore` data store carefully, do not duplicate anything and never use it for non tab or chat content related things.
489
489
  - Always clearly define your types
490
- - **Tests**
490
+ - **Tests (see `TESTING.MD`)**
491
491
  - Add your unit tests to check the basic functionality of it works or not
492
+ - Add E2E tests to test the user flows
492
493
  - **Documentation**
493
494
  - Each change on `mynah-ui` has to go into the related documentation if it adds/changes/removes anything exposed.
494
495
 
@@ -177,6 +177,18 @@ export interface MynahUIProps {
177
177
  onSplashLoaderActionClick?: (
178
178
  action: Action,
179
179
  eventId?: string) => void;
180
+ onPromptTopBarItemAdded?: (
181
+ tabId: string,
182
+ topBarItem: ChatItemButton,
183
+ eventId?: string) => void;
184
+ onPromptTopBarItemRemoved?: (
185
+ tabId: string,
186
+ topBarItemId: string,
187
+ eventId?: string) => void;
188
+ onPromptTopBarButtonClick?: (
189
+ tabId: string,
190
+ topBarButton: ChatItemButton,
191
+ eventId?: string) => void;
180
192
  }
181
193
  ```
182
194
  _Let's deep dive into each property you can set._
@@ -1158,9 +1170,6 @@ This event will be fired when user clicks to an action inside the splash loader.
1158
1170
 
1159
1171
  ```typescript
1160
1172
  ...
1161
- onSplashLoaderActionClick?: (
1162
- action: Action,
1163
- eventId?: string) => void;
1164
1173
  onSplashLoaderActionClick?: (
1165
1174
  action: Action,
1166
1175
  eventId?: string)):void => {
@@ -1168,3 +1177,59 @@ onSplashLoaderActionClick?: (
1168
1177
  };
1169
1178
  ...
1170
1179
  ```
1180
+
1181
+ ---
1182
+
1183
+ ### onPromptTopBarItemAdded
1184
+
1185
+ This event will be fired when a new item is added to the prompt top bar. It passes the `tabId`, the added `topBarItem` object, and the `eventId`.
1186
+
1187
+ ```typescript
1188
+ ...
1189
+ onPromptTopBarItemAdded?: (
1190
+ tabId: string,
1191
+ topBarItem: ChatItemButton,
1192
+ eventId?: string):void => {
1193
+ console.log(`Top bar item added to tab: ${tabId}`);
1194
+ console.log(`Item ID: ${topBarItem.id}`);
1195
+ console.log(`Item text: ${topBarItem.text}`);
1196
+ };
1197
+ ...
1198
+ ```
1199
+
1200
+ ---
1201
+
1202
+ ### onPromptTopBarItemRemoved
1203
+
1204
+ This event will be fired when an item is removed from the prompt top bar. It passes the `tabId`, the `topBarItemId` of the removed item, and the `eventId`.
1205
+
1206
+ ```typescript
1207
+ ...
1208
+ onPromptTopBarItemRemoved?: (
1209
+ tabId: string,
1210
+ topBarItemId: string,
1211
+ eventId?: string):void => {
1212
+ console.log(`Top bar item removed from tab: ${tabId}`);
1213
+ console.log(`Removed item ID: ${topBarItemId}`);
1214
+ };
1215
+ ...
1216
+ ```
1217
+
1218
+ ---
1219
+
1220
+ ### onPromptTopBarButtonClick
1221
+
1222
+ This event will be fired when a user clicks on a button in the prompt top bar. It passes the `tabId`, the clicked `topBarButton` object, and the `eventId`.
1223
+
1224
+ ```typescript
1225
+ ...
1226
+ onPromptTopBarButtonClick?: (
1227
+ tabId: string,
1228
+ topBarButton: ChatItemButton,
1229
+ eventId?: string):void => {
1230
+ console.log(`Top bar button clicked on tab: ${tabId}`);
1231
+ console.log(`Button ID: ${topBarButton.id}`);
1232
+ console.log(`Button text: ${topBarButton.text}`);
1233
+ };
1234
+ ...
1235
+ ```
@@ -0,0 +1,73 @@
1
+ # Testing MynahUI
2
+ To ensure both visual and logical correctness in MynahUI, we have implemented two types of tests:
3
+
4
+ ## 1. Unit tests (Jest)
5
+ We use the Jest library for unit testing. These test individual components and smaller parts of the whole system. You can run the unit tests using `npm run tests:unit`. We currently have tests for:
6
+ * The main MynahUI (in `src/__test__/main.spec.ts`)
7
+ * And the components of MynahUI (in `src/components/__test__`)
8
+
9
+ The `tests:unit` script also generates a `/coverage` folder in the root of the workspace, which includes an Istanbul coverage report. The current coverage at the time of writing is only around 51%, so there is definitely room for improvement.
10
+
11
+ ## 2. E2E tests (Playwright)
12
+ Testing the full system from start to finish, simulating real user scenarios. We use Playwright for E2E testing, specifically visual regression testing with snapshots.
13
+
14
+ Currently, (at the time of writing) there are **58** tests, running on both *Chromium* and *Webkit*, so **116** tests in total.
15
+
16
+ All of these tests are defined in `ui-tests/__test__/main.spec.ts`, and their specific flows can be found under `ui-tests/__test__/flows/`.
17
+
18
+ ### Adding a new E2E test
19
+ Adding a new test here is as simple as adding a new `test()` call in the `main.spec.ts`, e.g.:
20
+
21
+ ```typescript
22
+ test('should do something', async ({ page }) => {
23
+ await testSomething(page);
24
+ });
25
+ ```
26
+
27
+ A new test flow should then be added to `ui-tests/__test__/flows/`. A basic flow looks something like this:
28
+
29
+ ```typescript
30
+ export const testSomething = async (page: Page, skipScreenshots?: boolean): Promise<void> => {
31
+ if (skipScreenshots !== true) {
32
+ expect(await page.screenshot()).toMatchSnapshot();
33
+ }
34
+ };
35
+ ```
36
+
37
+ ### Running E2E tests
38
+ Running the E2E tests has to be done in a Dockerized environment, otherwise generated snapshots might slightly differ based on the environment (e.g. OS) in which they were generated. This means that having Docker desktop installed is a requirement for running the E2E tests.
39
+
40
+ Simply run all the e2e tests through the command `npm run tests:e2e`. Under the hood, this will run:
41
+ `npm run docker:clean && npm run docker:build && npm run docker:run`.
42
+
43
+ To specifically run only the chromium or webkit tests, you can use the `npm run tests:e2e:chromium` and `npm run tests:e2e:webkit` commands.
44
+
45
+ ### Extracting results & updating snapshots
46
+ To extract the results from the Docker container, you should run `npm run docker:extract`. This will add a results folder to `ui-tests/__results__`. This folder contains the following:
47
+
48
+ ```python
49
+ __results__:
50
+
51
+ __reports__: # Reports of failed tests
52
+ ...
53
+ junit.xml # JUnit report of the test results, to be used by the GitHub test reporter
54
+ .last-run.json # JSON formatted overview of the final status and an array of failed test IDs
55
+
56
+ __snapshots__ # All snapshots that were used to run the tests
57
+ chromium: # All the chromium snapshots, with subfolders for each test
58
+ webkit: # All the webkit snapshots, with subfolders for each test
59
+ ```
60
+
61
+ In case of any failed tests, the __reports__ directory will contain a subfolder for each of these failed tests, e.g.:
62
+ ```python
63
+ main-Open-MynahUI-Feedback-form-should-cancel-feedback-form-chromium:
64
+ snapshot-actual.png # the real output
65
+ snapshot-diff.png # the differing pixels between actual and expected
66
+ snapshot-expected.png # the expected output (= the provided golden snapshot)
67
+ error-context.md # some context on why the test failed
68
+ trace.zip # the traces, usable on the Playwright Trace Viewer website
69
+ ```
70
+
71
+ The `error-context.md` will provide some context about why the test failed. Additionally, the `trace.zip` can be used on https://trace.playwright.dev/ to visually watch back the test’s execution and see what went wrong.
72
+
73
+ In case you now want any golden snapshot to be updated, you should take the `snapshot-actual.png` from this folder and replace the one in `ui-tests/__snapshots__/*THE_TEST'S_FOLDER*` with the new (actual) one. This process is slightly tedious on purpose, with the goal of encouraging extra carefulness when updating the golden snapshots.
package/docs/USAGE.md CHANGED
@@ -621,4 +621,61 @@ You can use this method to tear down the existing Mynah UI state. This is useful
621
621
 
622
622
  ```typescript
623
623
  mynahUI.destroy();
624
- ```
624
+ ```
625
+
626
+ ---
627
+
628
+ # Opening a Top Bar Button Overlay (`openTopBarButtonOverlay`)
629
+
630
+ You can programmatically open an overlay for a top bar button using the `openTopBarButtonOverlay` function. This is useful when you want to display a detailed list or other content associated with a specific top bar button.
631
+
632
+ ```typescript
633
+ mynahUI.openTopBarButtonOverlay(
634
+ tabId, // The ID of the tab containing the top bar button
635
+ topBarButtonId, // The ID of the top bar button to open the overlay for
636
+ {
637
+ topBarButtonOverlay: {
638
+ // DetailedList configuration for the overlay content
639
+ list: [
640
+ {
641
+ groupName: 'Group 1',
642
+ children: [
643
+ {
644
+ title: 'Item 1',
645
+ description: 'Description for item 1'
646
+ },
647
+ {
648
+ title: 'Item 2',
649
+ description: 'Description for item 2'
650
+ }
651
+ ]
652
+ }
653
+ ],
654
+ selectable: 'clickable'
655
+ },
656
+ events: {
657
+ onGroupClick: (groupName) => {
658
+ console.log(`Group clicked: ${groupName}`);
659
+ },
660
+ onItemClick: (detailedListItem) => {
661
+ console.log(`Item clicked: ${detailedListItem.title}`);
662
+ },
663
+ onKeyPress: (e) => {
664
+ // Handle keyboard events
665
+ if (e.key === 'Escape') {
666
+ // Close the overlay
667
+ }
668
+ },
669
+ onClose: () => {
670
+ console.log('Overlay closed');
671
+ }
672
+ }
673
+ }
674
+ );
675
+ ```
676
+
677
+ The overlay will appear positioned relative to the specified top bar button, displaying the detailed list content you've provided. Users can interact with the items in the list, and you can handle these interactions through the event callbacks.
678
+
679
+ <p align="center">
680
+ <img src="./img/topBarButtonOverlay.png" alt="Top Bar Button Overlay" style="max-width:500px; width:100%;border: 1px solid #e0e0e0;">
681
+ </p>
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "4.35.3",
4
+ "version": "4.35.4",
5
5
  "description": "AWS Toolkit VSCode and Intellij IDE Extension Mynah UI",
6
6
  "publisher": "Amazon Web Services",
7
7
  "license": "Apache License 2.0",
@@ -27,10 +27,17 @@
27
27
  "lint": "npx eslint \"./**\"",
28
28
  "format:check": "npx prettier --check .",
29
29
  "format:write": "npx prettier --write .",
30
- "tests:unit": "jest",
31
- "tests:e2e": "cd ./ui-tests && npm install && npm run prepare && npm run e2e",
32
- "tests:e2e:chromium": "cd ./ui-tests && npm install && npm run prepare && BROWSER=chromium ts-node run-browser-tests.ts",
33
- "tests:e2e:webkit": "cd ./ui-tests && npm install && npm run prepare && BROWSER=webkit ts-node run-browser-tests.ts",
30
+ "docker:clean": "docker rm -f mynah-ui-e2e-container || true",
31
+ "docker:build": "docker build -t mynah-ui-e2e -f Dockerfile .",
32
+ "docker:run": "docker run --name mynah-ui-e2e-container mynah-ui-e2e",
33
+ "docker:run:chromium": "docker run -e BROWSER=chromium --name mynah-ui-e2e-container mynah-ui-e2e",
34
+ "docker:run:webkit": "docker run -e BROWSER=webkit --name mynah-ui-e2e-container mynah-ui-e2e",
35
+ "docker:extract": "docker cp mynah-ui-e2e-container:/app/ui-tests/__results__ ./ui-tests/ && docker cp mynah-ui-e2e-container:/app/ui-tests/__snapshots__ ./ui-tests/__results__/__snapshots__",
36
+ "tests:e2e": "npm run docker:clean && npm run docker:build && npm run docker:run",
37
+ "tests:e2e:chromium": "npm run docker:clean && npm run docker:build && npm run docker:run:chromium",
38
+ "tests:e2e:webkit": "npm run docker:clean && npm run docker:build && npm run docker:run:webkit",
39
+ "tests:e2e:trace": "cd ./ui-tests && npm run trace",
40
+ "tests:unit": "jest --collect-coverage",
34
41
  "api-docs": "npx typedoc src/main.ts --out ./api-docs",
35
42
  "api-doc-deploy": "npx typedoc src/main.ts --out ./example/dist/api-doc",
36
43
  "postinstall": "node postinstall.js",