Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
ab27506
feat(edgeless): build a mind map with no editor, text measurement inj…
Nov 10, 2026
bb75335
fix(edgeless): bound a built mind map's text and wrap long words in l…
Nov 10, 2026
65767d7
chore(edgeless): regenerate the architecture map for the mind map bui…
Nov 10, 2026
b9b1c58
test(edgeless): read node boxes through the surface in the mind map p…
Nov 10, 2026
14cdacd
fix(edgeless): draw the canvas viewer under a strict content security…
Nov 10, 2026
78416b6
fix(edgeless): settle synced docs of named pages and follow only the …
Nov 10, 2026
13357b1
fix(blocks): keep emotion's rules out of a style element a strict pol…
Nov 10, 2026
70e5257
feat(edgeless): make the canvas viewer the editor itself, derived fro…
Nov 10, 2026
b3d0470
test(edgeless): paint the canvas viewer in a browser under a strict p…
Nov 10, 2026
aa0d642
fix(edgeless): viewer guard reads the mounted list, keys and clicks a…
Nov 10, 2026
50664cd
Merge remote-tracking branch 'origin/blocksuite-labre-main' into feat…
Nov 12, 2026
e97977c
chore(edgeless): regenerate the architecture map after the merge
Nov 12, 2026
d7f2d34
fix(database): read a malformed cell as its property default
Nov 12, 2026
a66a21c
fix(blocks): keep a fractional index key before its next neighbour
Nov 12, 2026
6d1f01e
feat(blocks): open the icon picker outside an editor from a public entry
Nov 12, 2026
6503e18
fix(blocks): keep the canvas selection when a table selects or clears
Nov 12, 2026
86eda11
fix(blocks): keep the start number of a numbered list on export
Nov 12, 2026
02a15cb
fix(edgeless): wrap a built mind map's text exactly as the editor does
Nov 12, 2026
730ca5b
test(edgeless): guard the mind map style colour past the palette
Nov 12, 2026
5247d70
feat(playground): build a mind map with no editor from the debug menu
Nov 12, 2026
918df2c
chore(playground): regenerate the architecture map for the mind map r…
Nov 12, 2026
ec83bf3
fix(edgeless): show a focused frame's title badge in the canvas viewer
Nov 12, 2026
b7952a6
test(edgeless): paint the canvas viewer under the site's own policy
Nov 12, 2026
4cb4426
docs: tell a host what a strict policy needs from the canvas viewer
Nov 12, 2026
9cb0812
feat(playground): open the document in the canvas viewer
Nov 12, 2026
f30fdd1
fix(blocks): flip the code toolbar wrap and line-number switches once
Nov 12, 2026
de965d5
fix(database): draw a blank select option as untitled
Nov 12, 2026
cfd83e2
test(edgeless): report the stage a framed canvas viewer stalls at
Nov 12, 2026
15c1284
fix(playground): keep the canvas viewer page's status off window.status
Nov 12, 2026
1020225
chore: refresh the architecture map for the canvas viewer
Nov 12, 2026
27ad2e4
fix(database): open a document row from a read-only desktop view
Nov 12, 2026
0256ac4
chore(database): refresh the architecture map for the tag label
Nov 12, 2026
4508572
fix(edgeless): ignore a pinch step whose fingers started on one point
Nov 12, 2026
73d8e84
fix(edgeless): name a frozen canvas view and repaint it when page fon…
Nov 12, 2026
d7d63f7
docs: say the canvas viewer repaints when the page's fonts load
Nov 12, 2026
56549a5
fix(blocks): keep a native modal dialog open when escape closes the i…
Nov 12, 2026
93d6697
fix(blocks): flip a menu toggle row once per click
Nov 12, 2026
ade058f
fix(blocks): bound the steps moving a fractional index key towards b
Nov 12, 2026
7d642d1
fix(blocks): write no list start past nine digits
Nov 12, 2026
c959280
fix(database): open a read-only kanban card from its cells
Nov 12, 2026
40f98a9
test(blocks): leave the column select-and-clear case to the unit spec
Nov 12, 2026
a1455f1
test(blocks): drop the words path from the code toggle unit spec
Nov 12, 2026
7e6fb0e
docs(edgeless): say why the export options menu rebuilds its rows
Nov 12, 2026
bab59d4
refactor(edgeless): carry the palette values in the library's theme
Nov 12, 2026
de28885
fix(blocks): keep the random postfix past the fractional index step b…
Nov 12, 2026
8004e3b
test(edgeless): drop a duplicate type check and a repeated comment
Nov 12, 2026
54a9907
fix(blocks): give a menu toggle row's focus back after a switch click
Nov 12, 2026
0069e9d
fix(blocks): give the library an emotion instance of its own
Nov 12, 2026
a140c46
fix(edgeless): deny the pages a canvas viewer is not given, free its …
Nov 12, 2026
c327fd2
docs: canvas viewer pages, host seams and emotion instance
Nov 12, 2026
4c08e54
fix(database): decide a kanban card's read-only open at the click
Nov 12, 2026
8c1aafa
fix(blocks): bound the last list number, not the start, on export
Nov 12, 2026
3e69def
chore: refresh the architecture map for the viewer's styles module
Nov 12, 2026
0179f24
docs(blocks): say why the fractional index fallback guard is required
Nov 12, 2026
3213bdc
fix(database): keep a read-only kanban card from opening a row twice
Nov 12, 2026
e6998e3
fix(edgeless): read the host's translation in the canvas viewer's own…
Nov 12, 2026
fe62de7
chore: refresh the architecture map after the viewer translation fix
Nov 12, 2026
aa5c39c
fix(playground): show the interactive canvas viewer across the whole …
Nov 12, 2026
54bf8cd
fix(page): store the outline type-icon switch's own value
Nov 12, 2026
c89de83
docs: record the unpushed host-session work and the browser-start fal…
Nov 12, 2026
bbb78fc
fix(database): read a malformed data-view cell as its column default
Nov 12, 2026
7385047
fix(blocks): refuse an oversized fractional index key with a named error
Nov 12, 2026
83af34d
fix(blocks): keep a shadow-held portal open on a click inside it
Nov 12, 2026
1982460
fix(blocks): count only list items when importing an html start number
Nov 12, 2026
33d8b68
fix(edgeless): cache a canvas character's width by the whole character
Nov 12, 2026
44335e0
docs(database): record the virtual table's missing row open button
Nov 12, 2026
09c9e1c
test(blocks): take every deep shadow query from the shared helper
Nov 12, 2026
b1c6ce3
feat(blocks): unify the emoji picker on the callout's emoji-mart picker
Nov 12, 2026
549b801
fix(blocks): write list markers in plain text
Nov 12, 2026
eb08a8e
fix(blocks): keep frequently used for every emoji picker after one wi…
Nov 12, 2026
945e2b0
fix(database): give a duplicated column its own option ids
Nov 12, 2026
1bc03d0
fix(edgeless): follow a middle click in the canvas viewer through its…
Nov 12, 2026
a49fc3f
fix(blocks): open no emoji picker on a read-only callout
Nov 12, 2026
e37de3f
fix(database): keep a rich-text cell stored as a string in a data-view
Nov 12, 2026
1367140
fix(database): keep a rich-text cell stored as a string
Nov 12, 2026
9d7d485
fix(blocks): name the fractional index stack overflow instead of boun…
Nov 12, 2026
47901a7
fix(blocks): separate copied blocks by a newline in plain text
Nov 12, 2026
d000e2c
fix(database): drag-to-fill a rich-text cell stored as a string
Nov 12, 2026
5e4f935
fix(blocks): name the fractional index overflow on firefox too
Nov 12, 2026
9b1226e
fix(edgeless): drop the canvas viewer's auxclick branch for other but…
Nov 12, 2026
de75035
refactor(blocks): move the list start number rule to affine-shared
Nov 12, 2026
66f812d
fix(blocks): copy the text alone from inside one list item
Nov 12, 2026
0de5685
Merge branch 'fix/fractional-index-between' into recette/2026-11-12
Nov 12, 2026
e5fcb33
Merge branch 'fix/list-export-start' into recette/2026-11-12
Nov 12, 2026
d1cb264
Merge branch 'fix/database-cell-default' into recette/2026-11-12
Nov 12, 2026
4163d80
Merge branch 'fix/select-tag-blank-name' into recette/2026-11-12
Nov 12, 2026
7fb6da6
Merge branch 'fix/database-readonly-row-open' into recette/2026-11-12
Nov 12, 2026
9d43478
Merge branch 'fix/table-selection-keeps-canvas' into recette/2026-11-12
Nov 12, 2026
2a56c1c
Merge branch 'fix/code-toggle-double' into recette/2026-11-12
Nov 12, 2026
1d2f5d2
Merge branch 'fix/menu-toggle-row' into recette/2026-11-12
Nov 12, 2026
91f4f67
Merge branch 'feat/icon-picker-standalone' into recette/2026-11-12
Nov 12, 2026
e4a9135
Merge branch 'feat/unified-emoji-picker' into recette/2026-11-12
Nov 12, 2026
08aa090
Merge branch 'feat/mindmap-headless-builder' into recette/2026-11-12
Nov 12, 2026
babac7d
Merge branch 'feat/canvas-viewer-editor' into recette/2026-11-12
Nov 12, 2026
3235c76
Merge branch 'fix/data-view-cell-default' into recette/2026-11-12
Nov 12, 2026
5bb7118
Merge branch 'fix/database-duplicate-property-options' into recette/2…
Nov 12, 2026
3586ae2
Merge branch 'fix/outline-setting-toggle' into recette/2026-11-12
Nov 12, 2026
4f5d947
Merge branch 'fix/portal-click-away-composed' into recette/2026-11-12
Nov 12, 2026
bff0877
Merge branch 'fix/text-char-width-codepoint' into recette/2026-11-12
Nov 12, 2026
e2c578e
Merge branch 'fix/list-html-import-order' into recette/2026-11-12
Nov 12, 2026
406824a
Merge branch 'fix/plain-text-list-markers' into recette/2026-11-12
Nov 12, 2026
d1d7c97
Merge branch 'fix/plain-text-block-separator' into recette/2026-11-12
Nov 12, 2026
a94136b
Merge branch 'docs/lessons-3-5-0' into recette/2026-11-12
Nov 12, 2026
bbbfb00
chore: refresh the architecture map for the recette merge
Nov 12, 2026
7cb87b5
chore(blocks): drop the switch click stop the toggle fix made redundant
Nov 12, 2026
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
Prev Previous commit
Next Next commit
fix(blocks): keep frequently used for every emoji picker after one wi…
…thout recents

