Add :tab and :booleanType to permit call in view #266
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR resolves an issue we've noticed with our log stream, where there are warnings about unpermitted parameters on result page loads. The root cause appears to be that the partial which loads the tab links for USE uses the
params.permit()pattern, while not accounting for the fact that the search controller has added two additional parameters that aren't listed.The simplest solution has been to add those two parameters, which appears to silence the log messages. I've checked this with the application in Geodata mode, and the log messages are likewise absent there - although if I'm right about the root cause, Geodata wouldn't have seen these messages anyway because it doesn't load the tabs partial.
There are other options available for resolving this condition - I came up with two during the course of this work. Each are slightly more work than this, but may be more robust than what I'm proposing. In particular, the approach in this PR requires us to keep the list of parameters in the tabs partial in sync with any parameters that the search controller adds. That coordination issue feels non-ideal, but I want to propose this PR as-is in case I'm overthinking the solution. Our roadmap for this application may not require any further manipulation of the parameters by the search controller.
The commit message has a more thorough exploration of the alternatives, so please check that out if you're curious.
Developer
Accessibility
New ENV
Approval beyond code review
Additional context needed to review
E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.
Code Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing