dream-num / univer

Univer is an Isomorphic Full-Stack Framework for Creating and Editing Spreadsheets, Docs, and Slides Across Web and Server
https://univer.ai
Apache License 2.0
7.03k stars 615 forks source link

[Feature] Format painter for conditional styles #3926

Open lzjpp opened 5 days ago

lzjpp commented 5 days ago

Initial checklist

Problem

现状

  1. 表格数据配置条件格式后,支持使用格式刷复制“条件样式”到其他单元格
  2. 目前的实现逻辑,为在原有的条件样式规则中,追加“应用范围” image

区别

  1. wps、excel的实现逻辑,为复制一条新的条件样式规则,应用范围不同 image

应用场景

  1. univer目前条件样式支持多种类型的样式类型,如图 image
    • 其中,大部分按现状的实现逻辑没有问题,但:
  2. “最前/最后/平均值”这个样式类型的使用场景不对
    • 现状:格式刷复制后,是指所有选择数据范围下判断前3高亮展示。见下图1
    • 期望:实际应用场景,是希望复制前后的数据范围,分别判断前3高亮展示。见下图2

image image

univer-bot[bot] commented 5 days ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿

Origin Title: [Feature] 条件样式的格式刷

Title: [Feature] Format painter for conditional styles


Initial checklist

Problem

status quo

  1. After configuring conditional formatting on table data, you can use the format painter to copy the "conditional style" to other cells.
  2. The current implementation logic is to add "application scope" to the original conditional style rules. image

the difference

  1. The implementation logic of wps and excel is to copy a new conditional style rule, and the application scope is different. image

Application scenarios

  1. Univer currently supports multiple types of conditional styles, as shown in the figure image
    • Most of them have no problem with the current implementation logic, but:
  2. The usage scenario of the style type "First/Last/Average" is wrong.
    • Current status: After Format Painter copies, the top 3 highlighted items in all selected data ranges are displayed. See Figure 1 below
    • Expectation: The actual application scenario is to hope that the data range before and after copying will be judged and highlighted respectively. See Figure 2 below

image image