emoji-mart keeps its categories at module level, shared by every picker of
the page, and its init splices an empty `frequent` category out of that
shared list. An opening with `rememberRecent: false` (`maxFrequentRows: 0`)
emptied it, so a host's `openIconPicker` without recents took the
"Frequently used" row away from every later picker, the callout's
included, until the page reloaded.

The panel now always names emoji-mart's `categories` (with `frequent`
first, or without it when recents are off): given that list, emoji-mart
filters a copy and never splices the shared one. This uses emoji-mart's
public option rather than patching its `Data` from outside. The literal
ratchet's comment no longer cites the deleted `emoji-data.ts`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
r and claude committed Nov 12, 2026
commit eb08a8e930af8c495c822ddfc17eb2b8ed6cc57f
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ const KEPT_HITS: readonly { file: string; text: string }[] = [
// `PHASE_LABELS` / `AXIS_LABELS` (`gfx/wardley/src/consts.ts`) — already
// keyed at the declaration that DRAWS them: `background.ts` states every one
// of these ten as the `fallback` of a `com.labre.wardley.*` key, and the
// bands and axes are painted from there. The same shape as `emoji-data.ts`
// above, and the reason P5 needs an entry here at all: the WORDING sits in a
// bands and axes are painted from there. The reason P5 needs an entry
// here at all: the WORDING sits in a
// pure-data file that names no key, so the per-file seam gate cannot see
// that the render site resolves it.
...[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
* - emoji-mart's own words (search, categories, skin tones) left in English
* instead of read through the `com.labre.*` wordings and the host's
* `translation`;
* - `rememberRecent: false` still writing the picks to `localStorage`;
* - `rememberRecent: false` still writing the picks to `localStorage`, or
* taking "Frequently used" away from every picker opened after it until the
* page reloads (emoji-mart keeps its categories at module level and spliced
* the empty `frequent` one out of them: a host's `openIconPicker` with
* `rememberRecent: false` then cost every callout its row);
* - emoji-mart, built imperatively, left behind with its document listeners
* when the panel goes (the callout's emoji menu once leaked one per opening);
* - the one-tab picker (the callout's) still drawing a tab bar or a frame
Expand Down Expand Up @@ -251,6 +255,18 @@ describe('affine-emoji-picker-panel', () => {
document.body.innerHTML = '';
});

test('a picker without recents leaves "Frequently used" to the next one', async () => {
localStorage.removeItem('emoji-mart.frequently');
const without = await emojiMart(await openPanel({ rememberRecent: false }));
expect(without.querySelector('.category[data-id="frequent"]')).toBeNull();
document.body.innerHTML = '';

const next = await emojiMart(await openPanel({ rememberRecent: true }));

expect(next.querySelector('.category[data-id="frequent"]')).not.toBeNull();
document.body.innerHTML = '';
});

test('emoji-mart is unmounted with the panel', async () => {
const panel = await openPanel();
await emojiMart(panel);
Expand Down
17 changes: 17 additions & 0 deletions packages/affine/components/src/icon-picker/emoji-picker-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ import {
ICON_PICKER_NO_EMOJI_FOUND,
} from '../translations.js';

/**
* emoji-mart's category ids in its own order, which `EMOJI_GROUP_WORDINGS`
* declares them in, "Frequently used" first.
*/
const FREQUENT_CATEGORY = 'frequent';
const EMOJI_CATEGORIES = Object.keys(EMOJI_GROUP_WORDINGS);

/** The part of emoji-mart's selection payload the panel reads. */
interface EmojiMartSelection {
native: string;
Expand Down Expand Up @@ -160,6 +167,16 @@ export class AffineEmojiPickerPanel extends WithDisposable(LitElement) {
i18n: this._i18n(),
theme: this._theme(),
autoFocus: true,
// Always named, never left to emoji-mart's default. Its categories live
// at module level, shared by every picker of the page, and its init
// splices an empty `frequent` out of that shared list unless
// `categories` is given, in which case it works on a filtered copy.
// Without this, one `rememberRecent: false` opening (`maxFrequentRows:
// 0` empties `frequent`) took the row away from every later picker,
// the callout's included, until the page reloaded.
categories: this.rememberRecent
? [FREQUENT_CATEGORY, ...EMOJI_CATEGORIES]
: EMOJI_CATEGORIES,
...(this.rememberRecent ? {} : { maxFrequentRows: 0 }),
onEmojiSelect: this._select,
}) as unknown as HTMLElement;
Expand Down
5 changes: 4 additions & 1 deletion packages/affine/components/src/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ export const EMOJI_GROUP_FLAGS: ChromeWording = [
'Flags',
];

/** Keyed by emoji-mart's own category id (`people`, `nature`…). */
/**
* Keyed by emoji-mart's own category id (`people`, `nature`…), in emoji-mart's
* order: the emoji panel hands these keys to emoji-mart as its category list.
*/
export const EMOJI_GROUP_WORDINGS: Readonly<Record<string, ChromeWording>> = {
people: EMOJI_GROUP_PEOPLE,
nature: EMOJI_GROUP_NATURE,
Expand Down