Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): name annotation configuration action (#40255)

yyh1e17a55e7920
diff --git a/web/app/components/app/annotation/__tests__/index.spec.tsx b/web/app/components/app/annotation/__tests__/index.spec.tsx
index 0c634092ebc..951a76431ac 100644
--- a/web/app/components/app/annotation/__tests__/index.spec.tsx
+++ b/web/app/components/app/annotation/__tests__/index.spec.tsx
@@ -501,7 +501,9 @@ describe('Annotation', () => {
expect(latestListProps.selectedIds).toEqual([])
- const configButton = document.querySelector('.action-btn') as HTMLButtonElement
+ const configButton = screen.getByRole('button', {
+ name: 'appAnnotation.initSetup.configTitle',
+ })
fireEvent.click(configButton)
expect(await screen.findByTestId('config-modal')).toBeInTheDocument()
diff --git a/web/app/components/app/annotation/index.tsx b/web/app/components/app/annotation/index.tsx
index afb27cdc535..b20d4d92ccf 100644
--- a/web/app/components/app/annotation/index.tsx
+++ b/web/app/components/app/annotation/index.tsx
@@ -202,8 +202,16 @@ const Annotation: FC<Props> = (props) => {
{annotationConfig?.enabled && (
<div className="flex items-center pr-1 pl-1.5">
<div className="mr-1 h-3.5 w-px shrink-0 bg-divider-subtle"></div>
- <ActionButton onClick={() => setIsShowEdit(true)}>
- <RiEqualizer2Line className="size-4 text-text-tertiary" />
+ <ActionButton
+ aria-label={t(($) => $['initSetup.configTitle'], {
+ ns: 'appAnnotation',
+ })}
+ onClick={() => setIsShowEdit(true)}
+ >
+ <RiEqualizer2Line
+ aria-hidden="true"
+ className="size-4 text-text-tertiary"
+ />
</ActionButton>
</div>
)}