diff --git a/.gitignore b/.gitignore index 97b11648..bfd34d2d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ packages/*/deno_dependency_cache node_modules # release output (binaries, changelog.md) -releases +/releases .env diff --git a/packages/web/documentation/design/REVISIT_GROUPING_AS_REPEATABLE_SPLIT_BY.md b/packages/web/documentation/design/REVISIT_GROUPING_AS_REPEATABLE_SPLIT_BY.md new file mode 100644 index 00000000..b1c7a5f2 --- /dev/null +++ b/packages/web/documentation/design/REVISIT_GROUPING_AS_REPEATABLE_SPLIT_BY.md @@ -0,0 +1,12 @@ +On the /browse page, we have a "Group" search param that lets you group by a particular tag group. + +This is a small fraction of what we should be doing with this. + +I want to: +- Group by day, month, year, decade source_created_at +- Group by day, month, year, decade created_at +- Group by day, month, year, decade updated_at + +I want to combine a group by username (tag_group: username), then group by month uploaded (source_created_at: desc) + +the current Group text box search mode should be replaced with an UI that conveys to the user they are "applying" another dimension on top of their current browse view. We can do this with a "< + Split >" button. diff --git a/packages/web/src/lib/server/config.ts b/packages/web/src/lib/server/config.ts index c3d83c0f..1e2ce36c 100644 --- a/packages/web/src/lib/server/config.ts +++ b/packages/web/src/lib/server/config.ts @@ -5,6 +5,8 @@ import * as forager from '@forager/core' const LogLevel = z.enum(['SILENT', 'ERROR', 'WARN', 'INFO', 'DEBUG']) +const MediaTileInfoTableTypes = z.enum(['tag_group', 'sort_top']) + const Keybind = (default_keybind: string) => z.union([z.string(), z.string().array()]).default(default_keybind).transform(keybind => { if (Array.isArray(keybind)) return keybind else return [keybind] @@ -38,7 +40,18 @@ export const PackagesConfig = z.object({ media_list: z.object({ thumbnail_size: z.number().default(110), - thumbnail_shape: z.enum(['square', 'original']).prefault('original') + thumbnail_shape: z.enum(['square', 'original']).prefault('original'), + + info_tiles: z.object({ + tag_group: z.object({ + enabled: z.boolean().default(true), + order: z.number().optional(), // TBD if needed. We may be able to get away with yaml ordering if the serialization is consistent + }).prefault({}), + sort_top: z.object({ + enabled: z.boolean().default(true), + order: z.number().optional(), // TBD if needed. We may be able to get away with yaml ordering if the serialization is consistent + }).prefault({}), + }).prefault({}), }).strict().prefault({}), sidebar: z.object({ diff --git a/packages/web/src/routes/browse/components/MediaTileInfoTable.svelte b/packages/web/src/routes/browse/components/MediaTileInfoTable.svelte new file mode 100644 index 00000000..0df57619 --- /dev/null +++ b/packages/web/src/routes/browse/components/MediaTileInfoTable.svelte @@ -0,0 +1,66 @@ + + + + + + {#each entries as entry, index} + + + + + + + {/each} + +
+ + + {#if entry.queryparams} + {entry.value} + + {:else} + {entry.value} + {/if} + {entry.stat}
diff --git a/packages/web/src/routes/browse/components/SearchLink.svelte b/packages/web/src/routes/browse/components/SearchLink.svelte index d82646bf..1a390754 100644 --- a/packages/web/src/routes/browse/components/SearchLink.svelte +++ b/packages/web/src/routes/browse/components/SearchLink.svelte @@ -12,8 +12,6 @@ let {params, controller, children, ...props}: Props = $props() const {queryparams} = controller.runes - console.log({params}) -