Skip to content

Conversation

@Gitesh307
Copy link
Contributor

@Gitesh307 Gitesh307 commented Oct 1, 2025

Fixes #7440

This PR introduces a new feature Collection Preferences page that consolidates collection-level settings such as picklists, attachments, tree management, statistics, Specify Network integration, and catalog number inheritance. Updated localization handling to use explicit function calls, resolving scanner issues. No database changes; existing preferences migrate automatically at the collection level.

image image image

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone

Testing instructions

  • Verify the new Collection Preferences menu is visible only to authorized roles, settings can be saved and persist per collection.
  • Modify values in each section, ensure they save and persist after reload, and verify that the Reset button restores defaults correctly.

Test each option and verify application behavior responds to the setting

General

  • Scope "Entire Table" Picklists
  • Make Attachments Public By Default

Tree Management

If enabled, this allows users to add children to synonymized parents and to synonymize a node with children.

  • Taxon
  • Geography
  • Storage
  • Chronostratigraphy
  • Lithostratigraphy
  • Tectonic Unit

Statistics

  • Show Preparation Totals
  • Auto-Refresh Rate (Hours)
    The following two cannot really be tested at the moment...
  • GBIF Publishing Organization Key
  • GBIF Data Set Key

Catalog Number Inheritance

  • Enable Catalog number Inheritance From Primary Collection Object
  • Enable Catalog number Inheritance From Parent Collection Object

grantfitzsimmons and others added 30 commits June 30, 2025 20:56
Triggered by 30c35c6 on branch refs/heads/issue-6843
Triggered by 95c7c50 on branch refs/heads/issue-6843
Suggested by @CarolineDenis
Triggered by 86a8e33 on branch refs/heads/issue-6843
Triggered by 5d91e20 on branch refs/heads/issue-6843
const props = {
className: `
flex items-start gap-2 md:flex-row flex-col
${canEdit ? '' : '!cursor-not-allowed'}
Copy link
Contributor

Choose a reason for hiding this comment

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

is this secure enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That just affects cursor/UX. The real permission check comes from canEdit flowing into the ReadOnlyContext, which disables the inputs and prevents writes. That matches how the existing user-preferences UI enforces permissions, and the server still validates everything, so the security level is the same as production.

@CarolineDenis CarolineDenis requested a review from a team November 12, 2025 17:16
Copy link
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

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

  • Verify the new Collection Preferences menu is visible only to authorized roles, settings can be saved and persist per collection.

After looking at this some more, can you provide some more insight here? It seems like we need to expand or clarify the permission for CollectionPreferences as this is not explicitly added as an option.

What is the criteria for "authorized roles" in this case?

Image
  • Modify values in each section, ensure they save and persist after reload, and verify that the Reset button restores defaults correctly.

General

  • Scope "Entire Table" Picklists

With this enabled (same behavior with or without this checked):

Image Image Image

Seems not to take effect. Have you been able to demonstrate this? Can you add screenshots?

  • Make Attachments Public By Default

Tree Management

Confirmed by creating synonyms for nodes with children and added children under existing and new synonyms.

  • Taxon
  • Geography
  • Storage
  • Chronostratigraphy
  • Lithostratigraphy
  • Tectonic Unit

Statistics

  • Show Preparation Totals
  • Auto-Refresh Rate (Hours)

The following two cannot really be tested at the moment... I think we should consider hiding these from the UI (commented out) but keeping the localized strings? We need to demonstrate or understand how these are being used... 🤷

  • GBIF Publishing Organization Key
  • GBIF Data Set Key

Catalog Number Inheritance

COGs

  • Enable Catalog number Inheritance From Primary Collection Object

Being resolved in #7539, can be addressed outside of this PR.

Components

  • Enable Catalog number Inheritance From Parent Collection Object

Works 😄

@Gitesh307
Copy link
Contributor Author

Gitesh307 commented Nov 13, 2025

@grantfitzsimmons For the Picklist I am able to achieve the exact behaviour
With scope entire table pick list checked I am getting:
image

With scope entire table pick list unchecked :
image
image
Can you just try with clearing browser cache every time you check or uncheck the checkbox?

For accessibility

Institution Admin / Collection Admin: Those roles get the wildcard %/% policy plus full table permissions that means they have the access to the collection preferences by default
I have added the option to set the collection preferences access for users if they explicitly have the App Resources edit permission.

Screenshot 2025-11-13 at 7 39 47 PM

@grantfitzsimmons
Copy link
Member

From my earlier comment:

The following two cannot really be tested at the moment... I think we should consider hiding these from the UI (commented out) but keeping the localized strings? We need to demonstrate or understand how these are being used... 🤷

Will review soon!

@grantfitzsimmons
Copy link
Member

@Gitesh307 Can you fix the conflicts? 224 commits behind now

Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

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

  • Verify the new Collection Preferences menu is visible only to authorized roles, settings can be saved and persist per collection.
  • Modify values in each section, ensure they save and persist after reload, and verify that the Reset button restores defaults correctly.

Test each option and verify application behavior responds to the setting

General

  • Scope "Entire Table" Picklists
  • Make Attachments Public By Default

Tree Management

If enabled, this allows users to add children to synonymized parents and to synonymize a node with children.

  • Taxon
  • Geography
  • Storage
  • Chronostratigraphy
  • Lithostratigraphy
  • Tectonic Unit

Statistics

  • Show Preparation Totals
  • Auto-Refresh Rate (Hours)
    The following two cannot really be tested at the moment...
  • GBIF Publishing Organization Key
  • GBIF Data Set Key

Catalog Number Inheritance

  • Enable Catalog number Inheritance From Primary Collection Object
  • Enable Catalog number Inheritance From Parent Collection Object

Generally the functionality seems to be working but I did run into some issues.

  • First thing I noticed was that Catalog number inheritance appears twice on the side bar
image
  • Also under the catalog number inheritance section shouldn't there be a 'Component' heading above the Parent Collection Object checkbox?
image
  • Trees are not sorted properly
    Issue branch:
image

Main:
image

@emenslin Fixed in the latest commit. Can you take another look?

@Iwantexpresso Iwantexpresso self-requested a review November 14, 2025 19:44
@Gitesh307 Gitesh307 requested a review from emenslin November 17, 2025 01:09
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

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

  • Verify the new Collection Preferences menu is visible only to authorized roles, settings can be saved and persist per collection.
  • Modify values in each section, ensure they save and persist after reload, and verify that the Reset button restores defaults correctly.

Test each option and verify application behavior responds to the setting

General

  • Scope "Entire Table" Picklists
  • Make Attachments Public By Default

Tree Management

If enabled, this allows users to add children to synonymized parents and to synonymize a node with children.

  • Taxon
  • Geography
  • Storage
  • Chronostratigraphy
  • Lithostratigraphy
  • Tectonic Unit

Statistics

  • Show Preparation Totals
  • Auto-Refresh Rate (Hours)
    The following two cannot really be tested at the moment...
  • GBIF Publishing Organization Key
  • GBIF Data Set Key

Catalog Number Inheritance

  • Enable Catalog number Inheritance From Primary Collection Object
  • Enable Catalog number Inheritance From Parent Collection Object

Looks good, my previous issues with catalog number inheritance were fixed. I did notice though that now the default sorting for trees is name but it should be Rank ID.

Issue branch:

11-18_08.32.mp4

Main:

11-18_08.34.mp4

@CarolineDenis CarolineDenis removed this from the 7.12.0 milestone Dec 19, 2025
@github-project-automation github-project-automation bot moved this from Dev Attention Needed to ✅Done in General Tester Board Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Refactor and add UI to control Collection preferences

8 participants