Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
b57f817
block api
ButteryCrumpet Jul 27, 2021
600829c
blocks api
ButteryCrumpet Aug 3, 2021
aef05e7
integration action api
ButteryCrumpet Aug 3, 2021
ce0de74
update doc interface
ButteryCrumpet Aug 3, 2021
b299b7c
blocks store
ButteryCrumpet Aug 3, 2021
aa58063
Update new doc button
ButteryCrumpet Aug 3, 2021
bb87be2
new github integration page
ButteryCrumpet Aug 3, 2021
5792b4f
Embed Block View & Form
ButteryCrumpet Aug 3, 2021
1081798
Markdown Block View & Form
ButteryCrumpet Aug 3, 2021
e0a2714
GithubIssue Block View & Form
ButteryCrumpet Aug 3, 2021
1120f31
Table Block View & Form
ButteryCrumpet Aug 3, 2021
b899076
Container Block View & Form
ButteryCrumpet Aug 3, 2021
7440364
Block Tree Nav
ButteryCrumpet Aug 3, 2021
73ebf3b
Block Editor
ButteryCrumpet Aug 3, 2021
84bbba9
bug fix
ButteryCrumpet Aug 3, 2021
8362a21
Remove always displayed canvas title
ButteryCrumpet Aug 4, 2021
4f0d8af
full screen embed
ButteryCrumpet Aug 4, 2021
70a4393
\update current block correctly
ButteryCrumpet Aug 4, 2021
45dd6d7
Markdown block improvements
ButteryCrumpet Aug 6, 2021
d3f1333
in flow integration
ButteryCrumpet Aug 10, 2021
fa1d85a
fix select all checkbox being selected when no issues
ButteryCrumpet Aug 10, 2021
cafbcae
get more button
ButteryCrumpet Aug 10, 2021
dac2715
fixed pr links & numbers
ButteryCrumpet Aug 10, 2021
1561527
remove console.logs
ButteryCrumpet Aug 10, 2021
78b0d45
table module
ButteryCrumpet Aug 23, 2021
d3e7024
Editable TextCell
ButteryCrumpet Aug 23, 2021
050a9ec
HyperlinkCell
ButteryCrumpet Aug 23, 2021
c3eb369
Editable DateCell
ButteryCrumpet Aug 23, 2021
37861fa
CheckboxCell
ButteryCrumpet Aug 23, 2021
cc71e7f
Github cells
ButteryCrumpet Aug 23, 2021
cd243b3
Editable BoostUserCell
ButteryCrumpet Aug 23, 2021
9ed579f
string utils
ButteryCrumpet Aug 23, 2021
fc1cb72
Table settings menu
ButteryCrumpet Aug 23, 2021
a755d1f
export only styled user icon
ButteryCrumpet Aug 23, 2021
1864fd1
uuid dep
ButteryCrumpet Aug 23, 2021
7f23ddd
column settings
ButteryCrumpet Aug 23, 2021
4f5f2ef
update table component to use data cells
ButteryCrumpet Aug 23, 2021
b459b32
BoostUserCell min-size
ButteryCrumpet Aug 23, 2021
e46b3dd
include repo in issue data
ButteryCrumpet Aug 24, 2021
5c3fe26
new integration actions
ButteryCrumpet Aug 25, 2021
0f26a98
add integrationId to data
ButteryCrumpet Aug 25, 2021
45be00a
github status changer
ButteryCrumpet Aug 25, 2021
02e23a0
move styling into list component
ButteryCrumpet Aug 25, 2021
94bd6d1
Assignee Cell
ButteryCrumpet Aug 25, 2021
6d3f89e
Label Cell
ButteryCrumpet Aug 25, 2021
5d46218
Use new cell components
ButteryCrumpet Aug 25, 2021
f86c413
api call error handling
ButteryCrumpet Aug 25, 2021
38045a0
fix import path
ButteryCrumpet Aug 25, 2021
3056af8
fix CenteredContainer import path
ButteryCrumpet Aug 25, 2021
56c6665
fix import issues
ButteryCrumpet Aug 25, 2021
04c2a09
move Layouts -> layouts
ButteryCrumpet Aug 25, 2021
f855c1c
disallow prop column data type change
ButteryCrumpet Aug 25, 2021
4270d53
fix broken cells
ButteryCrumpet Aug 25, 2021
3ed1f64
fix missing integration id from label update
ButteryCrumpet Aug 25, 2021
4077257
Move cell components to 'props'
ButteryCrumpet Aug 31, 2021
3cc3be1
empty string handling for prop components
ButteryCrumpet Aug 31, 2021
381cfb6
separate data updater components
ButteryCrumpet Aug 31, 2021
bd54d6e
block prop module
ButteryCrumpet Sep 3, 2021
0c30a85
block prop api hook
ButteryCrumpet Sep 3, 2021
f844a63
table api update
ButteryCrumpet Sep 3, 2021
1df6a54
block table api hook
ButteryCrumpet Sep 3, 2021
3e125e6
Update table component to use new Table Block hook
ButteryCrumpet Sep 3, 2021
c46250a
Issue block to use props
ButteryCrumpet Sep 3, 2021
7030b79
show children in table
ButteryCrumpet Sep 3, 2021
4ca3eab
refactor table view to use new components
ButteryCrumpet Sep 3, 2021
154d3d4
initial
Davy-c Sep 5, 2021
7ef50ca
fix sidenav
Davy-c Sep 5, 2021
ab44be6
fix switches in col settings
Davy-c Sep 5, 2021
cc5bf18
context menu scrolls top by default
Davy-c Sep 5, 2021
47eee67
fix block tree
Davy-c Sep 5, 2021
1760acf
small feedbacks
Davy-c Sep 5, 2021
8bc6192
doc share removal
Davy-c Sep 5, 2021
aeb702f
markdown block edit on creation
Davy-c Sep 6, 2021
17f2497
add prop location
Davy-c Sep 6, 2021
faaa054
kazz/simon feedback
Davy-c Sep 6, 2021
5da1f47
remove the to in naming
Davy-c Sep 6, 2021
b870a10
fix container blocks
Davy-c Sep 6, 2021
e37da1b
fix tables and UI;
Davy-c Sep 6, 2021
9136185
add embed url
Davy-c Sep 6, 2021
8fd0051
fix github issueform
Davy-c Sep 6, 2021
6beba01
fix new doc button
Davy-c Sep 7, 2021
c419417
fix application error page and block tables
Davy-c Sep 7, 2021
a28e4b1
sending map and api changes
Davy-c Sep 7, 2021
a64d45c
cleanup creation dom handler
Davy-c Sep 7, 2021
991a8a7
nested removal
Davy-c Sep 7, 2021
1a9cc13
remove optional nested removal
Davy-c Sep 7, 2021
bec9e70
minor fixes
Davy-c Sep 7, 2021
16d287a
github issue block
Davy-c Sep 7, 2021
9ec3962
block editor view
Davy-c Sep 7, 2021
06f4bb0
CR set duplicate
Davy-c Sep 8, 2021
cb6c9ee
page creation in top level
Davy-c Sep 8, 2021
285ea33
hoverable lines in block nav
Davy-c Sep 8, 2021
028ef33
fix block icon and events
Davy-c Sep 8, 2021
31ea0e2
container changes and add image
Davy-c Sep 8, 2021
3fcdc4e
fixes
Davy-c Sep 8, 2021
d944d72
move back to using uniquely identified columns
ButteryCrumpet Sep 8, 2021
c0553f1
update hook with newer api
ButteryCrumpet Sep 8, 2021
dabe1c6
update ui with newer api
ButteryCrumpet Sep 8, 2021
59c0126
remove unused imports
ButteryCrumpet Sep 8, 2021
6991c5a
handle block events
ButteryCrumpet Sep 8, 2021
f7df9b2
data type number + focus new doc input
Davy-c Sep 8, 2021
44a9714
remove remnants
Davy-c Sep 8, 2021
bd7c803
remove log
Davy-c Sep 8, 2021
2b8363d
maxheight for integration splash art
Davy-c Sep 8, 2021
7640c16
fix embed naming
Davy-c Sep 9, 2021
dd3cf8f
fix naming of canvas
Davy-c Sep 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"@types/react-select": "^4.0.11",
"@types/shortid": "0.0.29",
"@types/terser-webpack-plugin": "^2.2.0",
"@types/uuid": "^8.3.1",
"@types/uuid-parse": "^1.0.0",
"@types/webpack": "^4.41.24",
"@types/webpack-dev-server": "^3.1.7",
Expand Down Expand Up @@ -212,6 +213,7 @@
"unified": "^9.1.0",
"unist-util-visit": "^2.0.3",
"use-force-update": "^1.0.7",
"uuid": "^3.4.0",
"webpack-bundle-analyzer": "^4.4.2",
"y-codemirror": "^2.0.9",
"y-websocket": "^1.3.9",
Expand Down
74 changes: 74 additions & 0 deletions src/cloud/api/blocks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { callApi } from '../../lib/client'

