Skip to content

ANW-1844: Render request modal conditionally based on pui_page_actions_request#3516

Merged
thimios merged 1 commit intomasterfrom
ANW-1844-sticky-request_modal
Apr 17, 2025
Merged

ANW-1844: Render request modal conditionally based on pui_page_actions_request#3516
thimios merged 1 commit intomasterfrom
ANW-1844-sticky-request_modal

Conversation

@brianzelip
Copy link
Copy Markdown
Collaborator

@brianzelip brianzelip commented Apr 15, 2025

This PR fixes ANW-1844 by not adding the PUI request modal to the DOM when AppConfig[:pui_page_actions_request] is false.

Solution

The following screenshot shows that the "Request" button is not present in the toolbar towards the top of the page. It also shows the browser dev tools confirming that #request_modal, the CSS selector for the modal element containing the request form, is not present in the DOM.

ANW-1844-solution

@brianzelip brianzelip force-pushed the ANW-1844-sticky-request_modal branch from 8774133 to c67ca3a Compare April 15, 2025 15:43
@brianzelip brianzelip marked this pull request as ready for review April 15, 2025 15:44
@brianzelip brianzelip force-pushed the ANW-1844-sticky-request_modal branch 3 times, most recently from 188a2d2 to d3b9e6d Compare April 15, 2025 23:15
@brianzelip brianzelip requested a review from thimios April 15, 2025 23:32
@brianzelip brianzelip added this to the 4.0.1 milestone Apr 16, 2025
describe 'Request modal', js: true do
before(:all) do
@resource = create(:resource, publish: true)
run_indexers
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think you need to run indexers since you are directly accessing the resource page in these specs

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@thimios I'm not sure this suggestion is correct as the test broke after removing run_indexers, see https://github.com/archivesspace/archivesspace/actions/runs/14499815813/job/40676562268. Adding it back makes the test pass.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@brianzelip you are right! My suggestion would work on the SUI feature specs but not on the PUI

@brianzelip brianzelip force-pushed the ANW-1844-sticky-request_modal branch 2 times, most recently from fe38f23 to ccd7816 Compare April 16, 2025 18:44
@brianzelip brianzelip force-pushed the ANW-1844-sticky-request_modal branch from ccd7816 to 1b75d27 Compare April 17, 2025 11:05
@thimios thimios merged commit 1aae150 into master Apr 17, 2025
9 of 10 checks passed
@thimios thimios deleted the ANW-1844-sticky-request_modal branch April 17, 2025 11:41
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.

2 participants