Skip to content

fix: removed add button from collectionPreferences of the SpAppResource table #7684

Open
kwhuber wants to merge 5 commits intomainfrom
issue-4950
Open

fix: removed add button from collectionPreferences of the SpAppResource table #7684
kwhuber wants to merge 5 commits intomainfrom
issue-4950

Conversation

@kwhuber
Copy link
Contributor

@kwhuber kwhuber commented Feb 4, 2026

Fixes #4950

This fix removes the add button from the collectionPreferences App Resource. In the UI, this is noticeable when you navigate to User Tools --> App Resources --> Collection Preferences. At the bottom right of the screen, only a save button appears now as the add button did not serve a necessary purpose.

The change comes by hiding the add button for the specific Collection Preferences App Resource (while for other App Resources it will be unaffected) in Save.tsx:

!disableAdd.includes(tableName) && !FORBID_ADDING.has(tableName) && !(tableName === 'SpAppResource' && appResourceName === 'CollectionPreferences');

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
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

  • Go to app resources, click on collection preferences, and verify that the add button is absent
  • Verify that other app resources still have add button functionality

@kwhuber kwhuber added this to the 7.12.0 milestone Feb 4, 2026
@kwhuber kwhuber requested a review from a team February 4, 2026 20:56
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Feb 4, 2026
@kwhuber
Copy link
Contributor Author

kwhuber commented Feb 4, 2026

As an aside, I have a comment about a couple minor UI bugs regarding the save button within collection preferences depending on where it's accessed.

For example, going through the route of User Tools --> App Resources --> Collection Preferences, the save button begins as grayed out. After making edits but then returning to default state, it reappears as its beginning grayed out state. It makes more sense to have this be a functional close button.

Screen.Recording.2026-02-04.at.3.02.58.PM.mov

Going straight to User Tools --> Collection Preferences, there is a functional close button as default. This makes sense! However, if I alter the page by selecting and unselecting options and then return to how it was at the beginning, I cannot return to the original state close button.

Screen.Recording.2026-02-04.at.3.04.25.PM.mov

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.

  • Go to app resources, click on collection preferences, and verify that the add button is absent

Looks good! My only note is that this applies to all app resources not just collection preferences, this seems intentional based on what you said at the beginning of the PR; however, since the testing instructions only mention checking collection preferences I wanted to make note of it here.

Also just so you know I did look at your videos and I was not able to recreate the issue when going through app resources, and I honestly don't recall ever running into it (although I could be wrong) so there might be something else effecting that behavior.

02-09_11.19.mp4

@emenslin emenslin requested a review from a team February 9, 2026 18:06
@kwhuber kwhuber changed the title fix: removed add button from SpAppResource table fix: removed add button from collectionPreferences of the SpAppResource table Feb 10, 2026
@kwhuber
Copy link
Contributor Author

kwhuber commented Feb 10, 2026

@emenslin Thank you for your feedback! I revised my solution because it was wrong to disable add for all app resources.

Regarding my comment about the save button, your video does in fact show what I discussed. Notice how when you enter the form, the bottom right button is a white/gray "unclickable" save button?
Screenshot 2026-02-10 at 1 13 19 PM
Wouldn't it make more sense if this was a close button (like in my second video above) instead when nothing has yet been altered? Then, if you do unclick boxes and then return to the state in which you entered the form (default), it lets you resave (but there is nothing to resave).

I think there should be a change made here to recognize that nothing has actually changed and the button should return to how it was when you entered the form.

Does that make sense?

@kwhuber kwhuber requested a review from emenslin February 10, 2026 19:20
Copy link
Collaborator

@combs-a combs-a left a comment

Choose a reason for hiding this comment

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

  • Go to app resources, click on collection preferences, and verify that the add button is absent
  • Verify that other app resources still have add button functionality

It is disabled on Collection Preferences. 👍

Not within in the scope of this PR since this does not cause an error when pressed, but wanted to note: or other things like Default Preferences and User Preferences, the Add button is still present. User Preferences also does not have an Add button if you navigate to it directly through the User Tools menu, so I wanted to note that it was inconsistent. I'll split it off into a separate QoL issue.

image

@bhumikaguptaa bhumikaguptaa self-requested a review February 16, 2026 18:11
Copy link
Collaborator

@bhumikaguptaa bhumikaguptaa left a comment

Choose a reason for hiding this comment

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

  • Go to app resources, click on collection preferences, and verify that the add button is absent
  • Verify that other app resources still have the add button functionality

Works as expected. The add button is disabled in Collection Preferences.

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

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

Add button in collection preferences gives a 404 error

5 participants