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

Board: Initial checklist support #1672

Merged
merged 29 commits into from
May 11, 2022
Merged

Board: Initial checklist support #1672

merged 29 commits into from
May 11, 2022

Conversation

annano
Copy link
Contributor

@annano annano commented May 6, 2022

No description provided.

annano added 19 commits April 26, 2022 12:48
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
# Conflicts:
#	models/board/src/index.ts
#	plugins/board-resources/src/components/popups/Menu.svelte
#	plugins/board/src/index.ts
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
@annano annano requested review from haiodo, Dvinyanin and BykhovDenis May 6, 2022 06:25
@annano annano linked an issue May 6, 2022 that may be closed by this pull request
annano added 3 commits May 6, 2022 15:41
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
…-support

# Conflicts:
#	plugins/board-resources/src/index.ts
#	plugins/view-resources/src/index.ts
@@ -21,7 +21,7 @@
import IconClose from './icons/Close.svelte'
import plugin from '../plugin'

export let icon: Asset | AnySvelteComponent
Copy link
Member

Choose a reason for hiding this comment

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

What the difference with EditBox if icon become optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted


async function fetchChecklists () {
if (object) {
checklists = await client.findAll(task.class.TodoItem, { space: object.space, attachedTo: object._id })
Copy link
Member

Choose a reason for hiding this comment

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

You should use live query

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

let hovered: Ref<TodoItem> | undefined

async function fetch () {
checklistItems = await client.findAll(task.class.TodoItem, { space: value.space, attachedTo: value._id })
Copy link
Member

Choose a reason for hiding this comment

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

Please use live query

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

return
}
await client.addCollection(task.class.TodoItem, value.space, value._id, value._class, 'items', item)
fetch()
Copy link
Member

Choose a reason for hiding this comment

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

No need to fetch if live query is used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}

client
.findAll(board.class.Card, { todoItems: { $gt: 0 } }, { lookup: { _id: { todoItems: task.class.TodoItem } } })
Copy link
Member

Choose a reason for hiding this comment

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

Please use asynchronous/await function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to liveQuery

annano added 4 commits May 11, 2022 13:18
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
Signed-off-by: Anna No <anna.no@xored.com>
@annano annano requested a review from haiodo May 11, 2022 09:36
@haiodo haiodo merged commit fe109a6 into main May 11, 2022
@haiodo haiodo deleted the ano/initial-checklist-support branch May 11, 2022 17:17
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.

Checklist support
2 participants