tc39 / ecma262

Status, process, and documents for ECMA-262
https://tc39.es/ecma262/
Other
15k stars 1.28k forks source link

Editorial: Pivots the tables within clause 16.2.1.5.4 #3342

Closed gesa closed 2 months ago

gesa commented 4 months ago

This provides improved readability while maintaining the same information.

I will also be making these changes to the ever-so-slightly different 2024 branch, but i will likely not open a pr on that branch as that work’s mostly for me.

syg commented 3 months ago

Now that I see the "Field / Module" test, I don't actually like how it looks.

What do people think of the following:

          <emu-table id="table-module-graph-cycle-async-fields-7" caption="Module fields after module _C_ finishes with an error">
            <table>
              <col>
              <col span="2"></colgroup>
              <thead>
                <tr>
                  <td></td>
                  <th colspan="2" scope="colgroup">Module</th>
                </tr>
                <tr>
                  <td></td>
                  <th scope="col">_A_</th>
                  <th scope="col">_C_</th>
                </tr>
              </thead>
              <tr>
                <th scope="row">[[DFSIndex]]</th>
                <td>0</td>
                <td>3</td>
              </tr>
              <tr>
                <th scope="row">[[DFSAncestorIndex]]</th>
                <td>0</td>
                <td>0</td>
              </tr>
              <tr>
                <th scope="row">[[Status]]</th>
                <td>~evaluated~</td>
                <td>~evaluated~</td>
              </tr>
              <tr>
                <th scope="row">[[AsyncEvaluation]]</th>
                <td>*true*</td>
                <td>*true*</td>
              </tr>
              <tr>
                <th scope="row">[[AsyncParentModules]]</th>
                <td>« »</td>
                <td>« _A_ »</td>
              </tr>
              <tr>
                <th scope="row">[[PendingAsyncDependencies]]</th>
                <td>1 (_B_)</td>
                <th>0</th>
              </tr>
              <tr>
                <th scope="row">[[EvaluationError]]</th>
                <td>~empty~</td>
                <td>_C_'s evaluation error</td>
              </tr>
            </table>
          </emu-table>

Screenshot from 2024-06-05 12-16-36

bakkot commented 3 months ago

@syg's suggestion works for me. Alternatively, something like this:

Screenshot 2024-06-05 at 3 07 25 PM

code from chatgpt ```html
Fields Modules
A B
[[DFSIndex]] data1 data2
[[DFSAncestorIndex]] data3 data4
```
syg commented 3 months ago

@bakkot's snippet is my preference.

michaelficarra commented 3 months ago

@bakkot I'm fine with something like that, but the padding needs to be adjusted so we don't have the labels shoved in the corners.

michaelficarra commented 3 months ago

Added the slashed corner header cell. It looks like this:

image

bakkot commented 3 months ago

Looks great.

michaelficarra commented 3 months ago

@syg Can you take a look at the screenshot I posted and let us know if this is ready to merge?