@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

Projects: fix nonsense "Red" color after editing archived projects master

Summary: One edit on one archived project do not cause anymore this nonsense extra line: Foo set this project's color to Red Note that archived projects have always been designed to be shown with a special color called 'Disabled'; so, archived projects now have the Color field locked in the UX, to prevent color ping-pongs. Note that this is not a feature removal: changing colors of archived projects never worked. So now the UX is more consistent. Additionally, for archived projects, the Color field may have an entry called 'Disabled' and pre-selected (and, again, not-editable). This means the UX is finally showing the truth, and not showing another unrelated color (not showing 'Red' - not causing 'Red' to be set by mistake, etc.) Incidentally, this Color field stuck on 'Disabled' has also a good semantical meaning :P since archived projects have both a disabled color input box, and that project has really 'disabled' as color value! :P Consequent new good thing: If you recently changed the option 'projects.colors' to omit a color like 'orange', now you are still allowed to see that a project has the 'orange' value (not 'Red'). (T16236) Consequent new good thing: When a project is archived after this change, and then re-activated: the original color is always automagically restored, even if you have done many edits in the project while it was archived (so, it's not 'Red' anymore). Corner case for APIs: When the project is archived, from the API 'project.edit' you can still set another color like 'violet'. This is allowed. It just means that this new color will be shown again after you re-activate such project. This patch replaces D26290 to cover more cases. Screenshot of an active project. See the missing 'Disabled' special entry: {F6020953} Screenshot of an archived project. See the locked input stuck on 'Disabled': {F6020955} Closes T15236 Closes T16236 Test Plan: Create a project with 'Violet' color. Archive it. Edit it: Observe the color field cannot be touched while it's archived, and it shows the truth: it shows the 'Disabled' color value, instead of the 'Red' nonsense color (which was historically shown there only because it was the first color in the entry, and because 'Disabled' is not normally selectable). Save the project again. It does not become 'Red'. Incredible! Un-archive that project. The project returns as 'Violet'. Reviewers: O1 Blessed Committers, mainframe98 Reviewed By: O1 Blessed Committers, mainframe98 Subscribers: tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T16236, T15236 Differential Revision: https://we.phorge.it/D26294


+45 -1
1 changed file