Commit graph

17854 commits

Author SHA1 Message Date
Andre Klapper def09cf442 PHPDoc: Replace non-existing return type phid with string
Summary:
`phid` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.
Thus return `string` and get less errors reported by PHPStan.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25944
2025-04-02 01:15:03 +02:00
Andre Klapper b302851369 PHPDoc: Replace non-existing param type phid with string
Summary:
`phid` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html.
Thus set the param type to `string` and get a few less errors reported by PHPStan.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25940
2025-03-31 22:52:42 +02:00
Andre Klapper abb0d6815a PHPDoc: Replace non-existing param type const with string
Summary:
`const` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.
Thus set the param type to `string` and get a few less errors reported by PHPStan.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25938
2025-03-31 22:01:08 +02:00
Cigaryno MD f6639cc09c Update TOTP suggestions to open-source applications
Summary:
Replaces Authy and Google Authenticator, both proprietary with FreeOTP, Bitwarden Authenticator, Aegis, and 2FAS, all free and open-source.
Closes T16018

Test Plan:
- Setup TOTP factor in the Auth app.
- Setup the TOTP factor on your account.
- On both, **double check** the text for any typo or missing app. If any, click on {nav Request Changes}.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, Cigaryno, tobiaswiese, valerio.bozzolan, Matthew

Tags: #auth, #user-cigaryno

Maniphest Tasks: T16018

Differential Revision: https://we.phorge.it/D25934
2025-03-31 14:53:24 +01:00
Andre Klapper a9c6ea4773 PHPDoc: Replace non-existing return type const with string
Summary:
`const` is not a valid type. See https://docs.phpdoc.org/guide/references/phpdoc/types.html and https://docs.phpdoc.org/guide/references/phpdoc/tags/return.html.
Thus return `string` and get 82 less errors reported by PHPStan.

Test Plan: Read docs; run static code analysis.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25932
2025-03-29 12:38:40 +01:00
xtex a81f20e0f2
Config: Fix git errors when .git does not exist
Summary: Bug: T16023

Test Plan: Delete `.git` and visit `/config/`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16023

Differential Revision: https://we.phorge.it/D25931
2025-03-28 23:59:40 +08:00
Andre Klapper 06a62b347a Fix invalid CSS overflow value for .phui-oi-name
Summary:
The W3C CSS validator throws `Value Error : overflow normal is not a overflow value : normal`.
`normal` is not a valid value for `overflow`, as browsers currently cannot parse it they fall back to the default `visible`, thus change it to `visible`.
See https://developer.mozilla.org/en-US/docs/Web/CSS/overflow

Test Plan:
Paste `phui-oi-list-view.css` into https://jigsaw.w3.org/css-validator/ and read some CSS docs.

Also, visit a page showing a PHUIObjectItemView, like the /phame/post/ page, and
have a object with a veeeeeery long name, and see absolutely no difference A/B,
both on desktop, medium and small screens.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25921
2025-03-28 11:23:10 +01:00
Andre Klapper 64044ab830 Remove more obsolete IE9 filter CSS syntax
Summary:
Same game as rPe38f5457 but hadn't realized before:
IE5.5 to IE8 released 03/2009 supported the `filter: alpha()` syntax.
(IE8 and IE9 supported `-ms-filter` which was deprecated in IE9 and is unsupported since IE10 released 09/2012.)
See
* https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms532847(v=vs.85)
* https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms532967(v=vs.85)
* https://learn.microsoft.com/en-us/previous-versions/ms530752(v=vs.85)
* https://stackoverflow.com/questions/40389599/firefox-declaration-dropped-errors

`filter` is a valid standard CSS3 property unrelated to IE's obsolete `filter: alpha()` syntax.
Standard `filter` does not support `alpha()` per https://developer.mozilla.org/en-US/docs/Web/CSS/filter.
Thus modern browsers throw errors in the console to be avoided by removing this old syntax.

Test Plan: Read the links above, realize it's been 16 years, and agree with me.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25930
2025-03-28 10:57:51 +01:00
Andre Klapper 112174b900 Remove some pre-2013 vendor-prefixed -ms- CSS properties
Summary:
Per https://caniuse.com/ and MDN,
* `-ms-transform` superseded by unprefixed `transform` supported since IE 10 released 09/2012
* `@-ms-keyframes` superseded by unprefixed `@keyframes` supported since IE 10 released 09/2012
* `-ms-transition` superseded by unprefixed `transition` supported since IE 10 released 09/2012

Test Plan: None. Probably installing old browser versions if you don't trust documentation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25928
2025-03-28 06:57:42 +01:00
Andre Klapper e38f545743 Remove obsolete IE9 filter CSS syntax
Summary:
IE5.5 to IE8 released 03/2009 supported the `filter: progid:DXImageTransform.Microsoft.BasicImage()` syntax.
(IE8 and IE9 supported `-ms-filter` which was deprecated in IE9 and is unsupported since IE10 released 09/2012.)
See
* https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms532847(v=vs.85)
* https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms532967(v=vs.85)
* https://learn.microsoft.com/en-us/previous-versions/ms530752(v=vs.85)
* https://stackoverflow.com/a/5705449

`filter` is a valid standard CSS3 property unrelated to IE's obsolete `filter: progid: DXImageTransform.Microsoft.BasicImage()` syntax. Thus modern browsers throw errors in the console to be avoided by removing this old syntax.

Test Plan: Read the links above, realize it's been 16 years, and agree with me.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25929
2025-03-28 06:50:49 +01:00
Andre Klapper 0470216497 Remove pre-2016 vendor-prefixed -webkit- CSS properties
Summary:
Per https://caniuse.com/ and MDN,
* `-webkit-border-radius` superseded by unprefixed `border-radius` supported since Chrome 5 released 05/2010, Safari 5 09/2010, Android Browser 2.2 05/2010
* `-webkit-box-shadow` superseded by unprefixed `box-shadow` supported since Chrome 10 released 03/2011, Safari 5.1 03/2012,  Android Browser 4 10/2011
* `-webkit-box-sizing` superseded by unprefixed `box-sizing` supported since Chrome 10 released 03/2011, Safari 5.1 03/2012,  Android Browser 4 10/2011
* `-webkit-transform` superseded by unprefixed `transform` supported since Chrome 36 released 07/2014, Safari 9 10/2015,  Android Browser >4.4.4 >07/2014
* `-webkit-transition` superseded by unprefixed `transition` supported since Chrome 26 released 02/2013, Safari 9 10/2015,  Android Browser 4.4 12/2013

Test Plan: None. Probably installing old browser versions if you don't trust documentation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25927
2025-03-27 08:33:12 +01:00
Andre Klapper 29866413d1 Diviner: Contributing Code: Update section on Prototype Changes
Summary:
Per discussion in T16007 I hope that we can agree on this phrasing.

Closes T16007

Test Plan: Look at the reality out there.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16007

Differential Revision: https://we.phorge.it/D25909
2025-03-26 17:14:57 +01:00
Andre Klapper 97605e6aa9 Apply "Can Bulk Edit Tasks" to "Move Tasks" workboard options
Summary: The "Can Bulk Edit Tasks" Maniphest application setting introduced in rP7fedfacbca27c165cf193f286cef9306cf9762e2 applies to the "Bulk Edit Tasks…" menu item in the project workboard column dropdown. Make it also apply to the menu items "Move Tasks to Column…" and "Move Tasks to Project…" as those are similar actions.

Test Plan:
1. Go to `/applications/view/PhabricatorManiphestApplication/` and set `Can Bulk Edit Tasks` to `Administrators`
2. Go to `/project/board/1/` and create a second column
3. As a default user, open the column header dropdown of the default column on `/project/board/1/`
4. Select `Bulk Edit Tasks…` (no changes in behavior)
5. Select `Move Tasks to Column…`; select `Move Tasks to Project…`, don't succeed.
6. Try step 5 again as an administrator, succeed.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25912
2025-03-26 14:23:43 +01:00
Andre Klapper f62918b019 Fix invalid CSS vertical-align value for .fancy-datepicker-core
Summary:
`vertical-align: center` is not a valid value per https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align.
Likely `middle` was meant.

Test Plan: Read CSS docs; check output of your web browser console. (Interstingly, https://jigsaw.w3.org/css-validator/validator does not complain.)

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25920
2025-03-25 14:28:08 +01:00
Andre Klapper a8c2bce6fe Remove invalid CSS border-shadow property for input.jx-tokenizer-input
Summary:
The W3C CSS validator throws `Property border-shadow doesn't exist : none` as that property does not exist.
See 404 on https://developer.mozilla.org/en-US/docs/Web/CSS/border-shadow

Test Plan: Paste `phui-oi-list-view.css` into https://jigsaw.w3.org/css-validator/; find no CSS docs for that property.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25924
2025-03-25 12:37:47 +01:00
Andre Klapper 633d4037e5 Fix invalid CSS border-left-color value for .phabricator-action-view-submenu .caret-right
Summary:
The W3C CSS validator throws `Value Error : border-left-color Too many values or values are not recognized : 71,87,120`.
The value lacks `rgb()` wrapping. See other lines in the same CSS file.

Test Plan: Paste celerity processed `phui-action-list.css` into https://jigsaw.w3.org/css-validator/; look at the browser console while editing a task.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25925
2025-03-25 12:03:13 +01:00
Andre Klapper 56797b17ed Herald actions: Allow setting subtype on Maniphest tasks
Summary:
https://secure.phabricator.com/T12314 introduced task subtypes. Allow Herald rules which change/set the subtype of a task.
Code originally written by @20after4 for Wikimedia.

Closes T16022

Test Plan:
1. Have the default subtype configuration with three types under http://phorge.localhost/config/edit/maniphest.subtypes/ defined in src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php
2. Go to http://phorge.localhost/herald/edit/?content_type=HeraldManiphestTaskAdapter&rule_type=global
3. Under "Action", select the new "Change subtype to" option. Test the subtype search by clicking the magnifier icon, set up a Herald rule to test execution.
4. Remove the config for http://phorge.localhost/config/edit/maniphest.subtypes/
5. Repeat step 3, no explosions, default "Task" subtype still exists after removing the config.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, 20after4, Cigaryno

Maniphest Tasks: T16022

Differential Revision: https://we.phorge.it/D25913
2025-03-25 10:35:19 +01:00
Andre Klapper fcd6a4c28a Fix invalid CSS transition value for .jx-scrollbar-handle
Summary:
The W3C CSS validator throws `0 is not a transition value : opacity 0 linear`.
`0` is not a valid value; likely `0s` were meant as in other existing CSS definitions.
See https://developer.mozilla.org/en-US/docs/Web/CSS/transition

Test Plan: Paste `standard-page-view.css` into https://jigsaw.w3.org/css-validator/ and read some CSS docs.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25923
2025-03-25 10:29:22 +01:00
Andre Klapper fede9f4505 Fix invalid CSS cursor value for .phabricator-main-menu-brand
Summary:
The W3C CSS validator throws `Value Error : cursor hand is not a cursor value : hand`.
`hand` is not a valid value for `cursor`; likely `pointer` was meant.
See https://developer.mozilla.org/en-US/docs/Web/CSS/cursor

Test Plan: Paste `main-menu-view.css` into https://jigsaw.w3.org/css-validator/ and read some CSS docs.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25922
2025-03-25 10:25:11 +01:00
Andre Klapper 22147cc03b Remove pre-2013 vendor-prefixed -o- CSS properties
Summary:
Per https://caniuse.com/ and MDN,
* `-o-animation` superseded by unprefixed `animation` supported initially since Opera 12.1 released 11/2012, in later Opera versions with `-webkit-` prefix instead
* `@-o-keyframes` superseded by unprefixed `@keyframes` supported initially since Opera 12.1 released 11/2012, in later Opera versions with `-webkit-` prefix instead
* `-o-transform` superseded by unprefixed `transform` supported initially since Opera 12.1 released 11/2012
* `-o-transition` superseded by unprefixed `transition` supported initially since Opera 12.1 released 11/2012

Test Plan: None. Probably installing old browser versions if you don't trust documentation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25916
2025-03-24 12:06:40 +01:00
Andre Klapper 8353146b04 Remove pre-2013 vendor-prefixed -moz- CSS properties
Summary:
Per https://caniuse.com/ and MDN,
* `-moz-opacity` superseded by unprefixed `opacity` supported since Firefox 2 released 10/2006
* `-moz-border-radius` superseded by unprefixed `border-radius` supported since Firefox 4 released 03/2011
* `-moz-box-shadow` superseded by unprefixed `box-shadow` supported since Firefox 4 released 03/2011
* `-moz-animation` superseded by unprefixed `animation` supported since Firefox 16 released 08/2012
* `-moz-backface-visibility` superseded by unprefixed `backface-visibility` supported since Firefox 16 released 08/2012
* `@-moz-keyframes` superseded by unprefixed `@keyframes` supported since Firefox 16 released 08/2012
* `-moz-transform` superseded by unprefixed `transform` supported since Firefox 16 released 08/2012

Test Plan: None. Probably installing old browser versions if you don't trust documentation.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25915
2025-03-24 12:03:21 +01:00
Andre Klapper 645b1f5a99 Remove pre-2005 vendor-prefixed -khtml- CSS property
Summary:
Remove `-khtml-opacity: 0.5;` from CSS.
Per https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html, standard `opacity` has been supported since Safari 2.0 released in April 2005. If you still run Safari 1.x after 20 years you have bigger problems than this line of CSS in Phorge.
This is the only `-khtml-` prefixed property in the codebase.

Test Plan: None.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25914
2025-03-24 08:59:40 +01:00
Andre Klapper ad7560b364 AphrontFormPolicyControl: Reuse existing control ID
Summary:
Do not unconditionally create a new ID which breaks the accessibility label.

Parent `AphrontFormControl::render()` set an ID via `$this->setID(celerity_generate_unique_node_id())` and then calls `$this->renderInput()` on its subclass `AphrontFormPolicyControl` which unconditionally runs `$control_id = celerity_generate_unique_node_id()` to assign another ID and then does `'id' => $control_id`.
This breaks accessibility (AphrontFormControl's `label for="UQ0_xx"` is now off by one from AphrontFormPolicyControl's `a id="UQ0_xx"`).

Similar existing code can be found in `AphrontFormTokenizerControl::renderInput()` at https://we.phorge.it/source/phorge/browse/master/src/view/form/control/AphrontFormTokenizerControl.php;bccd4f5981a7e2c347e8e26cf24d8394c882724f$57-61

Closes T16019

Test Plan: Create a Maniphest Task form which exposes policy controls. Check the resulting HTML if `<label for="">` and `<a id="">` match.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16019

Differential Revision: https://we.phorge.it/D25910
2025-03-23 10:12:07 +01:00
sten 3e2d5e4bac Fix PHP8.1 strlen(null) error in DivinerArticleAtomizer.php
Summary:
Fix the strlen(null) error in DivinerArticleAtomizer.php

Fixes T16012

Test Plan:
Create Test.book and test.md as per T16012, then run:
```
/phorge/bin/diviner generate --book Test.book
```

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16012

Differential Revision: https://we.phorge.it/D25907
2025-03-14 09:10:57 +00:00
Andre Klapper c8e3ee170f Charts: Rotate x-axis labels for better readability
Summary:
Rotation is a fundamental movement pattern in our every-day activities.
Whether we play Spin The Bottle at our birthday, change our keyboard layout regularly, or do a sumersault to roll back into bed after our hair of the dog, we all regularly rely on rotation.
Thus also apply this principle to chart labels.

All credits go to http://www.d3noob.org/2013/01/how-to-rotate-text-labels-for-x-axis-of.html

Closes T16013

Test Plan:
# Go to `/project/reports/1/` after having constant task activity within that project tag for a while
# Try different viewport widths
# Take a deep breath and admit that the x-axis labels are more readable than before

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16013

Differential Revision: https://we.phorge.it/D25908
2025-03-14 08:26:31 +01:00
ekubischta 1552925d41 Add the Jxxx Monogram to Phame Post Tab Titles for logged-in users
Summary:
This revision brings Phame Posts inline with other objects like Tasks, Revisions, Passphrase, etc. which all place the Monogram into the browser tab title

This improves useability of Phame Posts by making it easier to reference them in other parts of Phorge

**Old Look**
{F22364 size=full}

**New Look**
{F22365 size=full}

Test Plan:
Made a post, be logged-in, saw the Monogram in the title (as usual in other apps like Maniphest).

See same post as logged-out (or be a search engine), saw just the title (so your SEO consultant is still happy).

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: Cigaryno, bekay, speck, tobiaswiese, valerio.bozzolan

Tags: #phame

Maniphest Tasks: T15050

Differential Revision: https://we.phorge.it/D25022
2025-03-13 13:11:27 +00:00
ekubischta 5bd99a394a Add instructions to Create Repository form fields for Callsign and Short Name
Summary:
When I create new repos, I always forget which is which (between Callsign and Short Name)

This adds helpful text as a placeholder and as control instructions

I am not sure if this layout is 100% better, but this is an option as well

**Add new Repository**
{F3169761 width=800}

**Edit existing Repository**
{F3169775 width=800}

Closes T15742

Test Plan: Added a new repository and saw these control instructions

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15742

Differential Revision: https://we.phorge.it/D25898
2025-03-11 13:11:52 +00:00
Andre Klapper fa00599de5 Facts and Charts: Add more PHPDoc coverage
Summary: Make things a bit easier to understand.

Test Plan: Check parameters and return values for types and classes.

Reviewers: O1 Blessed Committers, Cigaryno, valerio.bozzolan

Reviewed By: O1 Blessed Committers, Cigaryno, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25906
2025-03-09 11:12:15 +01:00
mainframe98 955ec77760 Fix packages base uri and introduce a console for that base uri
Summary:
The packages base uri is /packages/.
Previously, the base uri pointed to the packages search engine.
Because that prevents navigating to the publishers search engine
and the versions search engine and because the new base uri is a 404,
add a console, similar to Almanac or Nuance to link to these
endpoints. This makes the forms for publishers and versions
accessible without manually navigating there.

Test Plan:
* Clicked on the Packages application in Applications and saw a Console
* Clicked on the options in the console and saw all search engines
* Clicked on the packages crumb and got sent to the console
* Created a package and clicked on Edit Package and didn't see a 404

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25881
2025-03-06 19:43:14 +01:00
mainframe98 e99e9a3003 PhabricatorLiskDAO: Fragment serializer cache by class
Summary:
This restores the pre-PHP 8.1 behavior, where values of
static variables within inherited methods were independent
of each other. With PHP 8.1, this was changed to be truly
'static', which causes problems when one derivate of
PhabricatorLiskDAO defines a custom serializer but another
does not.

This came to light in T15726, but only for the Fund application,
which is a prototype, and deprecated. This fixes Fund, but
more importantly, everything else that would be broken by
this, whatever it was.

Ref: https://wiki.php.net/rfc/static_variable_inheritance

Previous stacktrace:
```
EXCEPTION: (RuntimeException) Undefined array key "totalAsCurrency" at [<arcanist>/src/error/PhutilErrorHandler.php:273]
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/infrastructure/storage/lisk/PhabricatorLiskDAO.php:345]
  #1 <#2> PhabricatorLiskDAO::willWriteData(array) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:1085]
  #2 <#2> LiskDAO::insertRecordIntoDatabase(string) called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:958]
  #3 <#2> LiskDAO::insert() called at [<phorge>/src/infrastructure/storage/lisk/LiskDAO.php:927]
  #4 <#2> LiskDAO::save() called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1405]
  [...]
```

Test Plan:
On PHP 8.1+:
1. Visit http://phorge.localhost/applications/ and enable the deprecated prototype applications "Fund" and "Phortune" via "Configure"
2. Visit http://phorge.localhost/phortune/merchant/edit/ and create a merchant
3. Visit http://phorge.localhost/fund/create/ and click the "Create New Initiative" button

Reviewers: O1 Blessed Committers, aklapper, valerio.bozzolan

Reviewed By: O1 Blessed Committers, aklapper, valerio.bozzolan

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15064

Differential Revision: https://we.phorge.it/D25859
2025-03-04 17:55:02 +01:00
Andre Klapper 38e359cb13 Fix non-existing log method in HarbormasterManagementRestartWorkflow
Summary: In `HarbormasterManagementRestartWorkflow`, `logSkip()` is called. A method with such a name has never existed in `PhabricatorManagementWorkflow`. Given the five available `log*()` methods, replace the call with `logInfo()` which seems most appropriate.

Test Plan: Run static code analysis which complains about `Call to an undefined method HarbormasterManagementRestartWorkflow::logSkip()`; read the code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #almanac_drydock_harbormaster

Differential Revision: https://we.phorge.it/D25742
2025-03-03 16:16:16 +01:00
Andre Klapper 0f4ab2413d ManiphestReportController: Add more PHPDoc coverage
Summary: Make things a bit easier to understand, for the start.

Test Plan: Check return values for their types and classes.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25901
2025-03-03 15:52:54 +01:00
Andre Klapper 4f3aad4f9f Portals: Rename unused newNoMenuItemsView() to newNoContentView()
Summary:
Followup to rPf8b8d88

Rename uncalled `newNoMenuItemsView()` to `newNoContentView()` overwriting this method in the parent class, to fix showing more specific UI messages for empty portals.

Test Plan:
Code:
* Grep the code for non-existing `newNoMenuItemsView`
* Check code of parent class `PhabricatorProfileMenuEngine`
Workflows:
* Create an empty portal via http://phorge.localhost/portal/edit/form/default/, see correct (more specific) string "Use "Edit Menu" to add menu items to this portal." displayed
* Click "Edit Menu" to go to http://phorge.localhost/portal/view/1/configure/global/ of that Portal just created, on the right in "Add New Menu Item..." select "Divider" and click "Create Menu Item" button, go back to portal, see correct (more specific) string "None of the visible menu items in this portal can render any content." displayed

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #dashboards

Differential Revision: https://we.phorge.it/D25776
2025-03-01 20:15:28 +01:00
Andre Klapper 883ec909cc Replace some http://www.php.net URIs with https://www.php.net
Summary: Faster, happier, more productive.

Test Plan: Click 'em all.

Reviewers: O1 Blessed Committers, Cigaryno, valerio.bozzolan

Reviewed By: O1 Blessed Committers, Cigaryno, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25896
2025-02-25 15:15:12 +01:00
Andre Klapper e3aeed5b5d Run ./bin/celerity map
Summary:
I have no freaking idea what I'm doing wrong. I did manually rebase
for the merge conflict before pushing fd6118bfa6. Sorry again.

Test Plan: Run `./bin/celerity map`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25893
2025-02-21 14:26:06 +01:00
Andre Klapper abeeadd6b0 Check that min epoch < max epoch in PhabricatorFeedQuery::withEpochInRange()
Summary:
`PhabricatorFeedQuery::withEpochInRange()` returns zero results when passing parameters in the wrong order.
Instead return a PhutilArgumentUsageException which makes it clear why there are no results.

Test Plan:
On an early morning without coffee supply, write custom code like
```
$query = id(new PhabricatorFeedQuery())
         ->setViewer(PhabricatorUser::getOmnipotentUser())
         ->withFilterPHIDs(array($user->getPHID()))
         ->withEpochInRange(time(), time() - 86400)
         ->setReturnPartialResultsOnOverheat(true);
$stories = $query->execute();
```
and wonder why you get zero results. Optionally, feel stupid for a moment.
Apply patch, now get an "Unhandled Exception ("PhutilArgumentUsageException") - Minimum range must be lower than maximum range."

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25891
2025-02-20 19:31:04 +01:00
Andre Klapper fd6118bfa6 Fix editing Conpherence rooms on mobile
Summary:
rPd6bce34a5db1a838a988440f09f7728747c9e067 failed to replace all occurrences of `$this->getApplicationURI('update/'.$conpherence->getID().'/')` with `$this->getApplicationURI('edit/'.$conpherence->getID().'/')`. Thus editing a Conpherence room on mobile crashes due to using an old invalid path.

Closes T15513

Test Plan:
* Run `grep -r "update/" . | grep onpherenc` vs `grep -r "edit/" . | grep onpherenc` and read rPd6bce34a5db1a838a988440f09f7728747c9e067
* Go to a Conpherence room in mobile view and select "Edit Room"
* Go to a Conpherence room in desktop view and select "Edit Room"

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15513

Differential Revision: https://we.phorge.it/D25879
2025-02-20 19:19:04 +01:00
Andre Klapper 5b87138894 Fix PHP 8.1 "ltrim(null)" exception creating a Nuance Source
Summary:
Passing `null` as the first parameter to `ltrim()` is deprecated since PHP 8.1.
Thus change the optional parameter of the function from null to an empty string.
```
ERROR 8192: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/src/applications/nuance/source/NuanceSourceDefinition.php:211]
```
Closes T16000

Test Plan:
* Create a Nuance queue at `/nuance/queue/edit/form/default/`
* Create a Nuance "Web Form" type source at `/nuance/source/edit/form/default/`

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16000

Differential Revision: https://we.phorge.it/D25890
2025-02-20 19:10:30 +01:00
Andre Klapper 035d7b2884 People Profile Menu: Move "Badges" item lower in panel list
Summary:
The order of items in the main panel on a user profile page is currently (depending on which Phorge applications are installed): `Profile, Badges, Tasks, Revisions, Commits, Manage.`
This order does not reflect the common main interests of most users in my installation who try to find and do work, I'm afraid.
Thus change it to `Profile, Tasks, Revisions, Commits, Badges, Manage.`

Test Plan: Go to http://phorge.localhost/people/manage/1/ and look at the panel on the left. See that Badges is not listed second anymore but is listed last but one.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25876
2025-02-17 09:35:59 +01:00
Andre Klapper f9e5630bab Add some trivial Herald related PhpDoc comments
Summary: Self-explanatory.

Test Plan: Read and play with code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25884
2025-02-17 09:34:41 +01:00
Andre Klapper 908d253cf6 Run ./bin/celerity map
Summary: No idea how I failed to manually rebase rP2574b0d1. Sorry for that.

Test Plan: Run `./bin/celerity map`

Reviewers: O1 Blessed Committers, amybones, valerio.bozzolan

Reviewed By: O1 Blessed Committers, amybones, valerio.bozzolan

Subscribers: amybones, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25885
2025-02-17 09:31:02 +01:00
amy bones cf19d84107 Add "Understanding Application Transaction Editors" article to Diviner
Summary:
In writing a number of Phorge extensions, I found it quite challenging to
understand how to use and implement Application Transaction Editors. As these
are quite core to most Phorge applications, it seems that we should probably
have some documentation. Introduce a rough draft of a guide to using and
implementing such things.

Test Plan:
Check that the prose reads okay, and confirm that what's described is in line
with what PhabricatorApplicationTransactionEditor does. Additionally, run `./bin/diviner generate` and observe that the document "Understanding Application Transaction Editors"  appears in the appropriate location.

Reviewers: O1 Blessed Committers, valerio.bozzolan, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25883
2025-02-16 13:37:48 -08:00
Andre Klapper 2574b0d118 Leave fullscreen editor when displaying "Upload File" and "Meme" dialogs
Summary:
When being in fullscreen editor mode, the `Upload File` and `Meme` dialogs get opened behind the editor and thus are invisible.
Given the options listed in https://secure.phabricator.com/T8200, pop out of fullscreen when these buttons get clicked, as this is easiest to implement.

Closes T15901

Test Plan:
1. Go to any item which allows commenting, e.g. a task.
2. In the toolbar of the textarea, click the `Fullscreen Mode` button.
3. Click the `Upload File` or `Meme` button in the toolbar.
4. Check if the dialog is displayed.
6. Repeat the test in normal mode (not "Fullscreen mode") and see that it still works.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #remarkup

Maniphest Tasks: T15901

Differential Revision: https://we.phorge.it/D25764
2025-02-16 19:57:08 +01:00
mainframe98 ebbe83c394 Unbreak the creation of Packages Versions
Summary:
Allow the creation of versions in Packages
by specifying a dummy Package to allow the
extended policy checks to pass. Versions
require that the package they're a version
of be accessible to the viewer, but that
means a package is required during creation.

This also initializes the attached package
property to the un-attached state, which
was missing. This should make it easier to
fix when misused.

Currently trying to create versions in Packages throws:
```
EXCEPTION: (Error) Call to a member function getPHID() on null at [<phorge>/src/applications/policy/filter/PhabricatorPolicyFilter.php:404]
```

Test Plan:
* Visit /applications/view/PhabricatorPackagesApplication/ and enable the Packages prototype application
* Visit /packages/version/edit/form/default
* Observe an edit form instead of an exception

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25882
2025-02-16 17:44:35 +01:00
Andre Klapper 6ea09aa82c PHP 8.1: Do not pass null to ctype_digit() in AphrontFormDateControlValue::getStandardDateFormat()
Summary:
PHP 8.1 warns that `ctype_digit(): Argument of type null will be interpreted as string in the future`. Thus do not pass a `null` value to `ctype_digit()` in `AphrontFormDateControlValue` but check first that the value is not null.
```
ERROR 8192: ctype_digit(): Argument of type null will be interpreted as string in the future at [/var/www/html/phorge/phorge/src/view/form/control/AphrontFormDateControlValue.php:332]
```
(It does not matter if we `return null` or `return ''` as the new fallback of `getStandardDateFormat()` - Phorge seems to handle both in this case.)

Closes T15994

Test Plan:
1. Go to http://phorge.localhost/T1, select "Start Tracking Time", remove both values, click the "Start Timer" button
2. Go to http://phorge.localhost/phrequent/ and see that the task is listed
3. Go to http://phorge.localhost/T1, select "Stop Tracking Time", remove both values, click the "Stop Timer" button
4. Go to http://phorge.localhost/phrequent/ and see that the task is not listed
5. Use a non-standard task creation form via http://phorge.localhost/maniphest/task/edit/form/5/ which has custom date fields visible and editable defined via http://phorge.localhost/config/edit/maniphest.custom-field-definitions/, enable the date fields, and remove their values, and file the task. Same behavior as on git master without the patch: These custom date values get set on the newly created task (which is not what I'd expect but it's not a regression created by this patch).

Reviewers: O1 Blessed Committers, slip, valerio.bozzolan

Reviewed By: O1 Blessed Committers, slip, valerio.bozzolan

Subscribers: slip, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15994

Differential Revision: https://we.phorge.it/D25875
2025-02-15 19:39:52 +01:00
Cigaryno a474a38dd6 Update installation guide to point to GitHub mirrors
Summary: Cloning a repository from GitHub seems to be faster than on Phorge and also, the old Phabricator installation guide pointed to Phacility's GitHub mirrors. That's why this commit will update the installation guide to point to the GitHub mirrors of rP and rARC.

Test Plan: Run the git clone commands.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, aklapper, tobiaswiese, valerio.bozzolan, Matthew

Differential Revision: https://we.phorge.it/D25874
2025-02-14 15:37:30 +01:00
Taavi Väänänen 90d26167aa
Allow filtering tokens given by type of token
Summary:
Adds a new filter to the page /token/given/ to specify the type of token awarded.

Closes T15988

Test Plan:
Visited /token/ to see it works as before.

Specified a token type in the search menu, and checked that the results only include that token type.

Activate DarkConsole and inspect the Services tab to check the query with "burminate" has sense, and you see this:

    SELECT * FROM `token_given`   WHERE (tokenPHID IN ('PHID-TOKN-misc-4'))   ORDER BY `id` DESC LIMIT 101

Removed the token type in the search menu, the results still include everything, like before.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15988

Differential Revision: https://we.phorge.it/D25865
2025-02-12 18:15:32 +02:00
Taavi Väänänen 75267e24e7
Convert tokens given to use SearchEngine
Summary:
Now the page /token/given/ allows to sort tokens by newest (default) and oldest.
The default sort is unchanged.

The given tokens are also now easily usable into any Dashboard.

This introduces creative space to add future filters.

refs T15988

Test Plan:
Tested that /token/ still renders fine.

Order by Creation (Newest First): it works.

Order by Creation (Oldest First): it works.

Activate the DarkConsole's top bar and open the tab Services to inspect the generated queries, that are like this, and not anything alien,
accordingly to the current "order by":

    SELECT * FROM `token_given`      ORDER BY `id` DESC LIMIT 101
    SELECT * FROM `token_given`      ORDER BY `id` ASC LIMIT 101

Test the page /token/given/ as logged-out: it the Tokens app is configured as public, it still works like before.

From the page /token/given/ order by "Creation (oldest first)", use {nav Use Results > Add Dashboard} and see that it works.

From the same Dashboard: {nav Create Panel > Query Panel} and select "Tokens Given" with Limit=1 and title "Most Recent Tokenzzz" and see that it works as expected.

Visit the Leader Board page at /token/leaders/: it still works like before.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15988

Differential Revision: https://we.phorge.it/D25863
2025-02-12 18:15:31 +02:00
Cigaryno 6b6c3c84d1 Replace some Phabricator references in PhabricatorStartup.php on comments and errors
Summary: There are still some Phabricator references in `phorge\support\startup\PhabricatorStartup.php` in both comments and warning/error messages.

Test Plan: No test plan as this is nothing more than changing in-line comments (zero impact) and some warning and error messages.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: tobiaswiese, valerio.bozzolan, Matthew

Maniphest Tasks: T15006

Differential Revision: https://we.phorge.it/D25857
2025-02-07 16:41:52 +01:00
Andre Klapper 0bd8388684 Strike through archived projects in navigation crumbs
Summary:
Going to e.g. the workboard of an archived project, there is no indication when the project has been archived (the blurred project icon is only displayed if the viewport width is >920px). This can lead to confusion why a workboard is completely empty.
Thus render an archived project as strike-through in the navigation bread crumbs.

Closes T15890

Test Plan:
* Go to the {Profile, Workboard, Reports, Members, Subprojects, Reports} pages of an active and an archived project and look at the navigation crumbs bar below Phorge's global top bar.
* Create an active subproject and active milestone of an archived project (and vice versa) and look at the navigation crumbs.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Tags: #projects

Maniphest Tasks: T15890

Differential Revision: https://we.phorge.it/D25774
2025-02-03 18:56:59 +01:00