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

feat(blocks): microsheet-block init #8687

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ca3554d
feat(blocks): fork microsheet-block from database-block
Oct 21, 2024
b2ab680
feat(blocks): microsheet-block init
Oct 23, 2024
515d3da
feat(blocks): microsheet-block event init
Oct 23, 2024
8270e64
feat(blocks): microsheet-block feature complete
Nov 6, 2024
38d57e2
feat(blocks): remove kanbanview
Nov 7, 2024
00eea94
Merge branch 'toeverything:master' into feat/microsheet-init
raintoway Nov 7, 2024
afdf487
fix(blocks): microsheet-block remove unsed file and impove the use-ex…
Nov 14, 2024
6ad524f
Merge remote-tracking branch 'origin/master' into feat/microsheet-init
Nov 14, 2024
4a994da
fix(examples): update yarn.lock
Nov 14, 2024
5e8f1c2
chore(examples): upgrade the theme's version to 0.17.0
Nov 14, 2024
7b96258
fix(blocks): remove the console statement
Nov 14, 2024
68a9d9d
Merge remote-tracking branch 'origin/master' into feat/microsheet-init
Nov 15, 2024
91a9175
fix(blocks): cell-block remove the selectBlock
Nov 15, 2024
c4ce493
fix(blocks): micorsheet-block : change the alias
Nov 18, 2024
5a6b0c0
Merge remote-tracking branch 'origin/master' into feat/microsheet-init
Nov 18, 2024
d519d98
fix(blocks): e2e-test: native、slash-menu fit the microsheet-block
Nov 18, 2024
cc15d80
fix(blocks): cell-block remove the command of selectBlock
Nov 18, 2024
eb52c54
Merge branch 'master' into feat/microsheet-init
raintoway Nov 18, 2024
3d1200a
Merge branch 'master' into feat/microsheet-init
raintoway Nov 19, 2024
4a0d09b
Merge branch 'master' into feat/microsheet-init
raintoway Nov 21, 2024
52c98b5
chore(playground): update icon
Nov 21, 2024
dd7be14
Merge remote-tracking branch 'origin/master' into feat/microsheet-init
Nov 21, 2024
ace0d15
Merge branch 'toeverything:master' into feat/microsheet-init
raintoway Nov 29, 2024
b65668b
Merge branch 'master' into feat/microsheet-init
raintoway Dec 2, 2024
25b6d05
Merge remote-tracking branch 'origin/master' into feat/microsheet-init
Dec 17, 2024
b72ee5f
fix(examples): dedupe check
Dec 18, 2024
5e0dc58
fix(page): fix microsheet-block's rich-text's type error
Dec 18, 2024
0d8d561
Merge branch 'master' into feat/microsheet-init
raintoway Dec 18, 2024
5c6749e
Merge branch 'master' into feat/microsheet-init
raintoway Dec 18, 2024
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
2 changes: 1 addition & 1 deletion .vscode/launch.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"request": "launch",
"name": "Debug Playground",
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"url": "http://localhost:5173/starter/?init"
"url": "http://localhost:8001/starter/?init"
}
]
}
14 changes: 13 additions & 1 deletion packages/affine/block-paragraph/src/paragraph-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ export class ParagraphBlockComponent extends CaptionedBlockComponent<
return false;
};

private _isInMicrosheet = () => {
let parent = this.parentElement;
while (parent && parent !== document.body) {
if (parent.tagName.toLowerCase() === 'affine-microsheet') {
return true;
}
parent = parent.parentElement;
}
return false;
};

get attributeRenderer() {
return this.inlineManager.getRenderer();
}
Expand Down Expand Up @@ -132,7 +143,8 @@ export class ParagraphBlockComponent extends CaptionedBlockComponent<
.then(() => {
if (
(this.inlineEditor?.yTextLength ?? 0) > 0 ||
this._isInDatabase()
this._isInDatabase() ||
this._isInMicrosheet()
) {
this._displayPlaceholder.value = false;
return;
Expand Down
Loading
Loading