Repository navigation
Commit 9c96fd8
API rail: share the window height between request and response code (#4696)
* API rail: stop the Base URL and examples from scrolling
Only the examples panel shrinks now, and the response fills the height left in the rail instead of a fixed guess.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* API rail: scroll as one column like the navigation
Replace the shrinking examples chain with a single scrolling rail, and open the Copy page menu inward so the rail does not clip it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* API rail: share the window height between request and response code
The rail no longer scrolls. The shorter sample shows in full and the longer one gets the rest, with at least five lines each. The examples column is 40px wider and the reference 40px narrower.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: keep the API rail as tall as its content on short pages
The rail had a fixed window height, so on short pages the first grid row grew to the window and pushed the page feedback down. The balance script now reads the rail's max-height instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: re-balance the API code heights when the language, tab or scenario changes
A capped sample keeps its size when another one becomes active, so the resize observers never saw the change and a longer sample stayed clipped to the previous one's height.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: count a horizontal scrollbar in the API code heights
scrollHeight leaves out a horizontal scrollbar while max-height counts it, so with classic scrollbars a short sample with a wide line lost its last line to a vertical scrollbar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: share one resize listener across API example panels (per review by @infra-vault-gh-plugin-prod)
Every HTMX navigation added a window listener that kept the previous page's panel alive. One listener now balances the connected panels and stops the observers of the detached ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: cover API code re-balancing on window growth and language change (per review by @infra-vault-gh-plugin-prod)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test: cover the horizontal scrollbar in API code heights (per review by @infra-vault-gh-plugin-prod)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Jan Calanog <reakaleek@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>1 parent e81b113 commit 9c96fd8
8 files changed
Lines changed: 461 additions & 24 deletions
File tree
- src/Elastic.Documentation.Site/Assets
- ds/tokens
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1034 | 1041 | | |
1035 | 1042 | | |
1036 | 1043 | | |
| |||
2964 | 2971 | | |
2965 | 2972 | | |
2966 | 2973 | | |
2967 | | - | |
| 2974 | + | |
2968 | 2975 | | |
2969 | 2976 | | |
2970 | 2977 | | |
| |||
2985 | 2992 | | |
2986 | 2993 | | |
2987 | 2994 | | |
2988 | | - | |
2989 | | - | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
2990 | 2998 | | |
2991 | 2999 | | |
2992 | 3000 | | |
| |||
2995 | 3003 | | |
2996 | 3004 | | |
2997 | 3005 | | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
| 3010 | + | |
2998 | 3011 | | |
2999 | 3012 | | |
3000 | | - | |
| 3013 | + | |
3001 | 3014 | | |
3002 | 3015 | | |
3003 | 3016 | | |
| |||
3994 | 4007 | | |
3995 | 4008 | | |
3996 | 4009 | | |
3997 | | - | |
3998 | | - | |
3999 | | - | |
| 4010 | + | |
4000 | 4011 | | |
| 4012 | + | |
| 4013 | + | |
| 4014 | + | |
| 4015 | + | |
4001 | 4016 | | |
4002 | | - | |
4003 | | - | |
4004 | | - | |
4005 | | - | |
| 4017 | + | |
4006 | 4018 | | |
4007 | 4019 | | |
4008 | 4020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
763 | 764 | | |
764 | 765 | | |
765 | 766 | | |
| 767 | + | |
766 | 768 | | |
767 | 769 | | |
768 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 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 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
0 commit comments