Allow embedded_block in report to use a URL with /edit - fixes #325#870
Merged
philayres merged 4 commits intoconsected:developfrom Jan 23, 2026
Merged
Conversation
- Ruby: Extracted parse_embedded_block_url and build_embedded_block_html private methods - JavaScript: Added JSDoc comments and extracted setup_edit_mode function - Unit tests: Added shared examples for URL parsing tests - System tests: Added helper methods and shared examples for cleaner test organization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR implements GitHub issue #325 - allowing
embedded_blockin reports to open records in edit mode when the URL ends with/edit.Changes
Ruby Helper (
app/helpers/report_results/reports_common_result_cell.rb)cell_content_for_embedded_blockto detect URLs ending with/editdata-edit-mode="true"attribute to the target div for edit URLsJavaScript (
app/assets/javascripts/app/_fpa_ajax_processors_reports.js)report_embed_dynamic_blockpostprocessor to checkdata-edit-modeattributeajax:successhandler to close the modal after a successful saveBug Fix (
app/assets/javascripts/app/_fpa.js)was-inclass instead ofinTest Coverage
reports_common_result_cell_spec.rb- all passreport_embedded_block_spec.rb- all pass:Usage
To use the edit mode feature in a report, configure the column to show as
embedded_blockwith a URL ending in/edit:Fixes #325