Commit 220d5a4
Add full file display with function highlighting
Summary:
Enhance the website to support displaying full Python source files with function range highlighting, in addition to the existing function-only view. This provides better context when debugging by showing the complete file while visually indicating the function boundaries.
Changes:
- dataLoader.ts: Add function_start_line and function_end_line to PythonSourceCodeInfo type
- CodeViewer.tsx:
* Add functionStartLine, functionEndLine, initialScrollToLine props
* Implement function range highlighting (visual markers for function boundaries)
* Add auto-scroll to function position on initial render
* Optimize scroll logic using scrollIntoView for accuracy
* Remove emoji markers and translate comments to English
- CodeViewer.css: Add function range highlight styles (.function-range, .function-range-start, .function-range-end)
- CodeView.tsx: Update container styling
Reviewed By: adamomainz
Differential Revision: D85825564
fbshipit-source-id: 4927c535bb28145028b560ce1bd5651da71deaca1 parent 2976887 commit 220d5a4
File tree
4 files changed
+258
-145
lines changed- website/src
- components
- pages
- utils
4 files changed
+258
-145
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 1 | | |
12 | 2 | | |
13 | 3 | | |
| |||
41 | 31 | | |
42 | 32 | | |
43 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
0 commit comments