mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +08:00
feat(editor): add experimental feature citation (#11984)
Closes: [BS-3122](https://linear.app/affine-design/issue/BS-3122/footnote-definition-adapter-适配) Closes: [BS-3123](https://linear.app/affine-design/issue/BS-3123/几个-block-card-view-适配-footnote-态) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new citation card component and web element for displaying citations. - Added support for citation-style rendering in attachment, bookmark, and linked document blocks. - Enabled citation parsing from footnote definitions in markdown for attachments, bookmarks, and linked docs. - Added a feature flag to enable or disable citation features. - Provided new toolbar logic to disable downloads for citation-style attachments. - **Improvements** - Updated block models and properties to support citation identifiers. - Added localization and settings for the citation experimental feature. - Enhanced markdown adapters to recognize and process citation footnotes. - Included new constants and styles for citation card display. - **Bug Fixes** - Ensured readonly state is respected in block interactions and rendering for citation blocks. - **Documentation** - Added exports and effects for new citation components and features. - **Tests** - Updated snapshots to include citation-related properties in block data. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
+1
@@ -9,6 +9,7 @@
|
||||
"id": "3",
|
||||
"props": {
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -10,6 +10,7 @@
|
||||
"props": {
|
||||
"caption": "",
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"id": "3",
|
||||
"props": {
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"id": "3",
|
||||
"props": {
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"id": "3",
|
||||
"props": {
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"id": "3",
|
||||
"props": {
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -49,6 +49,7 @@
|
||||
"id": "3",
|
||||
"props": {
|
||||
"embed": false,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"name": "test-card-1.png",
|
||||
|
||||
+1
@@ -45,6 +45,7 @@
|
||||
"url": "http://localhost",
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"title": null,
|
||||
|
||||
+1
@@ -42,6 +42,7 @@
|
||||
"props": {
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"index": "a0",
|
||||
|
||||
+1
@@ -30,6 +30,7 @@
|
||||
"props": {
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"index": "a0",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"props": {
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"index": "a0",
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
"index": "a0",
|
||||
"xywh": "[0,0,0,0]",
|
||||
"lockedBySelf": false,
|
||||
"rotate": 0
|
||||
"rotate": 0,
|
||||
"footnoteIdentifier": null
|
||||
},
|
||||
"children": []
|
||||
}
|
||||
|
||||
@@ -51,7 +51,8 @@
|
||||
"index": "a0",
|
||||
"xywh": "[0,0,0,0]",
|
||||
"lockedBySelf": false,
|
||||
"rotate": 0
|
||||
"rotate": 0,
|
||||
"footnoteIdentifier": null
|
||||
},
|
||||
"children": []
|
||||
}
|
||||
|
||||
+1
@@ -44,6 +44,7 @@
|
||||
"url": "http://localhost",
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"title": null,
|
||||
|
||||
+1
@@ -82,6 +82,7 @@
|
||||
"url": "http://localhost",
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"title": null,
|
||||
|
||||
+1
@@ -44,6 +44,7 @@
|
||||
"url": "http://localhost",
|
||||
"caption": null,
|
||||
"description": null,
|
||||
"footnoteIdentifier": null,
|
||||
"icon": null,
|
||||
"image": null,
|
||||
"title": null,
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
"id": "11",
|
||||
"props": {
|
||||
"caption": null,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"pageId": "6",
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
"id": "11",
|
||||
"props": {
|
||||
"caption": null,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"pageId": "6",
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
"id": "11",
|
||||
"props": {
|
||||
"caption": null,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"pageId": "6",
|
||||
|
||||
+1
@@ -9,6 +9,7 @@
|
||||
"id": "12",
|
||||
"props": {
|
||||
"caption": null,
|
||||
"footnoteIdentifier": null,
|
||||
"index": "a0",
|
||||
"lockedBySelf": false,
|
||||
"pageId": "5",
|
||||
|
||||
Reference in New Issue
Block a user