-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
feat(conditional-format): support conditional format #1681
Conversation
View Deployment
|
operator: IAverageHighlightCell['operator']; | ||
} | ||
// { ranges: [{ startRow: 0, endRow: 10, startColumn: 3, endColumn: 3 }, { startRow: 0, endRow: 10, startColumn: 5, endColumn: 5 }], style: { fs: 30 }, operator: 'greaterThan' }; | ||
export const addAverageCfCommand: ICommand<IAddAverageCfParams> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Command's name should start with a capical letter.
* limitations under the License. | ||
*/ | ||
|
||
import type { IMutation } from '@univerjs/core'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File name should be in kebab case.
value: number; | ||
} | ||
|
||
export enum OPERATION { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name should be more precise.
operator, | ||
style, | ||
} }; | ||
commandService.executeCommand(addConditionalRuleMutation.id, { unitId, subUnitId, rule } as IAddConditionalRuleMutationParams); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should return the result of executing addConditionalRuleMutation
.
}); | ||
} | ||
|
||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return result
subUnitId: string; | ||
rule: IConditionFormatRule; | ||
} | ||
export const addConditionalRuleMutationUndoFactory = (accessor: IAccessor, param: IAddConditionalRuleMutationParams) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Factories' names should start with a capital letter.
@@ -109,7 +109,7 @@ export const ToolbarItem = forwardRef((props: IDisplayMenuItem<IMenuItem>, ref: | |||
|
|||
const { selections } = props as IDisplayMenuItem<IMenuSelectorItem>; | |||
|
|||
const options = selections as IValueOption[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot use hooks with if
logic.
import type { IConditionFormatRule, ITextHighlightCell } from '../models/type'; | ||
|
||
export const SHEET_CONDITION_FORMAT_PLUGIN = 'SHEET_CONDITION_FORMAT_PLUGIN'; | ||
export enum TextOperator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum should have prefix in their names in avoid of conflicting with other features. For examples, auto filter has operators too.
ctx.globalCompositeOperation = 'destination-over'; | ||
Range.foreach(spreadsheetSkeleton.rowColumnSegment, (row, col) => { | ||
const cellData = worksheet.getCell(row, col) as IDataBarCellData; | ||
if (cellData && cellData.dataBar) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return earlier to make the code more readable.
* limitations under the License. | ||
*/ | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two license headers.
b3c5573
to
8dc574d
Compare
8dc574d
to
a1064e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
81abc8b
to
87d80d1
Compare
87d80d1
to
94dc6c1
Compare
94dc6c1
to
871fd06
Compare
No description provided.