interface BlockType<T, D, C extends BlockType<any, any, any> = never> {
type: T
id: string
name: string
children: C[]
data: D
createdAt: string
}

export type MarkdownBlock = BlockType<'markdown', null>
export type EmbedBlock = BlockType<'embed', { url: string }>
export type GithubIssueBlock = BlockType<
'github.issue',
any,
MarkdownBlock | EmbedBlock | TableBlock | ContainerBlock
>
export type TableBlock = BlockType<
'table',
{ columns: Record<string, string> },
GithubIssueBlock
>
export type ContainerBlock = BlockType<
'container',
null,
MarkdownBlock | EmbedBlock | TableBlock | ContainerBlock
>

export type Block =
| MarkdownBlock
| EmbedBlock
| TableBlock
| ContainerBlock
| GithubIssueBlock

export async function getBlockTree(rootBlock: string): Promise<Block> {
const { block } = await callApi(`api/blocks/${rootBlock}`, {
search: { tree: true },
})

return block
}

export type BlockCreateRequestBody = Omit<Block, 'id' | 'createdAt'>
export async function createBlock(
body: BlockCreateRequestBody,
parent: string
): Promise<Block> {
const { block } = await callApi(`api/blocks`, {
method: 'post',
json: { ...body, parent },
})

return block
}

