mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-28 12:12:47 +00:00
fix(file-panels): Settings offers Source where the picker does, and review follow-ups
- Settings > Files offers Source on every key except those a built-in panel of another kind (Image) claims, so a plugin that alone claims a text extension shows the same choices as the picker. - Delete the unused isSourceFilePanel. - The Markdown example warns with the file name when its unmount write fails, rather than dropping the edit silently. - Document that PluginFile stat fields are read at render time and that watch or the read hooks are how a panel learns they changed.
This commit is contained in:
@@ -1806,7 +1806,9 @@ props described under [Theme and layout](#theme-and-layout), plus:
|
||||
| `location` | `PluginFileLocation` | `lineStart?`, `lineEnd?`, and `revision`, which increments on every navigation. |
|
||||
|
||||
Paseo mounts your panel once it knows the file exists and its size, without reading it. The
|
||||
`PluginFile` stat fields refresh when the file changes on disk:
|
||||
`file` object is stable, and its stat fields hold the latest version Paseo knows. Read them while
|
||||
rendering; changing them does not re-render your panel. A `watch` listener, or a re-render from
|
||||
`useFileText`, `useFileBytes`, or `useFileUrl`, is how your panel learns they changed:
|
||||
|
||||
| Member | Meaning |
|
||||
| -------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||
|
||||
Reference in New Issue
Block a user