mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Get first unicode character (e.g. 📝 ) for page label, not 1st byte
Summary: 📝 https://community.getgrist.com/t/feature-request-custom-icon-favicon-for-each-document/210/2 ``` >>> json.dumps("📝") '"\\ud83d\\udcdd"' >>> json.dumps("✨") '"\\u2728"' ``` ``` > "📝 abc"[0] '\uD83D' > "📝 abc"[1] '\uDCDD' > Array.from("📝 abc") ['📝', ' ', 'a', 'b', 'c'] > Array.from("📝 abc")[0] '📝' ``` Test Plan: no Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3026
This commit is contained in:
parent
7907467dbc
commit
80bf4ea2a3
@ -52,7 +52,7 @@ export function buildPageDom(name: Observable<string>, actions: PageActions, ...
|
|||||||
domComputed(isRenaming, (isrenaming) => (
|
domComputed(isRenaming, (isrenaming) => (
|
||||||
isrenaming ?
|
isrenaming ?
|
||||||
cssPageItem(
|
cssPageItem(
|
||||||
cssPageInitial(dom.text((use) => use(name)[0])),
|
cssPageInitial(dom.text((use) => Array.from(use(name))[0])),
|
||||||
cssEditorInput(
|
cssEditorInput(
|
||||||
{
|
{
|
||||||
initialValue: name.get() || '',
|
initialValue: name.get() || '',
|
||||||
@ -68,7 +68,7 @@ export function buildPageDom(name: Observable<string>, actions: PageActions, ...
|
|||||||
// firefox.
|
// firefox.
|
||||||
) :
|
) :
|
||||||
cssPageItem(
|
cssPageItem(
|
||||||
cssPageInitial(dom.text((use) => use(name)[0])),
|
cssPageInitial(dom.text((use) => Array.from(use(name))[0])),
|
||||||
cssPageName(dom.text(name), testId('label')),
|
cssPageName(dom.text(name), testId('label')),
|
||||||
cssPageMenuTrigger(
|
cssPageMenuTrigger(
|
||||||
cssPageIcon('Dots'),
|
cssPageIcon('Dots'),
|
||||||
|
Loading…
Reference in New Issue
Block a user