Repository navigation
feat(views): let a view display open its part pages to parts defined by anyone - #934
Merged
Merged
Conversation
…by anyone A part page takes a part's classes, title and Np parameter from its defining nanopublication, and only accepts one signed by a role-holder of the owning space (at its gen:hasPartDefinitionTier). So a part-level view could never render for a contribution by someone without a role there, and the Explore page, which read the classes off the nanopub that minted the IRI, forwarded such contributions to a part page that then showed nothing. - gen:hasPartDefinitionTier can now also be declared on a view display, overriding the space's rule for that display alone (as page size or position overrides do). A display renders for a part only when the part's definition was signed at that tier or above; displays declaring none keep the space's tier, so existing displays behave as before. - gen:EveryoneRole now means anyone, as for gen:isVisibleTo (TierRanks.ANYONE, below every role-holder). For an IRI minted inside a nanopublication, that nanopublication defines it, in its latest same-key version; never a third party's nanopub, and nothing changes for external IRIs. It used to rank as "every role-holder", the same as declaring nothing; no space declared it. - PartDefinition is the one resolution behind the part page, its About tab, document export, RDF download and Explore's forwarding. The space's own rule comes first; lower tiers that displays declare are tried only when it finds nothing, and taken only if a display accepting the signer's rank applies to the part, so opening one view does not present everybody's nanopubs as the space's parts elsewhere. - Explore now forwards to the part page only where a display would render. - The tier ranks move to TierRanks, free of SpaceMemberRole's class initialisation, which loads template data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to the per-display gen:hasPartDefinitionTier (PR #934). - The displays a part is resolved among are no longer read off a resource that has not loaded them yet. PartDefinition.resolve asks for them and waits briefly for the seed from the cache; the export and the RDF download resolve among displays they fetch themselves; a part page built before the displays arrived resolves again when its panels are built. - The breadcrumb's ancestors go through the same resolution as the page's own part, so a parent defined by someone without a role is an ancestor too. - A display can only lower the bar: a tier at or above the owning resource's counts as none. It used to filter on the newest role-holder definition, so an observer could take such a display off a part's page by publishing a newer description of it. - The definitions lookup is never run with an empty key list, which it takes as no restriction: the owning resource's own lookup is skipped then, and every query built from a key list restricts to a key matching nothing. - A publication redefining the part being viewed invalidates every lookup its resolution may go through (PartDefinition.lookupRefs), not only the one among the owning resource's keys. - Displays without a tier that apply to a part whatever its definition says (explicit target, namespace, an agent) keep rendering once another display opens the part to a lower tier, as they do for a part with no definition. - Of forked latest versions of a minting nanopublication, the most recently created counts; one whose key cannot be read defines nothing. - The export and the download read a part's classes as the part page does, an agent's included, so a person's part exports the views its page shows. - Explore resolves the definition once and only when needed, and the lookup among the owning resource's keys is not repeated for a tier adding none. - Removes the resolvers left without callers (ViewDataFetcher.resolvePart*, the two-argument appliesTo), and the tests no longer ask the registries for their fixture ids while stubbing them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A display can only lower the space's rule; the minting nanopublication has to introduce or describe the part; nothing but the page's context ties a part opened to anyone to the space; displays applying to a part whatever its definition says keep rendering; and how resolution deals with displays that are not loaded yet. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 18, 2026
## [5.23.0](nanodash-5.22.3...nanodash-5.23.0) (2026-11-18) ### Features * **home:** add a jump-to bar and a login button to the home page ([7bd0990](7bd0990)) * **home:** leave the first group of views out of the jump-to bar ([3ad6614](3ad6614)) * **views:** label template links with the template's own label ([719df70](719df70)) * **views:** let a view display open its part pages to parts defined by anyone ([e501afd](e501afd)) ### Dependency updates * **core-deps:** update dependency io.github.openhtmltopdf:openhtmltopdf-pdfbox to v1.1.114 ([0d7b4c5](0d7b4c5)) * **core-deps:** update nanopub to 1.96.0, wicket to 10.12.0 and two more ([0e34a43](0e34a43)) * **deps:** update dependency maven to v3.10.1 ([9f2ec99](9f2ec99)) ### Bug Fixes * **api-cache:** wait as long as a refusing query server asks ([#889](#889)) ([16e8bca](16e8bca)) * handle query responses the service didn't answer ([#916](#916)) ([1b07819](1b07819)) * **publish:** say which template could not be loaded instead of failing ([7ff6cd9](7ff6cd9)) * **views:** close the gaps in part-definition resolution found in review ([4a0972b](4a0972b)), closes [#934](#934) ### Documentation * **views:** state the limits of a display's part-definition tier ([e2e5012](e2e5012)) ### Build and continuous integration * **deps:** update dependency semantic-release-preconfigured-conventional-commits to v1.1.159 ([bce66d7](bce66d7)) ### General maintenance * setting next snapshot version [skip ci] ([8c0863c](8c0863c))
Contributor
|
🎉 This PR is included in version 5.23.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
Problem
A part page takes a part's classes, title and
…Npparameter from its defining nanopublication, and accepts only one signed by a role-holder of the owning space (at the space'sgen:hasPartDefinitionTier, every role-holder by default). So a part-level view can never render for a contribution by someone without a role in that space, whatever it targets.On top of that, the Explore page read the classes off the nanopub that minted the IRI, whoever signed it, so it forwarded such contributions to a part page that then found no definition and showed nothing. This is live on nanodash.knowledgepixels.com today. Two
schema:Questions in theiosp/2026context, which has question part views:The motivating case is a 🧵 Thread part view for discussion threads (Nanoarguments pilot): it should show on the page of every contribution, including those by people who hold no role in the space.
Change
gen:hasPartDefinitionTieron a view display. It lowers the space's rule for that display alone, as page size, position and title overrides do. The display then also renders for a part whose definition was signed at that tier or above. A display can only lower the bar: a tier at or above the space's has no effect. A display declaring none requires the space's own tier, so existing displays behave exactly as before; those that apply to a part whatever its definition says (explicit target, namespace, an agent) keep rendering on a part another display opens up.gen:EveryoneRolemeans anyone, as forgen:isVisibleTo(TierRanks.ANYONE, below every role-holder). For an IRI minted inside a nanopublication (carrying its artifact code), that nanopublication defines it, in its latest same-key version (get-latest-thing-nanopub). It is never a third party's nanopub, so nobody can redefine someone else's part, and nothing changes for external IRIs such as DOIs. In a space's root definitiongen:EveryoneRoleused to rank as "every role-holder", the same as declaring nothing; no space declares it (checked on the live network: only DataSciNP declares a tier,gen:MemberRole).PartDefinition, one resolution behind the part page, its breadcrumb's ancestors, its About tab (the Info view gets the keys the definition was found among, or the minting nanopub's signing key), document export, RDF download and Explore's forwarding:gen:EveryoneRoleitself opens all its part views this way.get-term-definitionswould read as no restriction.PartDefinition.lookupRefs), so a contributor's new version of their own contribution shows on return.dct:isPartOf/isVersionOf/inSchememembership forwarding is unchanged).TierRanksholds the rank constants and mapping, free ofSpaceMemberRole's class initialisation (which builds the admin role from template data).SpaceMemberRole.tierRankdelegates to it.docs/role-specific-views.md, new subsection undergen:hasPartDefinitionTier.Tests
PartDefinitionTest(14) andViewDisplayPartDefinitionTierTest(5), with three fixtures.getPartLevelViewDisplays.NanodashPageMetadataTest(view not loaded) andPreviewPageTemplateFormTest(provenance template null). Both pass on rerun, on this branch and on master alike.Templates (nanopubs, signed, not yet published)
gen:hasPartDefinitionTierstatement, offering anyone / observers / members / maintainers / admins, its label saying that only a tier below the space's has an effect (supersedesRAnxyaWo…).gen:EveryoneRole("anyone") added to their tier choices (supersedeRA0t4bKm…andRA8liS89…).Older instances ignore the new display property (the display then keeps the space's rule), so publishing them is harmless before this is deployed.
🤖 Generated with Claude Code