feat(core): sub-page for setting panel (#11678)

**setting panel sub-page impl, with cascading pages support.**

## Usage
```tsx
// inside setting content
const island = useSubPageIsland();
const [open, setOpen] = useState(false);

if (!island) {
  return null;
}

return (
  <SubPageProvider
    island={island}
    open={open}
    onClose={() => setOpen(false)}
    backText="Back"
  />
);
```

### Preview

![CleanShot 2025-04-14 at 16.56.30.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/c042300d-c442-4708-a07a-54cd9f044abf.gif)
This commit is contained in:
CatsJuice
2025-04-23 07:57:22 +00:00
parent 7e48dcc467
commit af69154f1c
18 changed files with 659 additions and 252 deletions
@@ -269,6 +269,13 @@ export const AFFINE_FLAGS = {
configurable: isCanaryBuild,
defaultState: isCanaryBuild,
},
enable_setting_subpage_animation: {
category: 'affine',
displayName: 'Enable Setting Subpage Animation',
description: 'Apply animation for setting subpage open/close',
configurable: isCanaryBuild,
defaultState: false,
},
} satisfies { [key in string]: FlagInfo };
// oxlint-disable-next-line no-redeclare