Repository navigation
Add a CLI flag for click-to-highlight BOM rows - #598
Open
louisss1016 wants to merge 1 commit into
Open
louisss1016 wants to merge 1 commit into
louisss1016 wants to merge 1 commit into
Conversation
qu1ck
requested changes
Nov 12, 2026
| nargs='?', | ||
| help='Highlight first pin.') | ||
| parser.add_argument('--highlight-row-on-click', | ||
| help='Highlight BOM rows on click by default.', |
Member
There was a problem hiding this comment.
Change help string to indicate what default behavior is:
Highlight BOM rows on click (default is highlight on hover).
| import InteractiveHtmlBom # noqa | ||
|
|
||
|
|
||
| @pytest.mark.parametrize('args, expected', [([], False), (['--highlight-row-on-click'], True)]) |
Member
There was a problem hiding this comment.
This test is misplaced and is more like an integration test.
Add test_config.py and write it as a proper unit test that doesnt start any child processes.
This branch has not been deployed
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.
Problem
The generated BOM already lets readers switch from hover to click highlighting, but a CLI export cannot set the initial mode.
Change
--highlight-row-on-clicksets click highlighting as the default for the generated page. The existing hover default applies when the flag is omitted, including for config data that lacks the new key. Saved browser preferences still take precedence.Refs #597 for the CLI request.
Verification
python3 -m pytest -vv testspassed 16/16 before and 18/18 after. With only the new tests applied, the flagged export failed with argparse's unrecognized-argument error.node --check InteractiveHtmlBom/web/util.js,git diff --check, and the Hatchling wheel build passed. A full mypy comparison reported the same 37 existing diagnostics before and after.AI assistance was used for implementation and verification.