Skip to content

feat: add optional collection field to snippets - #35

Open
AdvaitVarhade wants to merge 2 commits into
byteofhoney:mainfrom
AdvaitVarhade:feat/snippet-collections
Open

feat: add optional collection field to snippets#35
AdvaitVarhade wants to merge 2 commits into
byteofhoney:mainfrom
AdvaitVarhade:feat/snippet-collections

Conversation

@AdvaitVarhade

Copy link
Copy Markdown

Resolves #23.

This PR introduces an optional collection field to the snippet schema to allow grouping beyond tags.

Changes included:

  • Added collection to the underlying schema (make_snippet in models.py) and WTForms (forms.py).
  • Added a "Collection" field to the Add and Edit snippet forms.
  • Implemented a sidebar/dropdown collection filter on the home page, similar to the existing language filter.
  • Displayed a collection badge next to the language badge on snippet cards and individual snippet views.
  • Added unit test coverage in tests/test_routes.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collections/folders on top of tags

2 participants