Skip to content

GH-1680: Support create & delete operations on the prefix store through Fuseki UI - #4140

Open
ThomasThelen wants to merge 2 commits into
apache:mainfrom
ThomasThelen:issue_1680
Open

GH-1680: Support create & delete operations on the prefix store through Fuseki UI#4140
ThomasThelen wants to merge 2 commits into
apache:mainfrom
ThomasThelen:issue_1680

Conversation

@ThomasThelen

@ThomasThelen ThomasThelen commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

GitHub issue resolved #1793

Pull request Description:

#1683 appears to be pretty stalled, so I thought I'd try to get it over the finish line and figured a new pull request would be fair game. The general idea in the linked issue/PR to include a way to have stateful prefix and example queries shown on the query page. Most of the feedback was centered around finding a place to put the prefix state (we need to save the prefixes somewhere). Some time after the pull request was made, #2538 was merged which includes a Prefix Store, an ideal place to store prefixes...

#2538 wasn't scoped to include Fuseki changes so the custom prefixes never surfaced to the query page and instead, the same default prefixes would be shown. This PR has two pieces; I would be happy to drop the second commit or split into a different PR if found out of scope (it contains the most LoC changes and can be functionally separated).

  1. 22492af: Adds the prefixes from the Prefix Store to the query page. The changes are fairly minimal here: there's a new computed value for the prefixes (the endpoint); a new method for fetching the values and setting them in the UI; and endpoint glue in the fuseki service definition.
  2. 4ac471a: Adds CRUD operations for the prefixes. This inevitably came with some UI code, which is where most of the code changes are. There are two new form fields with validation, the submit button, and the confirm/cancel modal for deleting prefix maps.

UI Changes

The main challenge was figuring out how to support CRUD operations on the prefixes in the UI. The final design I came up has a "shadow" prefix pill for adding new ones. When clicked, two forms appear beneath the prefix list.

Supporting the editing prefixes was a challenge. Clicking a prefix already has behaviour defined where the prefix is loaded into the yasgui editor. Furthermore, several can be selected at once which makes editing in a non-bulk way difficult (if it would even make sense). Rather than test my IQ on figuring out how to create a UX for editing prefixes... I punted. Creating a new prefix new and deleting are the only operations supported. If a user wants to edit a prefix they can delete and re-add it as a workaround - I'm happy to hear any other ideas.

Demo

Here's what the user experience looks like

Screen.Recording.2026-08-09.at.7.04.52.PM.mov

Documentation

This might need user facing documentation, but I'm not sure if it's minor enough where it's fine without. If anyone thinks this should be in the user docs, I'll happily add some.

Tests

The tests were sort of brutal to get right but the gist is that correctness is checked in a lot of places by looking for the presence of HTML elements under different conditions.

Misc

Issue #1793 technically says or in the title... So I'm tempted to claim that on a technicality the issue can be closed along with #1683. The other reason being that #1459 takes care of the query portion. If necessary I can squash the two commits.


  • Tests are included.
  • Documentation change and updates are provided for the Apache Jena website
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

'srv.description': 'File Upload',
'srv.endpoints': ['upload']
},
{

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New mock elements for the prefix store

@ThomasThelen ThomasThelen changed the title Issue 1680 GH-1680: Support create & delete operations on the prefix store through Fuseki Aug 10, 2026
@afs afs changed the title GH-1680: Support create & delete operations on the prefix store through Fuseki GH-1680: Support create & delete operations on the prefix store through Fuseki UI Aug 10, 2026
@afs afs added the Fuseki UI label Aug 10, 2026
@afs

afs commented Aug 10, 2026

Copy link
Copy Markdown
Member

I changed the title to say "Fuseki UI" and added labels.
Nowadays, Fuseki server has, independently, prefix management operations.

@ThomasThelen

Copy link
Copy Markdown
Contributor Author

I noticed there was a way to share a little duplicated functionality (keeping track of the default prefixes) while re-reviewing this and pushed the commits post-CI. The original failing run ishere.

It's suspicious that there's a failure in jena-fuseki-main's TestModShiro when I was in jena-fuseki-ui`. I hit a failure on this test when I had a VPN enabled however, when turning it off the test passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fuseki UI: custom SPARQL query prefixes or examples

2 participants