第八轮最小粒度测试:修复CSS选择器/JSX结构不匹配的一整类bug,清理Tinode品牌残留
第八轮改用"读CSS选择器+核对JSX结构"的方式复测全部11章,命中了7轮纯接口测试从未发现的一类 问题——选择器写对了但目标元素的实际DOM结构/className对不上,样式静默失效: - 语音通话最小化胶囊按钮尺寸被同特异度规则覆盖;移动端悬浮通话窗口left/right/width三值同时 生效导致过度约束;来电全屏页认证徽章/姓名标题缺少专属样式覆盖 - 我的收藏-语音卡片三列grid对应实际只有1个子元素,播放器被压缩到卡片左侧一角;链接/记录头部 完全没有基础样式,退化成浏览器默认外观 - 多选模式下"收到的"消息气泡被flex auto-margin一起拖到最右侧;.avatar-box/#send-message-panel 两处逗号断句错误导致后半句选择器丢失祖先限定 - 按住说话悬浮反馈渲染成内联胶囊,而参考图要求的居中悬浮卡片样式其实已经存在(挂在了另一个非 生产demo组件上);批量转发确认框沿用了80%视口高度;audio-player.jsx的playback类点在canvas 上而非包裹层,波形和计时器可能纵向堆叠 - "消息已撤回"占位符误拼了日期分隔条的class而非专属的deleted 品牌清理:浏览器标签页标题、未读数标题更新均硬编码"Tinode";LINK_CONTACT_US等三个链接常量 指向开源Tinode项目自己的域名(联系我们改为跟用户条款/隐私协议一致的toast,不再发起外部mailto)。 以及:空会话丢失.chat-box样式类、青少年模式PIN定位、若干收藏/文件类型展示细节。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
5e173c55e8
commit
d759f67b11
@@ -240,6 +240,10 @@ class AudioPlayer extends React.PureComponent {
|
||||
this.audioPlayer.pause();
|
||||
this.setState({playing: false});
|
||||
} else if (this.audioPlayer.readyState >= 2) {
|
||||
if (activeAudioPlayer && activeAudioPlayer !== this) {
|
||||
activeAudioPlayer.pauseForOtherPlayer();
|
||||
}
|
||||
activeAudioPlayer = this;
|
||||
this.audioPlayer.play();
|
||||
this.setState({playing: true}, this.visualize);
|
||||
// 4.9 语音未读红点:唯一一个知道"用户真的点了播放"这一刻的地方——上层只知道会话/消息本身
|
||||
@@ -284,7 +288,7 @@ class AudioPlayer extends React.PureComponent {
|
||||
:
|
||||
<>
|
||||
{play}
|
||||
<div>
|
||||
<div className="playback-row">
|
||||
<canvas className="playback" ref={this.canvasRef} onClick={this.handleSeek} />
|
||||
<div className="timer">{this.state.currentTime}/{this.state.duration}</div>
|
||||
</div>
|
||||
|
||||
@@ -424,11 +424,18 @@ class AudioRecorder extends React.PureComponent {
|
||||
// 来驱动"松开发送/上滑取消",不再需要点这几个按钮——holdMode 时换成更贴近参考图的极简样子
|
||||
// (波形+计时+提示文案),录音本身(MediaRecorder/波形可视化)完全不动,只是换了一层展示。
|
||||
if (this.props.holdMode) {
|
||||
// docs/images/内容沟通对话3-语音录音中.png shows a centered floating card (icon + waveform +
|
||||
// hint), not an inline pill docked in the composer row -- reuses .compose-record-overlay,
|
||||
// the position:fixed/centered-card CSS that message-composer-view.jsx's (non-wired, demo-only)
|
||||
// VoiceOverlay already has for this exact look, rather than inventing a second copy of it.
|
||||
// The waveform itself stays the real canvas visualization (real amplitude data via
|
||||
// visualize()), not the demo's static bar list -- only the container and text markup change.
|
||||
return (
|
||||
<div className={'audio audio-hold' + (this.props.cancelling ? ' cancelling' : '')}>
|
||||
<div className={'compose-record-overlay' + (this.props.cancelling ? ' cancel' : '')} role="status">
|
||||
<i className="material-icons">{this.props.cancelling ? 'delete_outline' : 'mic'}</i>
|
||||
{this.state.recording ? <canvas ref={this.canvasRef} /> : null}
|
||||
<div className="duration">{this.state.duration}</div>
|
||||
<div className="audio-hold-hint">{this.props.cancelling ? '松开手指,取消发送' : '手指上滑,取消发送'}</div>
|
||||
<strong>{this.props.cancelling ? '松开手指,取消发送' : '手指上滑,取消发送'}</strong>
|
||||
<small>{this.state.duration}</small>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default class MetaMessage extends React.PureComponent {
|
||||
// 没有处理过这个分支,于是整个组件走到下面的 `return null` —— 撤回一条消息之后时间线上
|
||||
// 什么都不剩,看不出这里曾经有过一条消息。文案复用已有的 message_deleted("消息已删除")。
|
||||
content = <i className="gray">{this.props.deletedText || '消息已删除'}</i>;
|
||||
bubbleClass += ' date';
|
||||
bubbleClass += ' deleted';
|
||||
}
|
||||
|
||||
if (!content) {
|
||||
|
||||
Reference in New Issue
Block a user