Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "view as scrollable element" not working (#5680)
The issue was due to cell output metadata being set to `undefined` by the Positron notebook controllers, causing the `scrollable` metadata to not be set here: https://github.com/posit-dev/positron/blob/54d791da6b5e015ff03a596a848c8893cf90d3bd/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts#L766-L769 We now set metadata and also set `outputType` since it also makes life easier for the ipynb serializer: https://github.com/posit-dev/positron/blob/3a8978af98c6b8b03a98916a9bf8b91ba7070df3/extensions/ipynb/src/serializers.ts#L182 ### QA Notes 1. Run a Python notebook cell with the following code: ```python # code with error def divide_numbers(numbers): result = [] for num in numbers: result.append(10 / num) return result numbers_to_divide = [2, 4, 0, 5, 7] try: divide_numbers(numbers_to_divide) except Exception as e: error_message = f"Error: {e}\n" * 50 # Repeat error message raise RuntimeError(error_message) ``` 2. Click "View as scrollable element" - it should work. 3. Also try the "Notebook: Toggle scrollable element" command with the cell selected.
- Loading branch information