diff --git a/.github/scripts/check-whitespace.py b/.github/scripts/check-whitespace.py index 2b1fbfffd3..bf06d03bcc 100644 --- a/.github/scripts/check-whitespace.py +++ b/.github/scripts/check-whitespace.py @@ -276,6 +276,19 @@ class TestChecker: ) -> None: self._assert_check(Checker._check_trailing_whitespaces, content, expected_issues, fixed, check, line_ending) + def test_trailing_whitespace_runs_before_eof_newline(self, tmp_path: Path) -> None: + # 'foo\n\s\s` should result in `foo\n`. + # If we run eof check first before trailing whitespace check, + # it will result in `foo\n\n` instead. + filepath = tmp_path / "test.txt" + filepath.write_bytes(b"foo\n \n\n") + + checker = Checker(LF) + checker.check_trailing_whitespaces(filepath, False) + checker.check_eof_newline(filepath, False) + + assert filepath.read_bytes() == b"foo\n" + @staticmethod def run_tests(extra_args: list[str] | None = None) -> None: pytest.main([__file__, *(extra_args or [])]) @@ -382,8 +395,8 @@ def main() -> int: checker.set_newline_for_path(filepath) checker.check_stray_cr(filepath, args.check) checker.check_line_endings_mismatch(filepath, args.check) - checker.check_eof_newline(filepath, args.check) checker.check_trailing_whitespaces(filepath, args.check) + checker.check_eof_newline(filepath, args.check) print(f"{len(filepaths)} file(s) checked.") if not checker.issues: color = C.GREEN diff --git a/src/bonsai/bonsai/bim/data/webui/static/css/components/layeredViewPanel.css b/src/bonsai/bonsai/bim/data/webui/static/css/components/layeredViewPanel.css index b564940b5f..8341e3e03d 100644 --- a/src/bonsai/bonsai/bim/data/webui/static/css/components/layeredViewPanel.css +++ b/src/bonsai/bonsai/bim/data/webui/static/css/components/layeredViewPanel.css @@ -5,8 +5,8 @@ box-shadow: 0 0 0 3px #28a745; color: #ddd; } - - + + .classificationView { border-left: 5px solid #28a745; min-height: 200px; @@ -15,20 +15,20 @@ padding: 5px; max-height: 400px; } - + .selectedClassificationText { color: #28a745; } - + .back-button { margin-bottom: 20px; } - + .back-button:disabled { cursor: not-allowed; background-color: #ccc; } - + .classification-cell { display: flex; flex-direction: column; @@ -36,8 +36,7 @@ align-items: center; height: 100%; } - + .classification { height: 100%; } - \ No newline at end of file