DateTimeRangeInput: give the preset list room to breathe

未关闭 适合新手
#147 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

阅读 DateTimeRangeInput 的样式和预设按钮的渲染,尤其是 .uic-date-time-range-input__presets 以及相邻日历列和时间列之间的间距。在 ui-common 中调整预设间距和/或按钮尺寸,使各个使用方中的预设都有一致且充足的空间。预设列表的间距与面板其余部分相称时,即为完成。

由索引模型根据 Issue 内容生成。

描述

Problem

The preset list in DateTimeRangeInput's popover is cramped. .uic-date-time-range-input__presets stacks the presets with gap: var(--spacing-1), and each preset is a sm ghost button, so "Last 1 hour", "Last 24 hours" and "Last 7 days" sit almost touching while the calendar and time columns beside them use --spacing-3.

A consumer cannot adjust it: the popover renders in a portal and the component takes no class or style for it, so the only way is to override .uic-date-time-range-input__presets globally, which breaks silently when the class changes.

Expected

The preset column has spacing in proportion to the rest of the panel (a larger gap and/or md preset buttons), decided in ui-common so every consumer gets the same panel.

Context

Reported while adopting DateTimeRangeInput (#140, #145) for Backend.AI WebUI dashboard card periods (lablup/backend.ai-webui#10915), whose presets are Last 1 hour, Last 24 hours and Last 7 days.

主要语言
TypeScript
星标
2
派生
0
平均合并
1 天 1 小时
30 天内合并 PR
36

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lablup/ui-common 的其他 Issue

查看 lablup/ui-common 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。