Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🙏滚动条增加hover的动作的易用性建议 #2838

Open
5 tasks
xuefeibai opened this issue Jul 29, 2024 · 1 comment
Open
5 tasks

🙏滚动条增加hover的动作的易用性建议 #2838

xuefeibai opened this issue Jul 29, 2024 · 1 comment
Labels
🙏feature request 新需求支持 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复

Comments

@xuefeibai
Copy link

🏷 Version

Package Version
@antv/s2
@antv/s2-react
@antv/s2-vue

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

目前滚动条是只能配置size和hoverSize, 而这两个都是thumbSize滑块宽度, 不能配置trackSize滑道宽度. 在大屏场景下, 一个屏幕上很多图表, 每个图表占的大小不大, 所以滚动条配置size=6, hoverSize=10. 这个6相对来说是很小的, 也就触发hover有点难用, 得小心翼翼的. 因此希望能配置trackSize = 12, 默认滚动条size=6位于垂直滑道右侧, 当鼠标移入滑道时, 触发hover, 此时hoverSize=10, 居中, 两边还有1px的空隙, 这样提高滚动条的易用性. 还有现在滚动条只能在滑块上触发hover, 这是难用的一种实现, 在大数据量的场景, 即滑道的整体高度很小时, 滑块就很小, 想触发hover就更得小心翼翼了, 因此合理的触发hover事件应该是滑块和滑道都能触发.

🏞 What problem does this feature solve

不能配置滚动条滑道宽度, 在大屏情况下一般不会把默认size设太大, 太大的影响美观, 所以都是搭配hoverSize使用的. 而此时触发hover不是很方便, 被限制在了滑块这个小区域上

🧐 Suggest the API

name type default description
trackSize Number 和size一样 滚动条滑道大小
thumbAlign Number 0 0居中, >0居右或居下, <0局左或局上
thumbHoverAlign Number 0 0居中, >0居右或居下, <0局左或局上
以上接口应该都是在trackSize > size hoverSize时才有效
@xuefeibai xuefeibai added the 🙏feature request 新需求支持 label Jul 29, 2024
Copy link
Contributor

你好 @xuefeibai,请编辑你的 issue 标题, 一个言简意赅的 issue 标题可以节省大家的时间, 请不要将标题当做正文, 或者为空。

Hello, @xuefeibai, please edit your issue title. a concise issue title will save everyone time. please do not leave the title as the body or empty.

@xuefeibai xuefeibai changed the title 🙏 🙏滚动条增加hover的动作的易用性建议 Jul 29, 2024
@github-actions github-actions bot added the 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏feature request 新需求支持 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复
Projects
None yet
Development

No branches or pull requests

1 participant