Repository navigation
fix: 对齐计算/对比按钮并强制补齐对比数据 - #5
Merged
Merged
Conversation
- Move the 27px offset from .primary-button to .action-row and stretch both buttons so 计算我的训练区间 and 对比三种方法 share one baseline. - Remove the four prefilled values (age/max HR/resting HR/LTHR) and use placeholders instead. - Add missingComparisonFields and block comparison until age, max HR, resting HR and LTHR are all provided; reveal every input group so the missing fields can actually be filled. - Cover alignment, default removal and missing-data prompting in tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
需求
变更
styles.css:.action-row统一margin-top:27px与align-items:stretch,.primary-button改为margin-top:0,两个按钮同一基线且等高。index.html: 移除年龄/最大心率/静息心率/乳酸阈值心率四项默认值,改为 placeholder。calculations.mjs: 新增missingComparisonFields,统一判定对比所需字段。app.js: 对比前校验四项数据;缺失时提示“请先填写…”,展开全部输入组并阻止渲染,避免用默认值对比。tests/: 新增按钮对齐、默认值移除、缺失字段提示、输入面板展开覆盖。验证
node --check app.js/node --check calculations.mjs通过npm test→ 18/18 通过(0 失败)说明
仓库未配置 Pipeline;目标分支
main。