Skip to content

Conversation

@pdurbin
Copy link
Member

@pdurbin pdurbin commented Jul 21, 2025

What this PR does / why we need it:

This is just a draft PR to help us start thinking about how to approach this issue:

The first use case is to avoid returning a JSF/xhtml URL to the SPA.

Which issue(s) this PR closes:

  • Closes #

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

The first use case is to avoid returning a JSF/xhtml URL to the SPA.
@coveralls
Copy link

Coverage Status

coverage: 23.174% (-0.001%) from 23.175%
when pulling a82f229 on 11648-jsf-vs-spa
into bfe59f0 on develop.

@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11648-jsf-vs-spa
ghcr.io/gdcc/configbaker:11648-jsf-vs-spa

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@ekraffmiller
Copy link
Contributor

Another thing to consider for this PR: the notification text that is currently being returned is for emails, not for the Notifications tab in the Account Page. For example, for a new role, the API returns
{
"id": 45,
"type": "ASSIGNROLE",
"subjectText": "Root: You have been assigned a role",
"messageText": "Hello, \nYou are now Admin for the dataverse "Scientific Research" (view at http://localhost:8080/dataverse/test-publish-collection-1753266873375 ).",
"sentTimestamp": "2025-07-23T10:19:09Z"
},

But for the Notifications tab, we see a different message:

Screenshot 2025-07-23 at 9 09 05 AM

So to support this, as Jim suggested, the dynamic values to insert into the translation text can be passed as additional parameters.

@qqmyers
Copy link
Member

qqmyers commented Jul 23, 2025

FWIW: To handle mail, I think we'd need a global (truly global or per-user) setting for preferred UI rather than a param on specific api calls - otherwise taking the same action from different UIs will result in different messages/one user might get emails pointing to different UIs if their colleagues make changes from different UIs.

It would also be nice to get the URL generation out of the properties files, i.e. by keeping the templates for dataverse/dataset/datafile page generation for different UIs in the db (which might mean new UIs could register their page links some day).

@pdurbin
Copy link
Member Author

pdurbin commented Jul 31, 2025

Closing. This was just an experiment. I got farther in another experiment at https://github.com/IQSS/dataverse/tree/11648-notification-patterns

As mentioned at #11673 (comment) @GPortas is taking a swing at this. We'll compare notes afterward.

@pdurbin pdurbin closed this Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants