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

knowledgepixels / nanodash / 27622930007

16 Jun 2026 01:58PM UTC coverage: 26.963% (+6.3%) from 20.697%
27622930007

push

github

web-flow
Merge pull request #483 from knowledgepixels/feat/spaces-about-and-ref-identity

Space/resource About pages, ref-aware spaces, and magic query params

1542 of 6717 branches covered (22.96%)

Branch coverage included in aggregate %.

3407 of 11638 relevant lines covered (29.27%)

4.31 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
     * @param id            the Wicket markup id
32
     * @param userIriString the user IRI
33
     */
34
    public AboutUserPanel(String id, String userIriString) {
35
        super(id);
×
36

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

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

51
        // Profile view with result actions to update the profile image/license;
52
        // needs the resourceWithProfile/id/contextId for the action links.
53
        View profileView = View.get(PROFILE_VIEW);
×
54
        add(QueryResultTableBuilder.create("profile", new QueryRef(profileView.getQuery().getQueryId(), "user", userIriString), new ViewDisplay(profileView))
×
55
                .resourceWithProfile(IndividualAgent.get(userIriString))
×
56
                .id(userIriString)
×
57
                .contextId(userIriString)
×
58
                .build());
×
59

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

63
        View vdView = View.get(AboutSpacePanel.VIEW_DISPLAYS_VIEW);
×
64
        add(QueryResultTableBuilder.create("viewdisplays", new QueryRef(vdView.getQuery().getQueryId(), "resource", userIriString), new ViewDisplay(vdView)).resourceWithProfile(IndividualAgent.get(userIriString)).id(userIriString).contextId(userIriString).build());
×
65
    }
×
66

67
}
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