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

knowledgepixels / nanodash / 27947621262

22 Jun 2026 10:54AM UTC coverage: 26.57% (-0.06%) from 26.63%
27947621262

push

github

web-flow
Merge pull request #492 from knowledgepixels/fix/observers-non-approved-union-scoping

feat: position-column tooltip labels on view-displays tables

1552 of 6873 branches covered (22.58%)

Branch coverage included in aggregate %.

3418 of 11832 relevant lines covered (28.89%)

4.25 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
     * View listing the presets assigned to a user. Mirrors the space preset-assignments view
38
     * but its "add preset" action links the user-specific template (offering only presets that
39
     * apply to users).
40
     */
41
    public static final String USER_PRESET_ASSIGNMENTS_VIEW = "https://w3id.org/np/RAd0UM_ll5a7Ewpg2VT5azZ7lh3S-K2ASCOIk2AgKfAJY/preset-assignments-view";
42

43
    /**
44
     * @param id            the Wicket markup id
45
     * @param userIriString the user IRI
46
     */
47
    public AboutUserPanel(String id, String userIriString) {
48
        super(id);
×
49

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

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

64
        // Profile view with result actions to update the profile image/license;
65
        // needs the resourceWithProfile/id/contextId for the action links.
66
        View profileView = View.get(PROFILE_VIEW);
×
67
        add(QueryResultTableBuilder.create("profile", new QueryRef(profileView.getQuery().getQueryId(), "user", userIriString), new ViewDisplay(profileView))
×
68
                .resourceWithProfile(IndividualAgent.get(userIriString))
×
69
                .id(userIriString)
×
70
                .contextId(userIriString)
×
71
                .build());
×
72

73
        View presetsView = View.get(USER_PRESET_ASSIGNMENTS_VIEW);
×
74
        add(QueryResultTableBuilder.create("presets", new QueryRef(presetsView.getQuery().getQueryId(), "resource", userIriString), new ViewDisplay(presetsView)).resourceWithProfile(IndividualAgent.get(userIriString)).id(userIriString).contextId(userIriString).build());
×
75

76
        View vdView = View.get(USER_VIEW_DISPLAYS_VIEW);
×
77
        add(QueryResultTableBuilder.create("viewdisplays", new QueryRef(vdView.getQuery().getQueryId(), "resource", userIriString), new ViewDisplay(vdView)).resourceWithProfile(IndividualAgent.get(userIriString)).id(userIriString).contextId(userIriString).build());
×
78
    }
×
79

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