Page MenuHomePhabricator

Show "hold reasons" on commit page, not on "Edit" page
ClosedPublic

Authored by epriestley on Apr 23 2019, 2:14 PM.
Tags
None
Referenced Files
F13271201: D20466.id48841.diff
Wed, May 29, 5:56 PM
F13256414: D20466.id48841.diff
Sat, May 25, 11:49 AM
F13256148: D20466.id.diff
Sat, May 25, 9:52 AM
F13250212: D20466.id48820.diff
Fri, May 24, 1:14 PM
F13236800: D20466.diff
Tue, May 21, 11:03 AM
F13236502: D20466.diff
Tue, May 21, 9:56 AM
F13233905: D20466.diff
Tue, May 21, 2:39 AM
F13224725: D20466.id.diff
Sun, May 19, 10:25 AM
Subscribers
None

Details

Summary

Depends on D20465. Ref T13277. Currently, when a commit is unpublished, we put a single line about it on the "Edit Commit" page. This is pretty much impossible to find.

Move it to the main page. This treatment is more big/bold than I'd probably like to end up, but we should probably overshoot on the explanatory text until users get used to this behavior.

Also, allow searching for only published / unpublished commits.

Test Plan

Screen Shot 2019-04-23 at 7.11.40 AM.png (731×694 px, 70 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/applications/diffusion/query/DiffusionCommitQuery.php
871

Any reason to prefer this over (commit.importStatus & %d) != 0?

This revision is now accepted and ready to land.Apr 24 2019, 1:01 AM

!== 0 and !== mask have different meanings when mask has multiple bits set. Today, IMPORTED_CLOSEABLE has just one bit set, so both tests would do the same thing. But the adjacent IMPORTED_ALL mask has several, and using the more general form is safer if IMPORTED_CLOSEABLE ever has multiple bits, or this code gets copy/pasted elsewhere or something.

Suppose:

red = 1
liquid = 2
potable = 4

red_poison = red | liquid
drinkable = liquid | potable

Then:

(red_poison & drinkable) = ((1 | 2) & (2 | 4)) = 2

If we're testing !== 0, we'll drink the red poison (both the bitfield and the mask have bit 2, the "liquid" bit, set, so the "bitwise and" is nonempty). If we're testing !== drinkable, we won't.

This revision was automatically updated to reflect the committed changes.