fix: adjust alert tooltip target in authentication UI#2905
Conversation
Changed the target property of D.AlertToolTip from 'textInputBackground' to 'layout' in authenticationMain.qml. This ensures the alert tooltip is properly positioned relative to the layout container instead of the text input background, improving visual alignment and user experience. Log: Fixed alert tooltip positioning in authentication interface Influence: 1. Verify alert tooltips appear correctly positioned near the layout container 2. Test authentication flow to ensure tooltips display properly during validation errors 3. Check visual alignment of tooltips with form elements 4. Confirm tooltip timeout functionality still works correctly fix: 调整认证界面中警告提示框的目标元素 将 authenticationMain.qml 中 D.AlertToolTip 的 target 属性从 'textInputBackground' 改为 'layout'。这确保了警告提示框相对于布局容器而 不是文本输入背景正确定位,改善了视觉对齐和用户体验。 Log: 修复认证界面中警告提示框的定位问题 Influence: 1. 验证警告提示框是否在布局容器附近正确显示 2. 测试认证流程,确保在验证错误时提示框正常显示 3. 检查提示框与表单元素的视觉对齐 4. 确认提示框超时功能仍然正常工作 PMS: BUG-345651
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the D.AlertToolTip target in the authentication QML UI so tooltips are anchored to the layout container instead of the text input background, improving positioning and alignment during validation errors. Sequence diagram for authentication tooltip targetingsequenceDiagram
actor User
participant LoginForm
participant TextInput
participant LayoutContainer
participant AlertToolTip
User ->> LoginForm: submitCredentials()
LoginForm ->> TextInput: validate()
TextInput -->> LoginForm: validationError
LoginForm ->> AlertToolTip: setMessage(error)
LoginForm ->> AlertToolTip: setTarget(LayoutContainer)
AlertToolTip ->> LayoutContainer: alignToTarget()
AlertToolTip ->> User: displayTooltip()
AlertToolTip ->> AlertToolTip: startTimeout(3000)
AlertToolTip ->> User: hideTooltip()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来分析一下这个diff修改:
a) 可访问性改进: D.AlertToolTip {
id: alert
target: layout
timeout: 3000
visible: false
// 添加可访问性属性
Accessible.role: Accessible.Alert
Accessible.name: text // 确保提示内容可以被屏幕阅读器读取
}b) 动画效果优化: D.AlertToolTip {
id: alert
target: layout
timeout: 3000
visible: false
// 添加淡入淡出效果
Behavior on opacity {
NumberAnimation {
duration: 200
easing.type: Easing.InOutQuad
}
}
}c) 位置控制: D.AlertToolTip {
id: alert
target: layout
timeout: 3000
visible: false
// 更精确的位置控制
x: layout.width - width - 10
y: -height - 5
}
总结: |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, robertkill The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Changed the target property of D.AlertToolTip from 'textInputBackground' to 'layout' in authenticationMain.qml. This ensures the alert tooltip is properly positioned relative to the layout container instead of the text input background, improving visual alignment and user experience.
Log: Fixed alert tooltip positioning in authentication interface
Influence:
fix: 调整认证界面中警告提示框的目标元素
将 authenticationMain.qml 中 D.AlertToolTip 的 target 属性从 'textInputBackground' 改为 'layout'。这确保了警告提示框相对于布局容器而 不是文本输入背景正确定位,改善了视觉对齐和用户体验。
Log: 修复认证界面中警告提示框的定位问题
Influence:
PMS: BUG-345651
Summary by Sourcery
Bug Fixes: