Feature Description
Summary
Add a "Simple View" toggle option for the Directory Preview block that shows only file name (with icon), hiding additional columns like permissions, last modified time, size, and file type.
Use Case
When browsing large directories, the detailed view with multiple columns can be overwhelming. A simple view showing only the file name/icon allows faster scanning of directory contents.
Current Behavior
Directory Preview shows all columns: Icon, Name, Permissions, Last Modified, Size, Type
Desired Behavior
Simple View shows only: Icon, Name
Additional Context
This is useful when:
- Browsing documentation folders with many files
- Quickly scanning directory contents
- Limited screen space scenarios
Implementation Suggestion
Meta Field
Add a per-block atom simpleView: PrimitiveAtom<boolean> to PreviewModel
UI Changes
Context Menu (Default Settings submenu)
Add checkbox menu item:
Code Changes
preview-model.tsx
+ simpleView: PrimitiveAtom<boolean>;
+ this.simpleView = atom<boolean>(false);
preview-directory-utils.tsx
+ const simpleView = globalStore.get(model.simpleView) ?? false;
return [
// ... existing menu items ...
+ {
+ label: "Simple View",
+ type: "checkbox",
+ checked: simpleView,
+ click: () => {
+ globalStore.set(model.simpleView, !simpleView);
+ },
+ },
];
preview-directory.tsx
+ const simpleView = useAtomValue(model.simpleView);
+ useEffect(() => {
+ if (simpleView) {
+ table.setColumnVisibility({
+ logo: true,
+ name: true,
+ modestr: false,
+ modtime: false,
+ size: false,
+ mimetype: false,
+ path: false,
+ });
+ } else {
+ table.setColumnVisibility({
+ logo: true,
+ name: true,
+ modestr: true,
+ modtime: true,
+ size: true,
+ mimetype: true,
+ path: false,
+ });
+ }
+ }, [simpleView, table]);
Behavior
- Simple View is off by default (detailed view)
- Toggle state is per-block (not global)
- State persists during session
- Does not persist to config (ephemeral view preference)
Feature Description
Summary
Add a "Simple View" toggle option for the Directory Preview block that shows only file name (with icon), hiding additional columns like permissions, last modified time, size, and file type.
Use Case
When browsing large directories, the detailed view with multiple columns can be overwhelming. A simple view showing only the file name/icon allows faster scanning of directory contents.
Current Behavior
Directory Preview shows all columns: Icon, Name, Permissions, Last Modified, Size, Type
Desired Behavior
Simple View shows only: Icon, Name
Additional Context
This is useful when:
Implementation Suggestion
Meta Field
Add a per-block atom
simpleView: PrimitiveAtom<boolean>to PreviewModelUI Changes
Context Menu (Default Settings submenu)
Add checkbox menu item:
Code Changes
preview-model.tsx
preview-directory-utils.tsx
preview-directory.tsx
Behavior