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
F14761162: D20466.id48841.diff
Wed, Jan 22, 11:31 PM
Unknown Object (File)
Tue, Jan 21, 11:55 AM
Unknown Object (File)
Tue, Jan 21, 11:12 AM
Unknown Object (File)
Fri, Jan 17, 6:47 PM
Unknown Object (File)
Thu, Jan 2, 8:26 PM
Unknown Object (File)
Wed, Jan 1, 2:54 AM
Unknown Object (File)
Dec 21 2024, 9:27 AM
Unknown Object (File)
Dec 17 2024, 10:37 PM
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.