• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

knowledgepixels / nanodash / 27824181946

19 Jun 2026 11:54AM UTC coverage: 26.592% (-0.4%) from 27.004%
27824181946

push

github

web-flow
Merge pull request #484 from knowledgepixels/feat/space-ref-disambiguation

Space-ref disambiguation: conflict notice, claimants overview, ref-pinned pages

1552 of 6857 branches covered (22.63%)

Branch coverage included in aggregate %.

3418 of 11833 relevant lines covered (28.89%)

4.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/main/java/com/knowledgepixels/nanodash/component/AboutUserPanel.java
1
package com.knowledgepixels.nanodash.component;
2

3
import com.knowledgepixels.nanodash.View;
4
import com.knowledgepixels.nanodash.ViewDisplay;
5
import com.knowledgepixels.nanodash.domain.IndividualAgent;
6
import org.apache.wicket.markup.html.panel.Panel;
7
import org.nanopub.extra.services.QueryRef;
8

9
/**
10
 * The "About" tab body for a user: their introduction nanopublications, a public
11
 * read-only view of their profile (default license, profile picture), assigned
12
 * presets, and the listing of their configured view displays (issue #302).
13
 */
14
public class AboutUserPanel extends Panel {
15

16
    /**
17
     * View that lists a user's introduction nanopublications. Its per-row
18
     * retract/derive actions are driven by the viewer's session-bound magic query
19
     * params (LOCALPUBKEY/SITEURL), so the owner gets the editable actions and
20
     * everyone else gets the read-only table — no custom companion needed.
21
     */
22
    public static final String INTRODUCTIONS_VIEW = "https://w3id.org/np/RAmdDJAKs1gKPPdo23t6lMUXC6mlzLjRZyjDCcNEMx7Tw/introductions-view";
23

24
    /**
25
     * View showing a user's basic profile properties (default license and
26
     * profile picture), one per row.
27
     */
28
    public static final String PROFILE_VIEW = "https://w3id.org/np/RAtTP_qhEqsz2V8YoR6MfZ_j7gwcJ9SE2WvzjXLiagb9Q/profile-view";
29

30
    /**
31
     * View listing a user's configured view displays. Mirrors the space view-displays
32
     * view but its "add view display" action links the user-specific creation template.
33
     */
34
    public static final String USER_VIEW_DISPLAYS_VIEW = "https://w3id.org/np/RA1d1qBF8Fk-ZWKtNB-wZd56HrV0wdtJkw0wp58sHxM0E/view-displays-view";
35

36
    /**
37
     * @param id            the Wicket markup id
38
     * @param userIriString the user IRI
39
     */
40
    public AboutUserPanel(String id, String userIriString) {
41
        super(id);
×
42

43
        // The owner's account/identity controls (logout, local-mode ORCID form,
44
        // signing key) AND the recommended actions now live in the page header
45
        // stripe's "This is you" box (ProfileAccountPanel), not here.
46

47
        // Introductions: a proper view for everyone. The owner's session-bound magic
48
        // params drive the per-row retract/derive action buttons; non-owners get the
49
        // read-only table. (Formerly the ProfileIntroItem companion for the owner.)
50
        View introView = View.get(INTRODUCTIONS_VIEW);
×
51
        add(QueryResultTableBuilder.create("introductions", new QueryRef(introView.getQuery().getQueryId(), "user", userIriString), new ViewDisplay(introView))
×
52
                .resourceWithProfile(IndividualAgent.get(userIriString))
×
53
                .id(userIriString)
×
54
                .contextId(userIriString)
×
55
                .build());
×
56

57
        // Profile view with result actions to update the profile image/license;
58
        // needs the resourceWithProfile/id/contextId for the action links.
59
        View profileView = View.get(PROFILE_VIEW);
×
60
        add(QueryResultTableBuilder.create("profile", new QueryRef(profileView.getQuery().getQueryId(), "user", userIriString), new ViewDisplay(profileView))
×
61
                .resourceWithProfile(IndividualAgent.get(userIriString))
×
62
                .id(userIriString)
×
63
                .contextId(userIriString)
×
64
                .build());
×
65

66
        View presetsView = View.get(AboutSpacePanel.PRESET_ASSIGNMENTS_VIEW);
×
67
        add(QueryResultTableBuilder.create("presets", new QueryRef(presetsView.getQuery().getQueryId(), "resource", userIriString), new ViewDisplay(presetsView)).resourceWithProfile(IndividualAgent.get(userIriString)).id(userIriString).contextId(userIriString).build());
×
68

69
        View vdView = View.get(USER_VIEW_DISPLAYS_VIEW);
×
70
        add(QueryResultTableBuilder.create("viewdisplays", new QueryRef(vdView.getQuery().getQueryId(), "resource", userIriString), new ViewDisplay(vdView)).resourceWithProfile(IndividualAgent.get(userIriString)).id(userIriString).contextId(userIriString).build());
×
71
    }
×
72

73
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc