Page MenuHomePhabricator

Make empty Remarkup table rows have more intuitive behavior
ClosedPublic

Authored by epriestley on Jun 19 2017, 10:23 PM.
Tags
None
Referenced Files
F14636113: D18140.diff
Fri, Jan 10, 10:30 PM
Unknown Object (File)
Dec 5 2024, 3:45 PM
Unknown Object (File)
Nov 30 2024, 7:49 AM
Unknown Object (File)
Nov 24 2024, 10:57 PM
Unknown Object (File)
Nov 21 2024, 5:45 AM
Unknown Object (File)
Nov 17 2024, 3:03 PM
Unknown Object (File)
Nov 11 2024, 8:07 AM
Unknown Object (File)
Nov 9 2024, 2:08 PM
Subscribers
None

Details

Summary

Fixes T12849. Currently, when a row contains only empty cells and cells with "----" in them, we treat it as indicating which cells above should be rendered with <th /> instead of <td />.

This produces an unintuitive result when every cell is empty.

Instead, treat a row as a "headings" row only if it has at least one "---" cell in it.

Test Plan

Added a unit test.

Note that the resulting row is empty, so it doesn't get normal line height.

Screen Shot 2017-06-19 at 3.20.08 PM.png (517×353 px, 22 KB)

Diff Detail

Repository
rPHU libphutil
Branch
emptyrow
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 17535
Build 23528: Run Core Tests
Build 23527: arc lint + arc unit

Event Timeline

Specifically, the old syntax supports this:

| !!Things!! | Big | Small |
| |--|--|
| Left | Yes | Maybe
| -- |
| Right | No | Sometimes |
| -- |

...to produce this:

ThingsBigSmall
LeftYesMaybe
RightNoSometimes
This revision is now accepted and ready to land.Jun 20 2017, 3:38 AM
This revision was automatically updated to reflect the committed changes.