Merged
Conversation
Change to ensure the following: - Save and exit: Only forced changes are applied. Non-forced proposals are discarded — the user never accepted them. - Save and continue: All changes are applied. Forced overrides get orange highlighting + warning. Non-forced fills get yellow highlighting for user review. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
The automation revision was wider-reaching than I'd realized. Fundamentally, having 2 badge sets (where someone might never see the other set) made it vitally important to ensure that only controlled sets were changes, and that all changes are shown to users. The result is much better for everyone. This documents the new rules, and tweaks the code to actually follow those rules. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
External automations may change *only* justifications. Test to ensure we highlight criteria in those cases too. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
In "Save and Continue" we re-run automation, filling in changes. However, the highlights weren't shown because of redirection. Add the info in the URL so the highlights are shown. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Remove dead code. We can't use hidden fields in a redirect, and it's too confusing to have 2 mechanisms for the same thing, so just use URL query strings. Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
…mation Resolves issue where license and implementation_languages fields were marked for automation highlighting in baseline forms but weren't actually displayed, causing user confusion and unnecessary database updates. Changes: - Moved license, implementation_languages, and CPE fields into the shared _form_basics.html.erb partial so they appear in all badge level forms (passing, silver, gold, baseline-1, baseline-2, baseline-3) - Renamed 'Identification' subsection to 'General' with new translation key 'General_project_info' to reflect that it now contains general project information shown across all badge levels - Added automation highlighting support for all three fields (yellow background when auto-filled by Chief detectives or external tools) - Updated ALWAYS_AUTOMATABLE to include cpe field - Updated PROJECT_BASE_FIELDS to include implementation_languages and cpe so they're loaded for all badge levels - Removed duplicate fields from _form_0.html.erb (passing form) Benefits: - Automation highlighting now works correctly for baseline forms - No more hidden field updates - users see all fields that can be automated - More consistent forms across all badge levels - CPE field can now be automated by both built-in and external automation - Collects useful project information (license, languages, CPE) for all badge levels, enabling better project analysis All tests pass (188 controller tests, 69 integration tests). Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Moves general_comments field from being only in the passing form to the shared _form_basics.html.erb partial, making it available in all badge level forms with automation highlighting support. Changes: - Added general_comments field to _form_basics.html.erb after CPE field - Added general_comments to ALWAYS_AUTOMATABLE constant - Added general_comments to PROJECT_BASE_FIELDS (loaded for all levels) - Removed general_comments from _form_0.html.erb (now in shared partial) - Removed LEVELS_WITH_EXTRA_METADATA constant (no longer needed) - Removed conditional logic for extra metadata fields Benefits: - Consistent forms across all badge levels (passing, silver, gold, baseline-1/2/3) - General comments can now be automated and highlighted when auto-filled - Removes inconsistency between passing and baseline forms - Simplifies controller code by eliminating special case logic All tests pass (188 controller tests, 69 integration tests). Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
Makes it clearer to users that clicking "Save (and continue)" will run automation to fill in unknown values. Changes: - Added robot emoji (🤖) to "Save (and continue)" button text - Added tooltip on button hover: "Runs automation to fill unknown values" - Added info icon (ℹ️) next to button with same tooltip - Added new translation key: save_and_continue_tooltip Implementation: - Updated all "Save (and continue)" buttons across all forms: * _form_0.html.erb (passing) - 6 buttons * _form_1.html.erb (silver) - 7 buttons * _form_2.html.erb (gold) - 6 buttons * _form_baseline.html.erb (baseline-1/2/3) - 2 buttons - Used internationalization (I18n.t) for all user-facing text Benefits: - Users immediately see the robot icon indicating automation - Hover reveals detailed explanation of what happens - Info icon provides additional visual cue for discoverability - Consistent with existing automation highlighting (robot emoji on fields) - All text is internationalized for translation All tests pass (188 controller tests, 69 integration tests). Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
The info icons were not adding value beyond the robot emoji and tooltip. Keeping just the robot emoji in the button text and the tooltip on hover provides sufficient visual cues without cluttering the interface. Changes: - Removed glyphicon-info-sign icons from all Save and continue buttons - Kept robot emoji (🤖) in button text - Kept tooltip on button hover All tests pass (188 controller tests). Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
The primary action is "Save (and continue)" so that should be read first. The robot emoji now follows the text as a visual hint that automation runs. Changes: - Changed button text from: 🤖 Save (and continue) - To: Save (and continue) 🤖 This improves readability by emphasizing the action (save) before the indicator (automation). All tests pass (188 controller tests). Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
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.
No description provided.