zzj3720
1ea73456ca
refactor(editor): support virtual scroll for table view of database block ( #11642 )
...
close: BS-3378
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a modular virtualized table view with grouping, selection, drag-and-drop, clipboard support, and batch task management for optimized rendering.
- Added comprehensive keyboard shortcuts, drag-to-fill functionality, and clipboard operations for efficient table editing.
- Enabled dynamic column statistics, number formatting controls, and flexible switching between virtual and standard table views via a feature flag.
- Provided detailed row and group header/footer components with context menus, row management actions, and column reordering/resizing.
- Added a table view selector component to toggle between virtual and standard table views based on feature flags.
- **Style**
- Added extensive styling modules for virtual table elements including headers, footers, rows, cells, and interactive controls.
- **Chores**
- Registered numerous custom elements via modular effect functions to streamline component initialization.
- Updated feature flag system to include virtual table scrolling toggle.
- Added new dependencies to support styling and component functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-29 09:52:08 +00:00
Xun Sun
8ea0d78862
fix(editor): preserve tag name updates on modifying tag color ( #11744 )
2025-04-24 10:09:17 +08:00
Xun Sun
3b4fcbd526
fix(editor): for single-select, picking the original option should make the TagManager disappear ( #11745 )
2025-04-24 10:09:00 +08:00
fundon
67832aab09
chore(editor): update file icons ( #11826 )
2025-04-21 09:18:29 +08:00
forehalo
40f218c898
chore: set base version to 0.21
2025-04-07 16:10:32 +08:00
JimmFly
7a1d5ab252
feat(core): upgrade icons package ( #11435 )
2025-04-04 04:52:49 +00:00
zzj3720
08327b14d6
fix(editor): database block columns popover closes unexpectedly ( #11352 )
...
fix: BS-2906
2025-04-01 10:32:23 +00:00
zzj3720
ab60203849
fix(editor): database block view layout menu style ( #11312 )
...
fix: BS-2950
2025-04-01 08:31:02 +00:00
Saul-Mirone
205cd7a86d
refactor(editor): rename block-std to std ( #11250 )
...
Closes: BS-2946
2025-03-28 07:20:34 +00:00
zzj3720
f2cdf67c2a
refactor(editor): adjust database-block style ( #11219 )
...
close: BS-2904, BS-2905
2025-03-27 10:35:29 +00:00
Flrande
4bacfbd640
feat(editor): support member node ( #11075 )
...
Close [BS-2793](https://linear.app/affine-design/issue/BS-2793/inline-member )
2025-03-24 05:57:03 +00:00
zzj3720
909426c644
fix(editor): database detail panel cannot scroll ( #11080 )
...
fix: BS-1821
2025-03-21 14:11:52 +00:00
zzj3720
dd2e423112
fix(editor): add placeholder for input of database context menu ( #11079 )
...
fix: BS-2594
2025-03-21 12:27:18 +00:00
zzj3720
5dc6fabdaf
refactor(editor): improve border color ( #11077 )
...
close: BS-2781
2025-03-21 11:22:54 +00:00
zzj3720
9986b8b6bc
refactor(editor): adjust tag select component background color ( #11074 )
...
fix: BS-2780
2025-03-21 10:35:27 +00:00
zzj3720
a05d9b7817
fix(editor): remove selection when click New Record button ( #11073 )
...
fix: BS-2847
2025-03-21 10:17:13 +00:00
zzj3720
3939cc1c52
feat(editor): support file column and member column for database block ( #10932 )
...
close: BS-2630, BS-2631, BS-2629, BS-2632, BS-2635
2025-03-18 14:51:45 +00:00
Saul-Mirone
7e6ff8d9c6
chore(editor): remove unused npm scripts ( #10895 )
2025-03-16 17:48:49 +00:00
akumatus
98a3cf8516
feat(core): update blocksuite icons ( #10805 )
2025-03-13 03:55:55 +00:00
zzj3720
f6a62fa737
fix(editor): clicking the sorting button results in an error ( #10800 )
2025-03-13 03:17:48 +00:00
zzj3720
01151ec18f
refactor(editor): add runtime type checks to database cell values ( #10770 )
2025-03-12 09:22:41 +00:00
Mirone
cd63e0ed8b
feat(editor): replace slot with rxjs subject ( #10768 )
2025-03-12 11:29:24 +09:00
zzj3720
77e4b9aa8e
refactor(editor): add schema for value of database block properties ( #10749 )
2025-03-11 02:12:40 +00:00
zzj3720
db707dff7f
refactor(editor): remove edit view of database block properties ( #10748 )
2025-03-10 16:24:44 +00:00
zzj3720
4a45cc9ba4
refactor(editor): implement uni-component in AFFiNE ( #10747 )
2025-03-10 14:23:24 +00:00
Saul-Mirone
84e2dda3f8
refactor(editor): separate lit and slot in global ( #10666 )
2025-03-06 10:24:59 +00:00
Saul-Mirone
7ae9daa6f6
refactor(editor): use lodash ( #10657 )
2025-03-06 17:11:12 +08:00
fundon
ec9bd1f383
feat(editor): add toolbar registry extension ( #9572 )
...
### What's Changed!
#### Added
Manage various types of toolbars uniformly in one place.
* `affine-toolbar-widget`
* `ToolbarRegistryExtension`
The toolbar currently supports and handles several scenarios:
1. Select blocks: `BlockSelection`
2. Select text: `TextSelection` or `NativeSelection`
3. Hover a link: `affine-link` and `affine-reference`
#### Removed
Remove redundant toolbar implementations.
* `attachment` toolbar
* `bookmark` toolbar
* `embed` toolbar
* `formatting` toolbar
* `affine-link` toolbar
* `affine-reference` toolbar
### How to migrate?
Here is an example that can help us migrate some unrefactored toolbars:
Check out the more detailed types of [`ToolbarModuleConfig`](c178debf2d/blocksuite/affine/shared/src/services/toolbar-service/config.ts ).
1. Add toolbar configuration file to a block type, such as bookmark block: [`config.ts`](c178debf2d/blocksuite/affine/block-bookmark/src/configs/toolbar.ts )
```ts
export const builtinToolbarConfig = {
actions: [
{
id: 'a.preview',
content(ctx) {
const model = ctx.getCurrentModelBy(BlockSelection, BookmarkBlockModel);
if (!model) return null;
const { url } = model;
return html`<affine-link-preview .url=${url}></affine-link-preview>`;
},
},
{
id: 'b.conversions',
actions: [
{
id: 'inline',
label: 'Inline view',
run(ctx) {
},
},
{
id: 'card',
label: 'Card view',
disabled: true,
},
{
id: 'embed',
label: 'Embed view',
disabled(ctx) {
},
run(ctx) {
},
},
],
content(ctx) {
},
} satisfies ToolbarActionGroup<ToolbarAction>,
{
id: 'c.style',
actions: [
{
id: 'horizontal',
label: 'Large horizontal style',
},
{
id: 'list',
label: 'Small horizontal style',
},
],
content(ctx) {
},
} satisfies ToolbarActionGroup<ToolbarAction>,
{
id: 'd.caption',
tooltip: 'Caption',
icon: CaptionIcon(),
run(ctx) {
},
},
{
placement: ActionPlacement.More,
id: 'a.clipboard',
actions: [
{
id: 'copy',
label: 'Copy',
icon: CopyIcon(),
run(ctx) {
},
},
{
id: 'duplicate',
label: 'Duplicate',
icon: DuplicateIcon(),
run(ctx) {
},
},
],
},
{
placement: ActionPlacement.More,
id: 'b.refresh',
label: 'Reload',
icon: ResetIcon(),
run(ctx) {
},
},
{
placement: ActionPlacement.More,
id: 'c.delete',
label: 'Delete',
icon: DeleteIcon(),
variant: 'destructive',
run(ctx) {
},
},
],
} as const satisfies ToolbarModuleConfig;
```
2. Add configuration extension to a block spec: [bookmark's spec](c178debf2d/blocksuite/affine/block-bookmark/src/bookmark-spec.ts )
```ts
const flavour = BookmarkBlockSchema.model.flavour;
export const BookmarkBlockSpec: ExtensionType[] = [
...,
ToolbarModuleExtension({
id: BlockFlavourIdentifier(flavour),
config: builtinToolbarConfig,
}),
].flat();
```
3. If the bock type already has a toolbar configuration built in, we can customize it in the following ways:
Check out the [editor's config](c178debf2d/packages/frontend/core/src/blocksuite/extensions/editor-config/index.ts (L51C4-L54C8) ) file.
```ts
// Defines a toolbar configuration for the bookmark block type
const customBookmarkToolbarConfig = {
actions: [
...
]
} as const satisfies ToolbarModuleConfig;
// Adds it into the editor's config
ToolbarModuleExtension({
id: BlockFlavourIdentifier('custom:affine:bookmark'),
config: customBookmarkToolbarConfig,
}),
```
4. If we want to extend the global:
```ts
// Defines a toolbar configuration
const customWildcardToolbarConfig = {
actions: [
...
]
} as const satisfies ToolbarModuleConfig;
// Adds it into the editor's config
ToolbarModuleExtension({
id: BlockFlavourIdentifier('custom:affine:*'),
config: customWildcardToolbarConfig,
}),
```
Currently, only most toolbars in page mode have been refactored. Next is edgeless mode.
2025-03-06 06:46:03 +00:00
Saul-Mirone
7e39893aac
refactor(editor): remove assert functions ( #10629 )
2025-03-05 10:20:02 +00:00
Saul-Mirone
b8ecfbdae6
refactor(editor): remove assertExists ( #10615 )
2025-03-05 00:13:08 +00:00
Saul-Mirone
66d9d576e0
refactor(editor): add gfx entry in bs global package ( #10612 )
2025-03-04 12:46:50 +00:00
Saul-Mirone
4c3c953a36
chore(editor): merge clamp functions ( #10577 )
...
Closes: [BS-2625](https://linear.app/affine-design/issue/BS-2625/合并clamp函数 )
2025-03-03 10:33:38 +00:00
zzj3720
3711e13e0e
fix(editor): database block create new row when group by rich-text ( #10564 )
2025-03-03 05:58:07 +00:00
zzj3720
0e4a79959f
fix(editor): improve string conversion logic for checkbox property ( #10433 )
...
fix: BS-2465
- Add a FALSE_VALUES set containing various falsy string representations
- Support Chinese negation terms like "否", "不", "错", etc.
- Optimize the implementation of cellFromString method
2025-02-25 23:23:00 +00:00
fundon
abc3f9f23f
chore(editor): bump @floating-ui/dom to 1.6.13 ( #10425 )
2025-02-25 07:06:27 +00:00
forehalo
2e0f0c624a
chore: set base version to 0.20 ( #10382 )
2025-02-24 04:44:42 +00:00
donteatfriedrice
2d41c2ff8d
chore: bump theme ( #10358 )
2025-02-24 10:08:47 +08:00
donteatfriedrice
2b11941c0e
chore: bump theme ( #10290 )
2025-02-19 11:37:19 +00:00
doouding
02122098c7
fix: drag block issue ( #9902 )
...
### Changed
- Added support for changing the preview offset during dragging.
- Fixed the preview rendering for embed block and surface-ref block
- Resolved an issue where the host element might be reused in certain cases, which could cause unexpected behavior
- Moved viewport-related constants and methods to a more appropriate location
2025-02-05 07:25:53 +00:00
doodlewind
14ca171a18
chore(web): bump theme ( #9801 )
2025-01-20 13:51:24 +00:00
zzj3720
66b6fd8b74
fix(editor): view recorded in storage may not exist ( #9788 )
...
fix: BS-2415
2025-01-20 05:36:42 +00:00
zzj3720
95c0f59d96
refactor(editor): remove database-service ( #9769 )
...
close: BS-2426
2025-01-18 05:36:15 +00:00
CatsJuice
7d1d167858
chore: bump theme ( #9732 )
2025-01-17 09:22:15 +00:00
zzj3720
aa21ac6d64
refactor(editor): move database selection into the corresponding view ( #9752 )
2025-01-17 09:03:13 +00:00
zzj3720
ff295f383f
refactor(editor): enable the noUncheckedIndexedAccess rule for the block-database package ( #9691 )
...
close: BS-2269
2025-01-14 14:35:46 +00:00
zzj3720
80f8944188
fix(editor): should not update table selection after table is destroyed ( #9665 )
2025-01-13 10:43:02 +00:00
zzj3720
810e656174
fix(editor): add shift middleware for tag select panel ( #9664 )
...
fix: BS-1749
2025-01-13 09:05:05 +00:00
zzj3720
cc08094b17
feat(editor): improve group title display for checkbox columns ( #9622 )
...
close: BS-1977
2025-01-10 14:01:12 +00:00
zzj3720
8e8058a44c
feat(editor): support pasting Excel data into database block ( #9618 )
...
close: BS-2338
2025-01-09 14:35:19 +00:00
Saul-Mirone
126ab18967
feat(editor): selection as store extension ( #9605 )
2025-01-09 11:49:23 +00:00