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)
Sat, Mar 23, 6:55 AM
Unknown Object (File)
Wed, Mar 20, 2:36 PM
Unknown Object (File)
Tue, Mar 19, 3:21 PM
Unknown Object (File)
Fri, Mar 1, 5:15 AM
Unknown Object (File)
Feb 21 2024, 1:30 PM
Unknown Object (File)
Feb 3 2024, 10:20 PM
Unknown Object (File)
Feb 3 2024, 10:20 PM
Unknown Object (File)
Feb 3 2024, 10:20 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.