export type BlockUpdateRequestBody = { id: string; type: string } & Partial<
Block
>
export async function updateBlock(
body: BlockUpdateRequestBody
): Promise<Block> {
const { block } = await callApi(`api/blocks/${body.id}`, {
method: 'put',
json: body,
})

return block
}

export async function deleteBlock(id: string) {
await callApi(`api/blocks/${id}`, { method: 'delete' })
}
53 changes: 53 additions & 0 deletions src/cloud/api/integrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,56 @@ export async function deleteTeamIntegration(
) {
return callApi(`api/integrations/${integration.id}`, { method: 'delete' })
}

export interface IntegrationActionTypes {
['orgs:list']: {
id: string
login: string
}[]
['org:repos']: {
id: string
name: string
owner: {
login: string
}
}[]
['repo:pulls']: any[]
['repo:issues']: any[]
['repo:labels']: {
id: number
name: string
color: string
description: string
}[]
['repo:collaborators']: { id: number; avatar_url: string; login: string }[]
}

export async function getAction<A extends keyof IntegrationActionTypes>(
integration: Pick<SerializedTeamIntegration, 'id'>,
action: A,
args?: Record<string, any>
): Promise<IntegrationActionTypes[A]> {
const { data } = await callApi(`/api/integrations/${integration.id}/action`, {
search: { action, ...args },
})
return data
}

export interface IntegrationPostActionTypes {
['issue:assign']: any
['issue:update']: any
}

export async function postAction<A extends keyof IntegrationPostActionTypes>(
integration: Pick<SerializedTeamIntegration, 'id'>,
action: A,
args?: Record<string, any>,
body?: any
): Promise<IntegrationPostActionTypes[A]> {
const { data } = await callApi(`/api/integrations/${integration.id}/action`, {
search: { action, ...args },
json: body,
method: 'post',
})
return data
}
1 change: 1 addition & 0 deletions src/cloud/api/teams/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface CreateDocRequestBody {
template?: string
title?: string
emoji?: string
blocks?: boolean
}

export interface CreateDocResponseBody {
Expand Down
Loading