feat(edge_fields): per-field "Hide in views" toggle#715
Merged
Conversation
Adds optional `hide_in_views` flag to EdgeField, a toggle in the Edge Field settings panel, and a filter step so hidden fields drop from the Matrix and Tree side views. Codeblocks and page views are unaffected. Closes #132 (item 3 — per-field view visibility).
…e defaults Removing an edge field left dangling references that rename already cleans: transitive rules referencing the label kept generating implied edges (a stale close_field could surface a phantom field in views), and explicit_edge_sources.*.default_field pointers were left pointing at the deleted label. remove() now drops transitive rules that reference the field and clears any matching source default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a per-field Hide in views toggle so an edge field can be kept in groups, codeblocks, and the graph yet suppressed from the Matrix and Tree side views. Resolves the last loose end (item 3) from discussion #132's UI audit.
Also fixes a latent consistency bug surfaced while auditing the field settings: removing a field left dangling references that
renamealready cleaned.Changes
EdgeField.hide_in_views?: boolean(src/interfaces/settings.ts) — optional, so existing fields default to visible. No settings migration needed.omit_hidden_view_fields()(src/utils/edge_fields.ts) — filters hidden labels out of a resolved field set.src/components/side_views/{Matrix,TreeView}.svelte) — wrap the resolvededge_field_labelsin the new filter. Tree'sfind_rootfield set is left unfiltered (structural, not display).src/components/settings/EdgeFieldSettings.svelte) — "Hide in views" checkbox per field +set_hiddenaction (storestrue/ clears the key when off).remove()now drops transitive rules whosechain[].fieldorclose_fieldreference the deleted label, and clears anyexplicit_edge_sources.*.default_fieldpointing at it. Previously these dangled (a staleclose_fieldcould even surface a phantom field in views).Scope
Side views only. Codeblocks (explicit
fields:whitelist) and page views (Trail/PrevNext) are unaffected by the toggle.Test plan
tsc -noEmit,svelte-check,vitest(259 tests) — all green.breadcrumbscodeblock withfields: [<field>]; untoggle restores. Remove a field used as a sourcedefault_fieldand in a transitive rule → rule dropped, source default cleared, no phantom field.