Skip to content

Add filtering to the function coder#45

Open
mariari wants to merge 3 commits into
masterfrom
mariari/function-list-filters
Open

Add filtering to the function coder#45
mariari wants to merge 3 commits into
masterfrom
mariari/function-list-filters

Conversation

@mariari

@mariari mariari commented Jun 30, 2026

Copy link
Copy Markdown
Owner

No description provided.

mariari and others added 3 commits July 1, 2026 19:10
The Functions tab listed every def/type/macro with no way to narrow it.
GT's coder filter bars ("Category [All methods v]", "Methods up to v") use a
model-backed filter system: a filter answers filterDescriptor2For: with a
GtFilter*Model, and GtFilterItemsModel asFiltersElement renders native dropdown
widgets (proper box, alt-clickable). We reuse that rather than hand-rolling tags.

ElixirFunctionsFilter is a GtSearchFilter base matching one function entry
(matches:); =/hash are value-aware so GtFilteredCodersModel>>additionalFilters:,
which early-returns on an equal collection, re-applies on every change.
ElixirKindFilter answers a GtFilterShortListModel (All/Functions/Types, shown by
default); ElixirNameSubstringFilter a GtFilterTextModel (added via +).

ElixirFunctionFiltersBuilder enumerates ElixirFunctionsFilter subclasses into the
+ menu (GT's GtFilterMethodsCoderAvailableFiltersBuilder scans GtSearchMethodsFilter,
which we aren't). buildFunctionsFilterBar: assembles GtFilterItemsModel + that
builder + GT's GtFilterMethodCodersAdditionalFiltersUpdater (which only needs
additionalFilters: and model asSearchFilter), the updater kept alive in the
element userData. newItemsStream narrows functionEntries by additionalFilters.

Subclassing ElixirFunctionsFilter with a filterDescriptor2For: model is the whole
extension story: a new filter auto-registers in the bar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mariari mariari force-pushed the mariari/function-list-filters branch from 5f4840b to ac6ae07 Compare July 1, 2026 11:10
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.

1 participant