Public: anyone can read this; the crew can change it.

A fork's following panel draws §5's card, row and btn, and the .following-* classes leave the markup #4209

opened this

Merged 45d 2h ago, live in production

A fork's following panel is now built from §5's card, row and btn, and none of the old .following classes appear in its HTML. The type check, test/design-lint.test.ts and the following tests pass. I didn't run the full suite, and there are no screenshots since the sandbox has no browser.

Notes

opened this

A fork's following panel is now built from §5's card, row and btn, and none of the old .following* classes appear in its HTML. The type check, test/design-lint.test.ts and the following tests pass. I didn't run the full suite, and there are no screenshots since the sandbox has no browser.

  • Head: the card head holds the fork icon, "following" and a link to the parent, then the status badge.
  • Body: the sentence, the releases block, the crew note and "N forks follow this one" are each a row in a list. The forks line is still a link to /forks.
  • Foot: the buttons sit in the card foot. The forms post the same fields (do=take, do=converge and do=propose) to the same URL.
  • Releases: releasesBlock is now a row too, with the release links as its meta.
  • Rules kept: I left the .following* rules in content.ts and docs/DESIGN.md alone, for part two.
  • Test: the old assertion in test/following-card.test.ts expected following-eyebrow and following-sentence, so I rewrote it. It now checks that the five old class names and a bare following class are absent, and that the card head, badge, row and parent link are present. I did not add a test that asserts the three forms or the take/converge/propose buttons. test/following.test.ts still passes unchanged and is what covers the posted forms.
  • Look to check: the panel loses the .following 12px top margin, since the .card + .card spacing rule now applies instead. The buttons also move from inline under the sentence into the card foot, which has the muted background and a top border.

Closes #4152

2 earlier comments
commented

A fork's following panel is now built from §5's card, row and btn, and none of the old .following* classes appear in its HTML. The type check, test/design-lint.test.ts and the following tests pass. I didn't run the full suite, and there are no screenshots since the sandbox has no browser.

  • Head: the card head holds the fork icon, "following" and a link to the parent, then the status badge.
  • Body: the sentence, the releases block, the crew note and "N forks follow this one" are each a row in a list. The forks line is still a link to /forks.
  • Foot: the buttons sit in the card foot. The forms post the same fields (do=take, do=converge and do=propose) to the same URL.
  • Releases: releasesBlock is now a row too, with the release links as its meta.
  • Rules kept: I left the .following* rules in content.ts and docs/DESIGN.md alone, for part two.
  • Test: the old assertion in test/following-card.test.ts expected following-eyebrow and following-sentence, so I rewrote it. It now checks that the five old class names and a bare following class are absent, and that the card head, badge, row and parent link are present. I did not add a test that asserts the three forms or the take/converge/propose buttons. test/following.test.ts still passes unchanged and is what covers the posted forms.
  • Look to check: the panel loses the .following 12px top margin, since the .card + .card spacing rule now applies instead. The buttons also move from inline under the sentence into the card foot, which has the muted background and a top border.
commented

I fixed the release links and added the foot-forms test. I left the dead CSS alone. I pushed to the same branch. The type check, test/design-lint.test.ts, test/following-card.test.ts and test/following.test.ts pass; I didn't run the full suite.

  • Release links: releasesBlock now gives each new release its own row, and each row is a full-width link, so a thumb can hit it on a 360px phone. I chose rows over a separator because .row-meta is single-line and clips with an ellipsis, so several links would have been cut off.
  • Foot-forms test: a second test in test/following-card.test.ts makes the fork ahead and the parent ahead. It asserts that .card-foot holds exactly two post forms to /bob/lib/following, with do=take then do=propose, and that each contains a submit btn. I didn't assert the converge form: it needs a crew and a conflict, which that test doesn't set up.
  • Dead CSS: not changed, and I disagree with doing it here. Issue #4152 says not to delete the .following* rules from content.ts and not to edit docs/DESIGN.md. It says part two does that, and the design check stays green because those classes are still defined and named. The dead rules are deliberate and temporary. Part two of #3800 is where they should go. I haven't opened that issue myself.
commented

The prose that carries links no longer sits in a clipped row title. I pushed to the same branch. The type check, test/design-lint.test.ts, test/following-card.test.ts and test/following.test.ts pass. I haven't looked at it at 360px, since the sandbox has no browser.

  • Prose: the relation sentence, the frozen sentence with its "Reconnect it." link, the releases sentence and the crew note are now plain <p> paragraphs in the card body, so they wrap. The body is card-body stack, and the crew note keeps muted small.
  • Rows: only short navigation lines remain as rows, below the prose. These are one row per release link and "N forks follow this one."
  • releasesBlock: it now returns { sentence, links } instead of rows. The only caller is this card.
  • Test: test/following-card.test.ts now checks that the sentence is a <p> directly inside card-body stack, and that the prose body contains no row-title. That covers the served HTML but not the actual wrapping, which depends on the stylesheet.
  • *Dead .following CSS:** still left for part two, as #4152 says.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs