Adds a wrapping div to allow scrolling of overflowed tables
Details
Details
Really really really big table in Phriction, See scrollbar
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Branch
- table-wrap
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 8462 Build 9740: Run Core Tests Build 9739: arc lint + arc unit
Event Timeline
Comment Actions
That test failure is probably really you? I'm guessing it's a test checking what the output of tables looks like? Or no?
Comment Actions
On Build 9730, it's got this:
FAIL PhutilRemarkupEngineTestCase::testEngine 182 Assertion failed, expected values to be equal (at PhutilRemarkupEngineTestCase.php:56): Failed to markup HTML in file 'newline-then-block.txt'. 183 Expected vs Actual Output Diff 184 --- Old Value 185 +++ New Value 186 @@ -1,8 +1,8 @@ 187 '<p>This is a paragraph.</p> 188 189 <div class="remarkup-code-block" data-code-lang="txt" data-sigil="remarkup-code-block"><pre class="remarkup-code">First line of code block. 190 Second line of code block.</pre></div> 191 192 -<table class="remarkup-table"> 193 +<div class="remarkup-table-wrap"><table class="remarkup-table"> 194 <tr><td>Cell 1</td><td>Cell 2</td></tr> 195 -</table>' 196 +</table></div>' 197
...which is a legitimate failure (the markup emitted by tables has changed).
src/markup/engine/__tests__/remarkup/table.txt | ||
---|---|---|
1–7 | This part shouldn't change -- it's the input (what you'd type in a comment area) and we don't expect users to type the <div /> part. | |
7–8 | From the output, it looks like the actual markup that is produced is just like this: <div ...><table ...> ... </table></div> ...not on separate lines like it's written? <div ...> <table ...> ... </table> </div> |
Comment Actions
Running unit tests... FAIL PhutilRemarkupEngineTestCase::testEngine Assertion failed, expected values to be equal (at PhutilRemarkupEngineTestCase.php:56): Failed to markup HTML in file 'simple-table-with-link.txt'. Expected vs Actual Output Diff --- Old Value +++ New Value @@ -1,3 +1,3 @@ -'<table class="remarkup-table"> +'<div class="remarkup-table-wrap"><table class="remarkup-table"> <tr><td><a href="http://example.com" class="remarkup-link" target="_blank" rel="noreferrer">name</a></td><td>[x]</td></tr> -</table>' +</table></div>'