mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
feat(editor): add collapse/expand toggle for groups with caching (#12671)
https://github.com/user-attachments/assets/4ef71704-57bb-45b8-9e73-8a51c67fb158 Adds a collapsible toggle for group-by groups. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Collapsible groups for desktop and mobile table views with persistent per-view collapsed state and a keyboard-accessible toggle button. - **Bug Fixes** - Group title icons now render consistently across variants. - **Tests** - Added unit tests verifying collapse/expand behavior for group components. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: 3720 <zuozijian1994@gmail.com> Co-authored-by: L-Sun <zover.v@gmail.com>
This commit is contained in:
@@ -26,13 +26,10 @@ const GroupTitleMobile = (
|
||||
const type = groupData.tType;
|
||||
if (!type) return nothing;
|
||||
|
||||
const icon =
|
||||
groupData.value == null
|
||||
? ''
|
||||
: html` <uni-lit
|
||||
class="group-header-icon"
|
||||
.uni="${groupData.property.icon}"
|
||||
></uni-lit>`;
|
||||
const icon = html` <uni-lit
|
||||
class="group-header-icon"
|
||||
.uni="${groupData.property.icon}"
|
||||
></uni-lit>`;
|
||||
const props: GroupRenderProps = {
|
||||
group: groupData,
|
||||
readonly: ops.readonly,
|
||||
@@ -126,13 +123,10 @@ export const GroupTitle = (
|
||||
const type = groupData.tType;
|
||||
if (!type) return nothing;
|
||||
|
||||
const icon =
|
||||
groupData.value == null
|
||||
? ''
|
||||
: html` <uni-lit
|
||||
class="group-header-icon"
|
||||
.uni="${groupData.property.icon}"
|
||||
></uni-lit>`;
|
||||
const icon = html` <uni-lit
|
||||
class="group-header-icon"
|
||||
.uni="${groupData.property.icon}"
|
||||
></uni-lit>`;
|
||||
const props: GroupRenderProps = {
|
||||
group: groupData,
|
||||
readonly: ops.readonly,
|
||||
|
||||
Reference in New Issue
Block a user