Skip to content

Feat (data): support checklist data format#103

Merged
e11sy merged 3 commits intorelease/2.0from
improve-normalize-data
Nov 5, 2024
Merged

Feat (data): support checklist data format#103
e11sy merged 3 commits intorelease/2.0from
improve-normalize-data

Conversation

@e11sy
Copy link
Copy Markdown
Member

@e11sy e11sy commented Nov 3, 2024

Problem

Checklist data format is not supported for this tool

Solution

Improved normalizeData() method that now checks if data is related to the Checklist tool and converts it to Nested List data

Comment thread src/utils/normalizeData.ts Outdated
* @returns true if data related to the List tool, false otherwise
*/
function instanceOfListData(data: ListData | OldListData): data is OldListData {
function instanceOfListData(data: ListData | OldListData | OldChecklistData): data is OldListData {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function name means checking passed value to be ListData (new). But it checks for the OldListData.

Comment thread src/utils/normalizeData.ts Outdated
* Method that checks if data is related to the List or NestedListTool
* @param data - data of the List or NestedListTool
* @returns true if data related to the List tool, false if to Nested List tool
* Method that checks if data is related to the List Tool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description is unclear

Comment thread src/utils/normalizeData.ts Outdated

/**
* Method that checks if data is related to the Checklist tool
* @param data - data of the Checklist of NestedList tool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param data - data of the Checklist of NestedList tool
* @param data - data of the Checklist or NestedList tool

@e11sy e11sy merged commit 2d84882 into release/2.0 Nov 5, 2024
@e11sy e11sy deleted the improve-normalize-data branch November 5, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants