Page MenuHomePhabricator

Add scroll wrapper for big tables
ClosedPublic

Authored by chad on Oct 27 2015, 8:17 PM.
Tags
None
Referenced Files
F13059196: D14354.diff
Fri, Apr 19, 3:50 PM
Unknown Object (File)
Thu, Apr 11, 9:32 AM
Unknown Object (File)
Sat, Mar 30, 10:56 AM
Unknown Object (File)
Sat, Mar 30, 7:00 AM
Unknown Object (File)
Fri, Mar 29, 8:21 AM
Unknown Object (File)
Mar 12 2024, 5:20 AM
Unknown Object (File)
Mar 10 2024, 12:20 PM
Unknown Object (File)
Mar 9 2024, 2:03 PM
Subscribers

Details

Summary

Adds a wrapping div to allow scrolling of overflowed tables

Test Plan

Really really really big table in Phriction, See scrollbar

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Add scroll wrapper for big tables.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added a reviewer: epriestley.
epriestley edited edge metadata.

That test failure is probably really you? I'm guessing it's a test checking what the output of tables looks like? Or no?

This revision now requires changes to proceed.Oct 27 2015, 8:33 PM

Operator extension not available.

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).

chad edited edge metadata.
  • add unit test

Updated the test, but unsure what's causing the test to not run.

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>
chad edited edge metadata.
  • add unit test
  • more tests
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>'

ok, i'm bad at reading, didn't really it was a new test failing each fix.

epriestley edited edge metadata.
This revision is now accepted and ready to land.Oct 27 2015, 8:51 PM
This revision was automatically updated to reflect the committed changes.