From e7cdaf27dbd90a18597e07a7caba274f2a064cb9 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Tue, 4 Aug 2026 19:58:51 +0530 Subject: [PATCH] =?UTF-8?q?style(ui):=20fix=20eslint=20warnings=20?= =?UTF-8?q?=E2=80=94=20safe-mechanical=20(sonarjs)=20+=20jsx-a11y=20(waves?= =?UTF-8?q?=201-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wave 1 (sonarjs safe-mechanical): ~73 warnings across 58 files — no-collapsible-if, no-redundant-jump, no-redundant-boolean, prefer-object-literal, no-duplicated-branches, no-identical-functions, no-extra-arguments. Behavior preserved; risky cross-scope no-identical-functions extractions skipped. Wave 2 (jsx-a11y): 446 warnings across ~220 files — control-has-associated-label, click-events-have-key-events, no-static-element-interactions, label-has-for, no-autofocus, interactive-supports-focus, anchor rules, alt-text, etc. Fixes reuse existing i18n keys (no new hardcoded strings); genuine rule-vs-rule conflicts and unsafe react-flow/drag cases left as documented skips. Verified per wave: per-rule warning-count diff + full tsc:check against the pre-existing baseline (318 signatures) — no new eslint or type regressions. react-hooks/exhaustive-deps intentionally excluded. Co-Authored-By: Claude Opus 4.8 (1M context) Rebased onto latest main and re-swept 49 violations main introduced after the wave (same behavior-preserving fixes; react-flow/drag and cross-scope identical-functions kept as documented suppressions). Ratchet: promote the cleared rules (all jsx-a11y in the backlog block + safe-mechanical sonarjs) from warn to error in eslint.config.mjs so CI blocks any regression instead of letting the backlog grow back. Team-wide CI policy change — see PR description. --- .../src/main/resources/ui/eslint.config.mjs | 52 ++++++++------- .../CommentCard.component.tsx | 1 + .../ActivityFeedCardNew/CommentCard.test.tsx | 1 + .../ActivityFeedEditor.test.tsx | 1 + .../ActivityFeedEditor/ActivityFeedEditor.tsx | 15 ++--- .../ActivityFeedEditorNew.tsx | 15 ++--- .../FeedEditor/FeedEditor.test.tsx | 6 +- .../TaskFeedCard/TaskFeedCard.component.tsx | 12 +++- .../TeamAndUserSelectItem.tsx | 1 + .../DestinationFormItemV2.test.tsx | 1 + .../DestinationSelectItemV2.test.tsx | 24 ++++--- .../TeamAndUserSelectItemV2.test.tsx | 3 + .../TeamAndUserSelectItemV2.tsx | 7 +- .../components/BlockEditor/BlockEditor.tsx | 1 + .../AttachmentComponents/FileAttachment.tsx | 7 +- .../AttachmentComponents/ImageAttachment.tsx | 1 + .../Extensions/File/FileNodeView.tsx | 16 ++++- .../MathEquation/MathEquationComponent.tsx | 1 + .../BlockEditor/Extensions/focus.ts | 4 -- .../EmbedLinkElement/EmbedLinkElement.tsx | 1 + .../Extensions/slash-command/renderItems.ts | 19 +++--- .../BlockEditor/LinkModal/LinkModal.tsx | 5 +- .../Certification/Certification.component.tsx | 9 +-- .../ContextCenterHeader.test.tsx | 1 + .../CreateFolderModal.component.tsx | 1 + .../CreateFolderModal.test.tsx | 1 + .../CreateMemoryModal.test.tsx | 52 +++++++++------ .../DocumentsView/DocumentsView.test.tsx | 1 + .../MemoriesView/MemoriesView.test.tsx | 9 ++- .../CustomizeTabWidget/CustomizeTabWidget.tsx | 2 + .../AssetSelectionContentBody.test.tsx | 3 +- .../AssetSelectionDrawer.test.tsx | 6 +- .../DataAssetAsyncSelectList.tsx | 26 ++++---- .../DataAssetPickerShell.tsx | 1 + .../ContractDetailFormTab.test.tsx | 11 +++- .../ODCSImportModal/ODCSImportModal.test.tsx | 3 + .../DataInsight/DataInsightSummary.tsx | 2 +- .../DataInsight/EmptyGraphPlaceholder.tsx | 1 + .../DataProductsSelectList.tsx | 26 ++++---- .../ODPSImportModal.component.tsx | 1 + .../components/AddTestSuitePipeline.test.tsx | 14 +++- .../components/ParameterForm.tsx | 1 + .../components/TableDiffFields.tsx | 10 +-- .../components/TestCaseFormDrawer.test.tsx | 2 + .../components/TestCaseSchedulerSection.tsx | 1 + .../AddTestCaseList.component.test.tsx | 1 + .../AddToBundleSuiteModal.test.tsx | 9 ++- .../DataAssetsCoveragePieChartWidget.test.tsx | 2 + .../EntityHealthStatusPieChartWidget.test.tsx | 2 + .../TestCaseStatusPieChartWidget.test.tsx | 3 + .../FailedTestCaseSampleData.component.tsx | 4 -- .../FailedTestCaseSampleData.test.tsx | 2 +- .../IncidentManagerPageHeader.test.tsx | 11 +++- .../Severity/InlineSeverity.test.tsx | 9 ++- .../useTestCaseResultTab.tsx | 4 +- .../InlineTestCaseIncidentStatus.test.tsx | 12 +++- .../TestCaseListTableHeader.test.tsx | 1 + .../DataQuality/TestCases/TestCases.test.tsx | 1 + .../useTestCaseFilterOptions.test.tsx | 2 +- .../TestSuiteList/TestSuiteListPanel.test.tsx | 1 + .../TestSuiteList/TestSuites.test.tsx | 1 + .../ColumnDetailPanel.test.tsx | 4 +- .../DataQualityTab/DataQualityTab.tsx | 10 ++- .../ProfilerObjectFieldTemplate.tsx | 4 +- .../ProfilerSettingsModal.tsx | 1 + .../QualityTab/QualityTab.test.tsx | 6 +- .../TableProfiler/SingleColumnProfile.tsx | 1 + .../TableProfilerChart/TableProfilerChart.tsx | 1 + .../SampleDataWithMessages.tsx | 1 + .../Database/SchemaEditor/CodeEditor.test.tsx | 1 + .../SchemaEditor/SchemaEditor.test.tsx | 1 + .../TableQueries/TableQueries.test.tsx | 7 +- .../Database/TableQueries/TableQueries.tsx | 2 +- .../TableQueryRightPanel.test.tsx | 1 + .../TableVersion/TableVersion.test.tsx | 2 +- .../AddDomainForm/AddDomainForm.test.tsx | 5 +- .../AddDomainFormExtensionFields.test.tsx | 4 +- .../WorksheetColumnsTable.test.tsx | 13 +++- .../AppPipelineModel/AddPipeLineModal.tsx | 11 +++- .../CanvasButtonPopover.component.tsx | 1 + .../CanvasEdgeRenderer.component.tsx | 4 ++ .../EntityLineage/CustomControls.test.tsx | 40 ++++++----- .../Entity/EntityLineage/CustomNode.utils.tsx | 4 ++ .../EntityLineageSidebar.component.tsx | 2 + .../NodeSuggestions.component.tsx | 1 + .../EntityRightPanelVerticalNav.test.tsx | 50 ++++++++------ .../BulkImportVersionSummary.test.tsx | 6 +- .../EntityVersionTimeLine/VersionButton.tsx | 10 ++- .../Task/TaskTab/TaskTabNew.component.tsx | 1 + .../CustomPropertiesSection.test.tsx | 1 + .../CustomPropertiesSection.tsx | 1 + .../DataQualityTab/DataQualityTab.test.tsx | 9 ++- .../LineageTab/LineageTabContent.test.tsx | 1 + .../Explore/QuickFilterDropdown.test.tsx | 5 +- .../Explore/QuickFilterDropdown.tsx | 1 + .../Explore/SortingDropDown.test.tsx | 11 +++- .../ExploreSearchCard/ExploreSearchCard.tsx | 2 - .../components/ExploreV1/ExploreV1.test.tsx | 7 +- .../AddGlossaryTermForm.test.tsx | 13 ++-- .../GlossaryHeader.component.tsx | 1 + .../GlossaryTermTab/GlossaryTermTab.test.tsx | 27 ++++++-- .../WorkFlowTab/WorkflowHistory.component.tsx | 17 ++--- .../GlossaryUpdateConfirmationModal.tsx | 4 -- .../components/Glossary/GlossaryV1.test.tsx | 4 +- .../ImportOntologyModal.test.tsx | 2 +- .../IncidentManager/IncidentManager.test.tsx | 7 +- .../useIncidentFilterOptions.test.ts | 2 +- .../KnowledgePageDetailComponent.tsx | 1 + .../KnowledgePageListComponent.tsx | 1 + .../QuickLinkFormModal.test.tsx | 1 + .../TitleComponent/TitleComponent.tsx | 1 + .../KnowledgeGraph3D.test.tsx | 4 +- .../KnowledgeGraph3DEdgePanel.tsx | 1 + .../StorylaneTour.component.tsx | 1 + .../ResourcePlayer/VideoPlayer.component.tsx | 1 + .../CanvasLayerWrapper.test.tsx | 32 ++++++--- .../src/components/Lineage/Lineage.test.tsx | 1 + .../MlModelDetail/SourceList.component.tsx | 10 ++- .../IconColorModal/IconColorModal.test.tsx | 3 +- .../AddWidgetModal/AddWidgetModal.test.tsx | 26 ++++++-- .../AllWidgetsContent.test.tsx | 1 + .../CustomiseHomeModal/CustomiseHomeModal.tsx | 6 +- .../LandingPageDomainSelector.tsx | 5 ++ .../RecentlyViewedCarousel.tsx | 8 ++- .../PersonaSelectableList.component.test.tsx | 2 + .../AnnouncementsWidgetV1.test.tsx | 1 + .../AdvancedAssetsFilterField.component.tsx | 1 + .../CuratedAssetsModal/CuratedAssetsModal.tsx | 1 + .../DataAssetCard/DataAssetCard.test.tsx | 11 +++- .../TotalDataAssetsWidget.component.tsx | 9 ++- .../TotalDataAssetsWidget.test.tsx | 7 +- .../ui/src/components/NavBar/NavBar.test.tsx | 2 +- .../NotificationFeedCard.test.tsx | 12 +++- .../OntologyExplorer/hooks/useGraphData.ts | 32 +++++---- .../Execution/Execution.component.tsx | 4 +- .../SearchDropdown/SearchDropdown.tsx | 1 + .../TermBoost/TermBoost.test.tsx | 1 + .../components/AgentCard.component.tsx | 3 + .../components/AgentOverflowMenu.test.tsx | 1 + .../AppInstallVerifyCard.component.tsx | 1 + .../Bot/BotListV1/BotListV1.component.tsx | 2 + .../AddCustomProperty.test.tsx | 11 +++- .../Email/TestEmail/TestEmail.component.tsx | 1 + .../AddIngestion/Steps/ScheduleIntervalV1.tsx | 6 ++ .../ServiceNameCard/ServiceNameCard.test.tsx | 3 +- .../ServiceNameCard/ServiceNameCard.tsx | 2 + .../ProfileSampleConfigField.test.tsx | 1 + .../ProfileSampleConfigField.tsx | 2 + .../components/Settings/Services/Services.tsx | 2 +- .../Team/TeamDetails/TeamDetailsV1.tsx | 7 +- .../Team/TeamDetails/TeamHierarchy.test.tsx | 4 +- .../TeamsHeadingLabel.component.tsx | 1 + .../TeamsSelectable/TeamsSelectable.test.tsx | 10 +-- .../Users/CreateUser/CreateUser.component.tsx | 9 ++- .../UserProfileIcon.component.tsx | 10 ++- .../UserProfileTeams.test.tsx | 1 + .../ProviderSelector/ProviderSelector.tsx | 9 ++- .../SSOGroupedFieldTemplate.tsx | 11 +--- .../TagsContainerV2/TagsContainerV2.test.tsx | 5 +- .../Tag/TagsContainerV2/TagsContainerV2.tsx | 2 + .../src/components/Tag/TagsV1/TagsV1.test.tsx | 2 +- .../Tag/TagsViewer/TagsViewer.test.tsx | 3 +- .../TestDefinitionFormBody.tsx | 3 + .../useTestDefinitionListPage.test.ts | 2 +- .../useTestDefinitionRowPermissions.test.ts | 2 +- .../WorkflowBuilder/NodeConfigSidebar.tsx | 2 - .../WorkflowBuilder/StraightEdge.tsx | 1 + .../WorkflowBuilder/common/FormField.test.tsx | 16 +++-- .../ConditionBuilder.test.tsx | 2 + .../forms/MetadataFormSection.test.tsx | 47 +++++++------ .../forms/SchemaBasedNodeForm.test.tsx | 7 +- .../forms/SinkTaskForm.test.tsx | 7 +- .../Nodes/GatewayNode/GatewayNode.tsx | 9 ++- .../AnnouncementItemV3.test.tsx | 1 + .../AnnouncementsWidgetV3Body.test.tsx | 5 +- .../AsyncSelectList/AsyncSelectList.tsx | 27 ++++---- .../AsyncSelectList/TreeAsyncSelectList.tsx | 1 + .../common/BrandImage/BrandImage.tsx | 1 + .../src/components/common/Chip/Chip.test.tsx | 2 +- .../DataQualitySection.test.tsx | 1 + .../common/DisplayName/DisplayName.test.tsx | 1 + .../DomainSelectableTree.tsx | 1 + .../DomainSelectableTreeNew.tsx | 3 +- .../EmptyPlaceholder/CreatePlaceholder.tsx | 7 +- .../EntityDescription/Description.test.tsx | 7 +- .../EntityDetailsSection.test.tsx | 1 + .../ExpressionCodeCell.component.tsx | 1 + .../ExpressionCodeCell.test.tsx | 1 + .../CreateErrorPlaceHolder.tsx | 1 + .../ErrorPlaceHolderES.tsx | 1 + .../FilterErrorPlaceHolder.tsx | 1 + .../common/FilterPattern/FilterPattern.tsx | 5 +- .../FocusTrap/FocusTrapWithContainer.tsx | 3 +- .../JSONSchemaTemplate/ArrayFieldTemplate.tsx | 2 +- .../BooleanFieldTemplate.tsx | 1 + .../ObjectFieldTemplate.tsx | 2 + .../JsonSchemaWidgets/PasswordWidget.tsx | 1 + .../JsonSchemaWidgets/SelectWidget.tsx | 1 + .../fields/CoreArrayField.test.tsx | 1 + .../fields/CoreOneOfField.test.tsx | 2 +- .../templates/FormBuilderV1Templates.test.tsx | 37 +++++++++-- .../FormBuilderV1/widgets/CoreInputWidget.tsx | 1 + .../widgets/CorePasswordWidget.tsx | 2 + .../widgets/CoreTextAreaWidget.tsx | 1 + .../widgets/FormBuilderV1Widgets.test.tsx | 15 ++++- .../GlossaryTermTreeSelect.tsx | 1 + .../common/InlineEdit/InlineEdit.test.tsx | 4 ++ .../KeyDownStopPropagationWrapper.tsx | 4 +- .../LineageSection/LineageSection.test.tsx | 2 +- .../LogViewerModal.component.tsx | 3 + .../OwnerLabel/OwnerLabel.component.tsx | 48 +++++++------- .../RichTextEditor/RichTextEditor.test.tsx | 1 + .../RichTextEditorPreviewNew.tsx | 7 +- .../RichTextEditorPreviewerV1.tsx | 1 + .../TaskDescriptionPreviewer.tsx | 1 + .../SearchBar.component.tsx | 2 +- .../components/common/Table/Table.test.tsx | 18 +++-- .../TableDataCardV2/TableDataCardV2.tsx | 10 ++- .../common/TagButton/TagButton.component.tsx | 10 ++- .../TagSuggestion/TagSuggestion.test.tsx | 6 +- .../common/TagsSection/TagsSection.test.tsx | 1 + .../common/TestConnection/TestConnection.tsx | 1 + .../atoms/navigation/usePageHeader.test.tsx | 2 +- .../LineageProvider/LineageProvider.test.tsx | 1 + .../ui/src/hooks/useAuthenticatedFile.test.ts | 2 +- .../src/hooks/useAuthenticatedImage.test.ts | 2 +- .../ui/src/hooks/useEntityLogs.test.ts | 3 +- .../resources/ui/src/hooks/useFqnDeepLink.ts | 11 ++-- .../ui/src/hooks/useGridEditController.ts | 4 -- .../ui/src/hooks/usePaginatedLiveLog.test.ts | 6 +- .../AuditLogsPage/AuditLogsPage.test.tsx | 2 + .../ColumnGrid/ColumnGrid.component.tsx | 65 +++++++----------- .../ContextCenterMemoriesPage.tsx | 1 + .../CreateUserPage/CreateUserPage.test.tsx | 10 +-- .../CustomizablePage.test.tsx | 2 +- .../DataQuality/DataQualityProvider.test.tsx | 1 + .../EditConnectionFormPage.test.tsx | 1 + .../ui/src/pages/LoginPage/SignInPage.tsx | 1 + .../MetricListPage/MetricListPage.test.tsx | 7 +- .../src/pages/MyDataPage/MyDataPage.test.tsx | 10 +-- .../PersonaDetailsPage.test.tsx | 5 +- .../RolesDetailPage/RolesDetailPage.test.tsx | 2 +- .../SearchIndexFieldsTable.test.tsx | 10 +-- .../SearchIndexFieldsTable.tsx | 6 +- .../ServiceVersionPage.test.tsx | 8 ++- .../pages/SignUp/BasicSignup.component.tsx | 1 + .../ui/src/pages/SignUp/SignUpPage.tsx | 1 + ...ount-activation-confirmation.component.tsx | 11 +++- .../StoredProcedureTab.test.tsx | 4 +- .../TableConstraints/ConstraintIcon.tsx | 2 +- .../TableConstraints/ForeignKeyConstraint.tsx | 1 + .../TableDetailsPageV1/TableDetailsPageV1.tsx | 10 ++- .../ClassificationFormDrawer.test.tsx | 6 +- .../src/pages/TagsPage/TagFormDrawer.test.tsx | 6 +- .../ui/src/pages/TagsPage/TagsForm.test.tsx | 9 ++- .../ui/src/pages/TagsPage/TagsPage.test.tsx | 4 +- .../TaskFormSettingsPage.test.tsx | 1 + .../src/services/WorkflowValidationService.ts | 4 -- .../resources/ui/src/utils/APIUtils.test.js | 13 ++-- .../ui/src/utils/CSV/CSVUtilsClassBase.tsx | 31 +++++++-- .../ui/src/utils/CanvasUtils.test.ts | 1 + .../ui/src/utils/CuratedAssetsPureUtils.ts | 6 +- .../src/utils/DataAssetsHeader.utils.test.tsx | 4 +- .../ui/src/utils/DataAssetsHeader.utils.tsx | 7 +- .../ui/src/utils/DataAssetsHeaderTypeUtils.ts | 7 +- .../utils/DataContract/DataContractUtils.ts | 8 --- .../ui/src/utils/DataInsightChartUtils.tsx | 1 + .../ui/src/utils/DataInsightPureUtils.ts | 2 - .../utils/DataQuality/FormFieldDocs.test.ts | 2 +- .../ui/src/utils/EntityLineageNodeUtils.ts | 16 ++--- .../ui/src/utils/EntityUtilClassBase.ts | 12 +--- .../ui/src/utils/ExploreUtils.test.ts | 2 +- .../ui/src/utils/GlossaryPureUtils.ts | 6 +- .../resources/ui/src/utils/IngestionUtils.tsx | 3 + .../ui/src/utils/IngestionWorkflowUtils.ts | 8 +-- .../resources/ui/src/utils/KeyboardUtil.ts | 23 +++++++ .../QueryBuilderElasticsearchFormatUtils.js | 66 ++++--------------- .../ui/src/utils/ServiceInsightsWidgets.tsx | 3 +- .../resources/ui/src/utils/ServiceUtils.tsx | 10 +-- .../src/utils/Suggestion/SuggestionUtils.tsx | 2 - .../ui/src/utils/TaskEntityFetchUtils.ts | 12 +--- .../main/resources/ui/src/utils/TeamUtils.ts | 2 +- .../ui/src/utils/WorkflowNodeConfigUtils.ts | 23 ++++--- 283 files changed, 1214 insertions(+), 681 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/eslint.config.mjs b/openmetadata-ui/src/main/resources/ui/eslint.config.mjs index 71160c435f5f..6da36d88f4f9 100644 --- a/openmetadata-ui/src/main/resources/ui/eslint.config.mjs +++ b/openmetadata-ui/src/main/resources/ui/eslint.config.mjs @@ -290,33 +290,39 @@ export default [ 'jsx-a11y/no-distracting-elements': 'error', 'jsx-a11y/scope': 'error', + // --- blocking (error): brought to zero by the ESLint-cleanup stack and + // locked so they cannot regress. jsx-a11y + safe-mechanical sonarjs were + // cleared in the a11y/safe-mechanical PR; promoting to error keeps CI red + // on any new violation instead of letting the backlog silently grow back. + 'jsx-a11y/control-has-associated-label': 'error', + 'jsx-a11y/click-events-have-key-events': 'error', + 'jsx-a11y/no-static-element-interactions': 'error', + 'jsx-a11y/label-has-for': 'error', + 'jsx-a11y/no-autofocus': 'error', + 'jsx-a11y/anchor-has-content': 'error', + 'jsx-a11y/no-noninteractive-element-interactions': 'error', + 'jsx-a11y/interactive-supports-focus': 'error', + 'jsx-a11y/anchor-is-valid': 'error', + 'jsx-a11y/alt-text': 'error', + 'jsx-a11y/no-redundant-roles': 'error', + 'jsx-a11y/mouse-events-have-key-events': 'error', + 'jsx-a11y/media-has-caption': 'error', + 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'error', + 'jsx-a11y/anchor-ambiguous-text': 'error', + 'sonarjs/no-collapsible-if': 'error', + 'sonarjs/no-extra-arguments': 'error', + 'sonarjs/no-redundant-jump': 'error', + 'sonarjs/no-duplicated-branches': 'error', + 'sonarjs/no-identical-functions': 'error', + 'sonarjs/prefer-object-literal': 'error', + 'sonarjs/no-redundant-boolean': 'error', + // --- warn tier: on, visible, not yet blocking. Counts are the measured - // backlog at the time of writing; they only go down. + // backlog at the time of writing; they only go down. Each is promoted to + // error by its own cleanup PR once its violations reach zero. 'react-hooks/exhaustive-deps': 'warn', // 1694 across 595 files - 'jsx-a11y/control-has-associated-label': 'warn', // 146 - 'jsx-a11y/click-events-have-key-events': 'warn', // 89 - 'jsx-a11y/no-static-element-interactions': 'warn', // 87 - 'jsx-a11y/label-has-for': 'warn', // 61 - 'jsx-a11y/no-autofocus': 'warn', // 45 - 'jsx-a11y/anchor-has-content': 'warn', // 12 - 'jsx-a11y/no-noninteractive-element-interactions': 'warn', // 8 - 'jsx-a11y/interactive-supports-focus': 'warn', // 7 - 'jsx-a11y/anchor-is-valid': 'warn', // 5 - 'jsx-a11y/alt-text': 'warn', // 3 - 'jsx-a11y/no-redundant-roles': 'warn', // 2 - 'jsx-a11y/mouse-events-have-key-events': 'warn', // 2 - 'jsx-a11y/media-has-caption': 'warn', // 2 - 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn', // 2 - 'jsx-a11y/anchor-ambiguous-text': 'warn', // 1 'sonarjs/no-duplicate-string': 'warn', // 640 'sonarjs/cognitive-complexity': ['warn', 15], // 85 - 'sonarjs/no-collapsible-if': 'warn', // 21 - 'sonarjs/no-extra-arguments': 'warn', // 20 - 'sonarjs/no-redundant-jump': 'warn', // 14 - 'sonarjs/no-duplicated-branches': 'warn', // 9 - 'sonarjs/no-identical-functions': 'warn', // 6 - 'sonarjs/prefer-object-literal': 'warn', // 1 - 'sonarjs/no-redundant-boolean': 'warn', // 1 // Complexity and structure. SonarCloud gates these on new code; these // surface the same findings locally and in the editor. diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx index 6f14d857be46..fe03e196a8df 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.component.tsx @@ -132,6 +132,7 @@ const CommentCard = ({ 'reply-card-border-bottom': !isLastReply, })} data-testid="feed-reply-card" + role="presentation" onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.test.tsx index 258ea30301ec..8bb40e2cd4f9 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedCardNew/CommentCard.test.tsx @@ -67,6 +67,7 @@ jest.mock('../ActivityFeedEditor/ActivityFeedEditorNew', () => { return jest.fn(({ onSave, onTextChange }) => (
onTextChange(e.target.value)} /> diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.test.tsx index 3b0330b3d257..3fdc93dc5f92 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.test.tsx @@ -35,6 +35,7 @@ jest.mock('../FeedEditor/FeedEditor', () => ({
FeedEditor diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.tsx index 1f37773112df..dd28865044f2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/ActivityFeedEditor/ActivityFeedEditor.tsx @@ -70,15 +70,11 @@ const ActivityFeedEditor = forwardRef( }; const onSaveHandler = () => { - if (editorRef.current) { - if (editorRef.current?.getEditorContent()) { - setEditorValue(''); - editorRef.current?.clearEditorContent(); - const message = getBackendFormat( - editorRef.current?.getEditorContent() - ); - onSave && onSave(message); - } + if (editorRef.current && editorRef.current?.getEditorContent()) { + setEditorValue(''); + editorRef.current?.clearEditorContent(); + const message = getBackendFormat(editorRef.current?.getEditorContent()); + onSave && onSave(message); } }; @@ -94,6 +90,7 @@ const ActivityFeedEditor = forwardRef( return (
e.stopPropagation()}> ( }; const onSaveHandler = () => { - if (editorRef.current) { - if (editorRef.current?.getEditorContent()) { - setEditorValue(''); - editorRef.current?.clearEditorContent(); - const message = getBackendFormat( - editorRef.current?.getEditorContent() - ); - onSave && onSave(message); - } + if (editorRef.current && editorRef.current?.getEditorContent()) { + setEditorValue(''); + editorRef.current?.clearEditorContent(); + const message = getBackendFormat(editorRef.current?.getEditorContent()); + onSave && onSave(message); } }; @@ -95,6 +91,7 @@ const ActivityFeedEditor = forwardRef(
e.stopPropagation()}> ({ mockCaptureQuillProps(props); return ( -
+
editor
); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCard.component.tsx index dc8d88a840f9..5211d97f646a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCard.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/TaskFeedCard/TaskFeedCard.component.tsx @@ -222,7 +222,17 @@ const TaskFeedCard = ({
+ role="button" + tabIndex={0} + onClick={!hidePopover ? showReplies : noop} + onKeyDown={(e) => { + if ( + (e.key === 'Enter' || e.key === ' ') && + !hidePopover + ) { + showReplies(); + } + }}> {' '} {postLength} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx index 28a52da6b561..5c8131bd6403 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Alerts/DestinationFormItem/TeamAndUserSelectItem/TeamAndUserSelectItem.tsx @@ -137,6 +137,7 @@ function TeamAndUserSelectItem({ { defaultValue?: string; }) => ( { data-testid={tid} value={value ?? ''} onChange={(e) => onChange?.(e.target.value)}> -