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
Unknown Object (File)
Mon, Nov 11, 4:53 AM
Unknown Object (File)
Sun, Nov 3, 10:50 AM
Unknown Object (File)
Thu, Oct 31, 2:09 AM
Unknown Object (File)
Oct 20 2024, 8:26 AM
Unknown Object (File)
Oct 16 2024, 11:47 AM
Unknown Object (File)
Oct 14 2024, 11:51 PM
Unknown Object (File)
Oct 10 2024, 3:22 AM
Unknown Object (File)
Oct 9 2024, 12:14 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.