Skip to content

fix(views): offer "deactivate view display" for preset-supplied views - #715

Merged
tkuhn merged 1 commit into
masterfrom
fix/deactivate-preset-view-display
Sep 18, 2026
Merged

tkuhn merged 1 commit into
masterfrom
fix/deactivate-preset-view-display

Conversation

@tkuhn

@tkuhn tkuhn commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Problem

On a space page such as https://w3id.org/spaces/semantics/2026-eu/nanopub-tutorial, admins saw "deactivate view display" on most views but not on views supplied by a preset assignment (e.g. the Presentations view from the "Scientific conference preset").

Preset-supplied views are built via ViewDisplay.forPresetView, which never sets viewIri. ViewDisplayMenu used getViewIri() != null to decide whether a display is "real", so preset views were treated like the built-in About-tab meta-views and both "edit" and "deactivate" were hidden.

Fix

  • ViewDisplay records whether it was derived from a preset (isPresetDerived()).
  • ViewDisplayMenu shows "deactivate view display" for standalone displays and preset-derived ones. The link already falls back to the resolved view id as the view parameter, and the resulting DeactivatedViewDisplay nanopub wins over the preset in the per-kind latest-wins filtering (this is how the program-committee view of the same preset was already deactivated on that space).
  • "edit view display" remains hidden for preset-derived displays, since there is no display nanopub to supersede.

Verification

  • mvn compile clean; view-display related tests pass.
  • Not yet click-tested in a running instance.

🤖 Generated with Claude Code

Views that reach a resource page through a preset assignment have no
view-display nanopub of their own, so ViewDisplay.getViewIri() is null
for them and ViewDisplayMenu hid both "edit" and "deactivate" alongside
the built-in About-tab meta-views. Deactivation works for such views
regardless: a DeactivatedViewDisplay nanopub for the view's kind wins
over the preset in the per-kind latest-wins filtering.

ViewDisplay now records whether it was derived from a preset, and the
menu shows "deactivate view display" for those as well. "edit view
display" stays hidden, as there is no display nanopub to supersede.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@tkuhn
tkuhn merged commit bc6b59f into master Sep 18, 2026
8 checks passed
@tkuhn
tkuhn deleted the fix/deactivate-preset-view-display branch September 18, 2026 09:39
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