mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(editor): improve group title display for checkbox columns (#9622)
close: BS-1977
This commit is contained in:
@@ -41,6 +41,13 @@ const GroupTitleMobile = (
|
||||
readonly: ops.readonly,
|
||||
};
|
||||
|
||||
const showColumnName = groupData.property.type$.value === 'checkbox';
|
||||
const columnName = showColumnName
|
||||
? html`<span class="group-header-title"
|
||||
>${groupData.property.name$.value}</span
|
||||
>`
|
||||
: nothing;
|
||||
|
||||
return html`
|
||||
<style>
|
||||
.group-header-count {
|
||||
@@ -83,11 +90,17 @@ const GroupTitleMobile = (
|
||||
font-size: 16px;
|
||||
color: ${unsafeCSSVarV2('icon/primary')};
|
||||
}
|
||||
|
||||
.group-header-title {
|
||||
color: ${unsafeCSSVarV2('text/primary')};
|
||||
font-size: var(--data-view-cell-text-size);
|
||||
}
|
||||
</style>
|
||||
<div
|
||||
style="display:flex;align-items:center;gap: 8px;overflow: hidden;height: 22px;"
|
||||
>
|
||||
${icon} ${renderUniLit(data.view, props)} ${GroupHeaderCount(groupData)}
|
||||
${icon} ${renderUniLit(data.view, props)} ${columnName}
|
||||
${GroupHeaderCount(groupData)}
|
||||
</div>
|
||||
${ops.readonly
|
||||
? nothing
|
||||
@@ -131,6 +144,13 @@ export const GroupTitle = (
|
||||
readonly: ops.readonly,
|
||||
};
|
||||
|
||||
const showColumnName = groupData.property.type$.value === 'checkbox';
|
||||
const columnName = showColumnName
|
||||
? html`<span class="group-header-title"
|
||||
>${groupData.property.name$.value}</span
|
||||
>`
|
||||
: nothing;
|
||||
|
||||
return html`
|
||||
<style>
|
||||
.group-header-count {
|
||||
@@ -190,11 +210,18 @@ export const GroupTitle = (
|
||||
fill: var(--affine-icon-color);
|
||||
color: var(--affine-icon-color);
|
||||
}
|
||||
|
||||
.group-header-title {
|
||||
color: ${unsafeCSSVarV2('text/primary')};
|
||||
font-size: var(--data-view-cell-text-size);
|
||||
margin-left: 4px;
|
||||
}
|
||||
</style>
|
||||
<div
|
||||
style="display:flex;align-items:center;gap: 8px;overflow: hidden;height: 22px;"
|
||||
>
|
||||
${icon} ${renderUniLit(data.view, props)} ${GroupHeaderCount(groupData)}
|
||||
${icon} ${renderUniLit(data.view, props)} ${columnName}
|
||||
${GroupHeaderCount(groupData)}
|
||||
</div>
|
||||
${ops.readonly
|
||||
? nothing
|
||||
|
||||
Reference in New Issue
Block a user