Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Release v1.15.0 - #41

Merged
vondravl merged 1 commit into
mainfrom
feature/v1.15.0
Jun 18, 2026
Merged

vondravl merged 1 commit into
mainfrom
feature/v1.15.0

Conversation

@vondravl

@vondravl vondravl commented Jun 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Lets queries tell an active attribute filter on a visualization (constrains the result — e.g. a positiveAttributeFilter locked to ['10000']) from a no-op placeholder (e.g. a negativeAttributeFilter with empty notIn, which filters nothing).

Changes

  • New visualizations_filters table — one row per attribute filter, keyed (visualization_id, workspace_id, filter_index). Columns: display_form_id, object_type, filter_type (positive/negative), element_count, elements (JSON array of selected values/uris). A positive and a negative filter on the same attribute stay distinct rows — unlike visualizations_references, which collapses them to one reference edge. Mirrors the existing filter_context_fields table for dashboard filter contexts. Element extraction covers both in/notIn and both values/uris formats; non-ASCII members (e.g. €1000) are kept readable, not \u-escaped.
  • v_visualizations_filters view — joined to the visualization title + url_link.
  • filter_active on v_visualizations_references — a 1/0/NULL per-attribute flag ("is it actively filtered"), ORing over all filters on the attribute; detail lives in visualizations_filters. View also gains url_link.
  • visualizations_references keeps only the filter existence edge (no lossy per-filter count bolted onto the deduped row).

Design notes

  • Why a table, not a column on visualizations_references: a filter has identity (direction + selected values); forcing that onto a deduped reference edge was lossy — a positive + negative filter on one attribute collapsed to a single row whose count depended on array order. The table keeps them distinct; filter_active recovers the at-a-glance verdict.
  • 0 vs NULL: NULL = "not a filter row / doesn't apply"; 0 = "filtered, but selects nothing". Kept distinct so element_count = 0 cleanly finds no-op placeholders.
  • elements as JSON: "which vizzes are locked to member X?" needs json_each/LIKE. A normalized child table is the follow-up if direct joins on values become needed.

Testing

  • pytest — 213 passed
  • ruff check / ruff format — clean
  • Verified end-to-end against a real SQLite DB: distinct rows for positive+negative on the same attribute, correct filter_active, url_link populated, € members readable.

🤖 Generated with Claude Code

@vondravl
vondravl marked this pull request as ready for review June 18, 2026 12:18
….15.0)

Let queries tell an active attribute filter (constrains the result — e.g. a
positiveAttributeFilter locked to ['10000']) from a no-op placeholder (e.g. a
negativeAttributeFilter with empty notIn, which filters nothing).

- New visualizations_filters table: one row per attribute filter, keyed
  (visualization_id, workspace_id, filter_index). Columns: display_form_id,
  object_type, filter_type (positive/negative), element_count, elements (JSON).
  A positive and a negative filter on the same attribute stay distinct rows —
  unlike visualizations_references, which collapses them to one reference edge.
  Mirrors filter_context_fields. Element extraction covers in/notIn and
  values/uris formats.
- New process_visualizations_filters function, wired into the export pipeline.
- v_visualizations_filters view (joined to the visualization title + url_link).
- v_visualizations_references gains filter_active (1/0/NULL): a per-attribute
  "is it actively filtered" flag that ORs over all filters on the attribute,
  with the detail in visualizations_filters. Also exposes url_link.
- visualizations_references keeps only the filter existence edge (no lossy
  per-filter count bolted onto the deduped reference row).

Version bump to 1.15.0, CHANGELOG and CLAUDE.md updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vondravl
vondravl merged commit 76516cb into main Jun 18, 2026
1 check passed
@vondravl
vondravl deleted the feature/v1.15.0 branch June 18, 2026 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant