1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00
Commit graph

17369 commits

Author SHA1 Message Date
Valerio Bozzolan
dad1b15a9c User Badges: better integrate with Removed Comments
Summary:
The left part of a Removed Comment can contains User Badges that,
after this change, are more consistent with the new general softness.

| Before     | Proposed  |
|------------|-----------|
|  {F277371} | {F277373} |

Probably five people in a million will notice this change, BUT,
these people will have a huge, deep, breath of relief, knowing that
Phorge takes care about their obsessive-compulsive impulses, to
have everything nice and consistent and neat. You are welcome!

Closes T15235

Test Plan:
- do something to deserve a Badge
- share a Comment somewhere (Maniphest?)
- delete that comment
- check that the badge is slightly softer

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15235

Differential Revision: https://we.phorge.it/D25112
2023-04-07 00:21:41 +02:00
Valerio Bozzolan
3a8ee271d9 Render all Removed Comments a little more docile
Summary:
This small restyle makes any Removed Comment a little less
prominent than normal ones, with the goal of decreasing a
bit your in-page distractions and increase your individual
productivity in your business by at least 250 milliseconds
every 48 hours of hard work in front of your monitor.

| Before              | After               |
|---------------------|---------------------|
| {F274834,size=full} | {F274835,size=full} |

This implementation (which is called "Kasper on Diet")
contains these specific changes for Removed Comments:

- user icon visibility: reduced by ~50% (-> Kasper)
- black "trash" icon: reduced by ~50% (-> Diet)
- texts: visibility reduced by ~50%
- vertical padding: reduced from 16px down to 4px

Note that if your Phorge is under the Serious Business Mode,
it seems it is still technically possible to manually
activate the "Decaying Curse" proposal mentioned in the Task.

Closes T15192

Test Plan:
- Add a Comment "I love Phorge"
- Add a Comment "I love Phabricator"
- Mark the second Comment as Removed
- Call a person at your desk
- Plug that person to an eyeball tracker

If the general attention focuses first on a normal Comment and then
on the Removed Comment, this change works perfectly.

Reviewers: O1 Blessed Committers, Cigaryno, avivey

Reviewed By: O1 Blessed Committers, Cigaryno, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Tags: #comments

Maniphest Tasks: T15192

Differential Revision: https://we.phorge.it/D25096
2023-04-06 14:46:35 +02:00
Valerio Bozzolan
524579fe64 Diffusion: fix missing mobile "Actions" from Manage Repo
Summary:
After this change, the page "/manage/" related to Diffusion
repositories has an "Actions" button for mobile users:

{F276113}

Before this change, that button was missing only from this
specific page, and so it was really difficult for them
(if not impossible) to edit repository's basic information:

{F276115}

Do not confuse the hamburger menu on the sidebar with this
"Actions". The hamburger contains queries like Active Repo,
All Repo, etc. Instead the Actions contains
Edit Basic Info, Allow Dangerous Changes, etc.

It seems the cause of this problem is originated from an
apparently incomplete rollback occurred in Sep 6 2017 from
Phabricator:

e1fd74ddb5

As you can see, the DiffusionRepositoryBasicsManagementPanel
was probably not completely restored from the previous
version, at least for the part related to the method
newActionList():

bb369c7b71

The method newActionList() was restored in every other
panel but no the one related to the Basics Management. So,
a new PhabricatorActionListView object was manually
created, but without generating an ID from the Celerity
utilities.

In short, this change assigns an ID to this Curtain, in
order to correctly generates a related "Actions" menu
again. Otherwise, on mobile the curtain (with all the
actions) is automatically hidden, without any alternative.

Closes T15067

Test Plan:
- Repository > Actions > Manage Repository
- Reduce the page until "Actions" appears (yeeh!)

Reviewers: O1 Blessed Committers, Cigaryno, avivey

Reviewed By: O1 Blessed Committers, Cigaryno, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Tags: #diffusion, #mobile

Maniphest Tasks: T15067

Differential Revision: https://we.phorge.it/D25109
2023-04-06 10:58:43 +02:00
Valerio Bozzolan
787a84969f Phriction: clarify its search results as "Wiki page"
Summary:
This patch changes a bit how your search results from Phriction
are described in the autocomplete component (the "Typehead"):

{F276843}

After this change, Phriction search results will also contain the word
"Wiki page" so that users can better understand what the result
actually is. Just like a Diffusion repository mentions that it's
a "Repository", and just like a Project mentions that it's a
"Project" and so on.

Before this change, the Typehead entries were only mentioning
the slug of that wiki page.

| Before    | After     |
| {F274820} | {F272278} |

It's unclear if the previous behavior was a mistake (since the
internal parameter of the Typehead is called "type", and so, it
is supposed to mention the application type, not the slug.

Anyway, as a compromise, the slug is still mentioned.

To be honest this is just an excuse to put the middle dot /
aka interpunct character in this project again. Yeah, here the
middle point was used as separator. The apparent reason is:
because the middle point was already in use elsewhere in Phorge.
The real reason is: I'm a lobbyist in a corporation that sells
interpuncts worldwide as our core business, and so, I designed
thisvil plan to put the following middle point - again - in
Phorge (evil laugh).

Closes T15213

Test Plan:
- Search "Change Log" in the up-right bar (or similar)
- You see "Wiki Page · change_log/" (or similar)

Reviewers: O1 Blessed Committers, Cigaryno, avivey

Reviewed By: O1 Blessed Committers, Cigaryno, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Tags: #phriction

Maniphest Tasks: T15213

Differential Revision: https://we.phorge.it/D25102
2023-04-05 15:39:41 +02:00
Valerio Bozzolan
306ce1c0b7 Fix "Search" Application description
Summary:
This description was somehow broken since 2019:

{F276845}

Probably this was caused by a Remarkup breaking change introduced by this
specific XSS security fix:

{54bcbdaba94a3573e128c6498816dbfa41d3a9cb}

Maybe in the future the backtick operator will be supported again
in Remarkup. Or, maybe not. So, let's just workaround to make that
specific page "less exploded" again.

Closes T15230

Test Plan:
- visit the page /applications/view/PhabricatorSearchApplication/
- check that now the Remarkup is rendered perfectly

Reviewers: O1 Blessed Committers, Cigaryno, avivey

Reviewed By: O1 Blessed Committers, Cigaryno, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15230

Differential Revision: https://we.phorge.it/D25110
2023-04-05 15:37:46 +02:00
Valerio Bozzolan
96ae4ba13a PHP 8.1: fixes for strlen() not accepting NULL anymore, part 2
Summary:
This is a fix for PHP 8.1 deprecation of strlen(NULL), for these Phorge components:

- scripts
- aphront
- project

The strlen() was used in Phabricator to check if a generic value was a non-empty string.
For this reason, Phorge adopts phutil_nonempty_string() that checks that.

Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If your phutil_nonempty_string() throws an exception, just
report it to Phorge to evaluate and fix together that specific corner case.

Closes T15223
Ref T15190
Ref T15064

Test Plan: - check with your big eyes that there are no obvious typos

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15223, T15190, T15064

Differential Revision: https://we.phorge.it/D25105
2023-04-01 15:20:13 +02:00
Valerio Bozzolan
d25d630fe5 PHP 8.2: fixes for strlen() not accepting NULL anymore, part 1
Summary:
This change avoids some unnecessary uses of the strlen() function,
actually fixing some deprecation warnings in PHP 8.2.

In short, this is the suggested universal replace:

    -if(strlen($v))
    +if(phutil_nonempty_string($v))

And, if you know PHP, this is also another adoptable replace, but
only for cases where you are sure that the string "0" is not useful:

    -if(strlen($v))
    +if($v))

As usual the optimal solution depends on the contest.

Other similar patches will probably follow.

Closes T15222
Ref T15190

Test Plan:
- for the first time in my life, with this change, the unit tests are passed in PHP 8.2
- check with your big eyes that there are no obvious typos

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15199, T15190, T15222

Differential Revision: https://we.phorge.it/D25104
2023-03-31 22:05:52 +02:00
Valerio Bozzolan
fc9bbb9949 Workboard: fix regression caused by tags= prefiller
Summary:
This change fixes a regression introduced here:

rP5e2b3677157889104a7e540d7772a04f13164037

Thank you to the user @dadalha for auditing that commit
and sharing a stack trace to easily fix the issue.

In short, if you see this exception you are affected:

```
EXCEPTION: (InvalidArgumentException)
Value provided to "replaceQueryParam()" for key "tags" is NULL.
Use "removeQueryParam()" to remove a query parameter.
at [<arcanist>/src/parser/PhutilURI.php:341]
```

This change just fixes that specific problem.

Closes T15221

Test Plan:
1. Create a new Project
2. Create a new Milestone inside
3. Create the Milestone's Workboard
4. Visit the Milestone's Workboard and note that now it works

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno, dadalha

Tags: #workboard

Maniphest Tasks: T15221

Differential Revision: https://we.phorge.it/D25103
2023-03-31 11:05:22 +02:00
Valerio Bozzolan
821df3364e Hide the "hidden" fields on custom form previews
Summary:
Hide the "hidden" fields on custom form previews.

Before this change, Phabricator's custom form preview doesn't actually hide the
hidden fields, instead it shows them at 50% opacity. It looks cluttered and
doesn't provide a very useful "preview" at all.

This just hides some fields via CSS.

Cherry picked from:

https://phabricator.wikimedia.org/rPHABbba62cf5243538af9e37cc1211a01d247294f9f7

Upstream Task:

https://phabricator.wikimedia.org/T209743

Test Plan: Tested in Wikimedia's fork. I believe it results in better UX.

Reviewers: #blessed_committers, O1 Blessed Committers, Cigaryno, avivey, Matthew, valerio.bozzolan

Reviewed By: #blessed_committers, O1 Blessed Committers, Cigaryno, avivey, valerio.bozzolan

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

Maniphest Tasks: T15081

Differential Revision: https://we.phorge.it/D25037
2023-03-30 12:11:48 +02:00
Valerio Bozzolan
6036079e88 PHP 8.2: fix deprecated use of "parent" in callables
Summary: Closes T15200

Test Plan:
Test 1:

I was able to run `arc unit --everything` without the error thrown from T15200

Test 2:

I also tried this and it still works:

```
php -a
require 'src/applications/metamta/exception/PhabricatorMetaMTAReceivedMailProcessingException.php';
$asd = new PhabricatorMetaMTAReceivedMailProcessingException("1", "TEST MESSAGE");
var_dump($asd->getMessage());
```

You get:

```
string(12) "TEST MESSAGE"
```

Reviewers: O1 Blessed Committers, Matthew

Reviewed By: O1 Blessed Committers, Matthew

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15200

Differential Revision: https://we.phorge.it/D25099
2023-03-29 20:37:25 +02:00
Valerio Bozzolan
5eac69b79d Ponder: strike code of resolved questions in query results
Summary:
After this change, search results with resolved
questions are striked, just like any Closed Maniphest
Tasks is already striked, etc.

https://we.phorge.it/T15166

There is still the same thing to be done at Remarkup.

Ref T15166

Test Plan: - go in the page /ponder/query/all/ and see that closed questions are now striked

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15166

Differential Revision: https://we.phorge.it/D25086
2023-03-27 20:55:18 +02:00
Valerio Bozzolan
780e86acf8 Herald Rule Creation Page: fix Back button in some cases
Summary:
If you want to create a new Herald Rule, sometime,
like for new "Object" Herald Rules, the Back button just
sends you to the very same page you already were.

The risk is that an employee could receive a specific
instruction, such as "Hey Alfreda, Go back, now"
and at this point Alfreda goes into an incredible loop
continuing to click the Back button until the duration
of the universe (since Phorge is so stable that it's able
to handle that "Back spike" forever - really).

https://we.phorge.it/T15184

Note that this also tries to avoid to change the base URI
to just go Back. For example, before this change, the Back
button was trying to send from /create/ to /new/, but
apparently they are just aliases.

Closes T15184

Test Plan:
- Visit the page /herald/create/?adapter=commit
- Click on "Object"
- Click on "Back"
- Verify that you only went back one screen, and not just forward in time

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15184

Differential Revision: https://we.phorge.it/D25087
2023-03-27 20:54:28 +02:00
Valerio Bozzolan
f0618d54e8 Installation Guide: mention that git 2.5.0 (2015) is needed server-side
Summary:
Note that the git version 2.5.0 is surely already assumed
as required as implicit fact, so it's just better to clarify
this in the documentation to prevent weird situations and
unclear related exceptions.

Note that if you have seen this Phabricator/Phorge error
in your installation:

    This path was a submodule at R123:5378198ea123asdlol

This is probably that kind of weird errors that will be
fixed just updating your git version to 2.5.0, so that
the git escape sequence ('--') is correctly parsed by git.

Example of command that will fail with outdated git versions:

    git cat-file -t -- <hash>:<file>

If you do not want to update git, but you want to fix,
you can convert that command to this one, manually patching
your installation:

    git cat-file -t <hash>:<file>

Related material:

- https://we.phorge.it/T15179
- https://unix.stackexchange.com/a/740621/85666
- 6f9504c48e/Documentation/RelNotes/2.5.0.txt

Wontfix T15179

Test Plan:
- open Diviner page "Installation Guide"
- see that the git version is not explicit - yup!

Reviewers: O1 Blessed Committers, Cigaryno, avivey

Reviewed By: O1 Blessed Committers, Cigaryno, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15179

Differential Revision: https://we.phorge.it/D25081
2023-03-27 20:51:24 +02:00
Valerio Bozzolan
38e3692d7b Workboard: in some cases, increase menu opacity (accessibility)
Summary:
This change contains a very minimal graphical change for Workboards
with a custom background.

https://we.phorge.it/T15186

After this change, if your Workboard has a custom background color,
the opacity of the floating menu of the Column is not 0.9 but 0.95,
so it's increased a bit. The problem with the previous value, is that
when you open the menu, you see too much text underneath, and this
could worsen the readability. Now also probably, but less I hope.

Closes T15186

Test Plan:
- Workboard > Change Background Color > Pick a nice color
- Backlog > Edit
- Enjoy the extra 0.05 of opacity of that menu
- NEVER ACCEPT IF YOUR EYES DETECT JUST A 0.04999998 OF EXTRA OPACITY

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15186

Differential Revision: https://we.phorge.it/D25088
2023-03-27 20:50:57 +02:00
dylsss
5e2b367715 Workboard: improve the Create Task link to mention the Project slug
Summary:
This expands a specific link in a specific menu of Workboard Columns.

You may never notice this difference unless you like to open links in another tab.

If you go to a Workboard, and you open its context menu, and you hover your mouse on the
Create Task action, you see this URL or a similar one:

    http://example.com/maniphest/task/edit/form/default/

After this change, you see this URL or a similar one:

    http://example.com/maniphest/task/edit/form/default/?tags=test

You see that the PhutilURI class was used to add the Project slug to the 'tags' query param so
that users can still open the URL in a new tab and have the form prefilled with the Project Tag.

Closes T15147

Test Plan:
- visit a Workboard
- open the context menu of a Column (the pencil icon)
- see that the Create Task link has the Project slug is in the URL of its prefilled form

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15147

Differential Revision: https://we.phorge.it/D25068
2023-03-27 08:18:48 +02:00
Valerio Bozzolan
d98c47041f PHP 8.2: fix deprecated creation of dynamic properties
Summary:
This change fixes a typo that, in PHP 8.2, causes this exception:

    Creation of dynamic property PhabricatorAuthPasswordException::$confirmError is deprecated

Closes T15201

Test Plan: - I checked that "error" was spelled with two "r"

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15201

Differential Revision: https://we.phorge.it/D25100
2023-03-27 07:10:04 +02:00
Valerio Bozzolan
03c9bf575e PHP 8.2: fixes for deprecated use of ${var} in strings
Summary:
Note that PHP 8.2 implemented this deprecation:

    Using ${var} in strings is deprecated, use {$var} instead

This change fixes some known cases.

Ref T15196

Test Plan: - I checked with my big eyes that everything is as it should be

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15196

Differential Revision: https://we.phorge.it/D25098
2023-03-26 22:08:22 +02:00
Valerio Bozzolan
42a8b73adb Feed Differential retitled: do not repeat the title twice
Summary:
This is a cosmetic modification for a specific Feed.

https://we.phorge.it/T15183

If you retitle a Diff (and you do nothing else), its Feed
is somehow too much verbose:

    ... retitled NEW_TITLE from OLD_TITLE to NEW_TITLE

In this specific case, the Feed now becomes shorter so that
the NEW_TITLE is not repeated twice:

    ... retitled NEW_TITLE from OLD_TITLE

Note that, if the title changes again, the Feed naturally comes
back as before so to mention the change and obviously without
any repetition. Example:

    ... retitled CURRENT_TITLE from OLD_TITLE to NEW_TITLE

Closes T15183

Test Plan:
- take a Diff named "OLD_TITLE" and retitle to "NEW_TITLE"
- visit the homepage and see "retitled NEW_TITLE from OLD_TITLE"
  (this means the new behavior works)
- retitle the Diff from "NEW_TITLE" to "CURRENT_TITLE"
- visit the homepage again and see "retitled CURRENT_TITLE from OLD_TITLE to NEW_TITLE"
  (this means the old behavior still works)

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15183

Differential Revision: https://we.phorge.it/D25094
2023-03-25 14:21:10 +01:00
Valerio Bozzolan
9bc3c16b6e Fix information page about Read-only status
Summary:
This change fixes the following page on your Phorge/Phabricator:

    /readonly/config/

If you visit that page (with or without read-only mode), the
following crash will happen:

    Call to undefined method PlatformSymbols::getPlatformServerSymbol()

Fixes T15185

Probably the regression was introduced in this point:

rP4d3f0dc7c727e6fdc0e8cba0e8e8f2b8ef1bd16c

This change also renamed "administrator" to "Administrator" in the messages
from that specific page, both because I have great respect for Administrators
and also because that is how this word is spelled in most other places in Phorge.

Test Plan:
- Visit the page /readonly/config/
- It does not crash anymore and you can see that beautiful message
  that - it seems - no person in the world has ever seen since a
  whole year. Take a good look at this page: it is a precious treasure.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15185

Differential Revision: https://we.phorge.it/D25091
2023-03-25 12:06:35 +01:00
Valerio Bozzolan
c6f56b8221 Workboard: fix CTRL+click on "Create Task" and "Edit Task"
Summary:
The CTRL+click now opens the links in a new tab, like any other
normal link opened with CTRL+click.

Note that the middle-click was already working.

Closes T15157

Test Plan:
- visit a Workboard
- column > menu > mouse on "Create Task"
    - CTRL+click: open in new tab (→ now works)
    - normal click: open the pop-up (→ still works)
    - middle-click: open in new tab (→ still works)
- column > single Task > mouse on "Edit"
    - CTRL+click: open in new tab (→ now works)
    - normal click: open the pop-up (→ still works)
    - middle-click: open in new tab (→ still works)

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15157

Differential Revision: https://we.phorge.it/D25072
2023-03-18 14:57:42 +01:00
Valerio Bozzolan
b33e373503 Drag & Drop: set a link as external
Summary:
Rest assured: external links remain evil, by default.

Don't adopt them randomly by induction.

Whether you believe it or not, this specific external
link merited some deep thoughts on Phorge:

- https://we.phorge.it/T15172

So, whenever you use a mouse, a finger, or whenever we have
a confirmation dialog or not to prevent onblur disasters,
this change is probably consistent with common expectations.

Having said, external links remain evil - by default.

Closes T15172

Test Plan:
- Drag & Drop a File on a Remarkup text
- click on the link inside the popup
- it opens in a new tab (without risk of form loss)

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15172

Differential Revision: https://we.phorge.it/D25077
2023-03-17 13:56:18 +01:00
Valerio Bozzolan
4f356838be FileUpload: show File page instead of binary file
Summary:
This modification improves a single link shown to the user.

The goal is to make it easier to change file permissions or
file name or whatever just after the upload of the file itself.

Before this change, doing that was difficult because clicking
on the popup would send you back to the binary file only.

Closes T15165

Test Plan:
- upload a file using drag & drop (for example in a comment)
- click on the popup's link
- you see the File page, not the binary file

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15165

Differential Revision: https://we.phorge.it/D25074
2023-03-17 09:07:40 +01:00
Valerio Bozzolan
5cba56182f Diviner: fix "Javascript" -> "JavaScript" and minor change
Test Plan:
- look at Diviner and say "Java..."
- Diviner will look at you saying "...Script"
- you land, satisfied

If Diviner says "...script" instead (lowercase "S"), abandon the ship.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25075
2023-03-16 15:28:14 +01:00
Valerio Bozzolan
3487ee444a Fix regression in new confirmation Dialog
Summary:
Fix a JavaScript regression encapsulating the problematic part into an `if`.

Other minor changes:

- dedicate a variable for the confirmation messages to improve i18n in the future (but also to avoid 80 characters and make lint happy)
- replace `confirm` with `window.confirm` (to make lint happy)

Ref T15034
Ref D25015

Test Plan:
- surf on your local Phorge
- no JavaScript errors in console

Reviewers: bekay, Ekubischta, O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15034

Differential Revision: https://we.phorge.it/D25076
2023-03-14 20:24:50 +01:00
MacFan4000
9623e66745 replace usage of each() with foreach() for smtp
Summary:
this replaces uses with warning suppression of each() (depreccated in
PHP7, removed in PHP8) with foreach

Test Plan: can verify that these chages do work (tested on my own install)

Reviewers: O1 Blessed Committers, #blessed_committers, dsadad, avivey, valerio.bozzolan

Reviewed By: O1 Blessed Committers, #blessed_committers, dsadad, avivey, valerio.bozzolan

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

Differential Revision: https://we.phorge.it/D25059
2023-03-03 19:27:57 +01:00
Valerio Bozzolan
66192a5b83 Fix "Undefined index: icon" when visiting Search Servers using MySQL
Summary:
Fix "Undefined index: icon" when visiting Search Servers using MySQL

NOTE: This patch just fixes the exception at my best but this section probably deserves more improvement to show a better default.

Closes T15155

Test Plan:
- use the default Search Server configuration (that is MySQL)
- open the page Search Servers (/config/cluster/search/)
- verify that it does not explode anymore but it displays something unuseful

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15155

Differential Revision: https://we.phorge.it/D25070
2023-03-03 12:16:51 +01:00
Valerio Bozzolan
53c31b7b13 Fix middle-click, CTRL+click, right-click etc. on Typehead search results
Summary:
Fix middle-click, CTRL+click, right-click etc. on Typehead search results.

Closes T15149

Test Plan:
Try the following actions on various typeheads:

- right-click
- middle-click
- CTRL+click
- normal click

Demonstration video (2M) showing After patch (on localhost) and Before patch (here on we.phorge.it), where I middle-click and normal-click on menu entries:

{F256610}

Notes:

- the middle click now works (opening in new tab)
- the CTRL+click (or "command" key + click) now works (opening in new tab)
- the right click now opens the context menu (previously broken)
- the normal click should just click (as usual)

Try on:

- search results while typing in main search bar
- search results when editing a Task Tags / assigned to, etc.
- try to click on other weird places
- $$$

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15149

Differential Revision: https://we.phorge.it/D25069
2023-03-03 12:12:45 +01:00
Valerio Bozzolan
36dba82224 Show the API summary on the top of each Conduit API page
Summary:
Show the API summary on the top of each Conduit API page.

Before this change, the summary was only displayed from the Conduit APIs list.

Closes T15141

Test Plan:
I've opened 20 random Conduit API pages from the web
interface and I checked that now there is an amazing
"Summary" field.
I also double-checked that there were not green peppers.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15141

Differential Revision: https://we.phorge.it/D25063
2023-02-11 11:11:20 +01:00
Valerio Bozzolan
20fb93d1a4 Add small documentation details
Summary:
Add some small Diviner documentation details like:

* mention PHP 8.1 (thanks https://we.phorge.it/Q18)
* mention the fact that you need multiple databases (it may be not obvious from the startup)
* mention MariaDB and not just MySQL (thanks MariaDB community!)
* mention "Administrator" and not just "User" for the "Instructions for installing, configuring, and using Phorge."

I was not bold enough to do more changes.

Test Plan: I tested locally and Diviner does not look bad.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25064
2023-02-11 11:10:09 +01:00
Valerio Bozzolan
83672ba949 Allow to prefill name and description fields of a new Passphrase
Summary:
Allow to prefill name and description fields of a new Passphrase

Closes T15142

Test Plan:
I've visited this URL in my local test installation:

/passphrase/edit/?type=password&username=user&name=super&description=mario

And I was able to see the Name and Description fields prefilled,
just like the username.

I also tried to put the query string on an already-existing element
and it was working as expected, so, without any prefilled value from
the query string.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15142

Differential Revision: https://we.phorge.it/D25065
2023-02-11 11:08:12 +01:00
Aviv Eyal
6a563a68b5 Celerify
Summary: Fix unit tests in master

 #cowboycommit

Test Plan: arc unit

Reviewers: O1 Blessed Committers!

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

Differential Revision: https://we.phorge.it/D25062
2023-01-28 06:53:03 -08:00
Valerio Bozzolan
02a4f8b0c8 Fix editing a Calendar import ICS URI
Summary:
Before this change it was only possible to create a Calendar import ICS URI.
After this change it's possible to also edit already-existing elements.

This change fixes this specific exception when visiting similar pages:

        /calendar/import/edit/5/

        Argument 2 passed to PhabricatorCalendarImport::initializeNewCalendarImport()
        must be an instance of PhabricatorCalendarImportEngine, null given, called in
        phorge/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
        on line 45

Before this change it was only theorically possible to edit the name, policies, etc.
but not the URI.

This change also introduces the ability to edit the specific ICS URI,
in order to change legitimate parts of the URI, like the secret token.

Closes T15137

Test Plan:
I tested in my own installation with success lints.

To test, visit the Calendar, create an import ICS URI, and then try to edit it again.
It will work only after this change.

I was not able to conclude the "arc diff" since it tries to connect
to an unexisting database owned by root.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, Cigaryno, speck, tobiaswiese, Matthew

Maniphest Tasks: T15137

Differential Revision: https://we.phorge.it/D25061
2022-12-17 12:17:37 +01:00
k__nard
d5040f9a8f updating twitch to latest api (Helix)
Summary:
api doc : https://dev.twitch.tv/docs/api/reference
oauth2 doc : https://dev.twitch.tv/docs/authentication

Test Plan: I have successfully setup OAuth2 authentication against Twitch

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

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

Tags: #auth

Maniphest Tasks: T15122

Differential Revision: https://we.phorge.it/D25057
2022-12-08 15:41:09 -07:00
Valerio Bozzolan
dc558b5538 Fix NULL pointer exception in some circumstances from Calendar's homepage
Summary:
After importing specific weird events, for example from Google Calendar (bleah), it can happen that the Calendar's homepage becomes broken.

This was the Exception error shown to video:

    "Call to a member function getEventsBetween() on null"

It was happening since this method can return NULL:

    PhabricatorCalendarEventQuery#newRecurrenceSet()

This changeset verifies this condition from the Calendar's homepage.

Closes T15136

Test Plan: I tried in my server. I've executed the syntax lint. On my local machine I was not able to run "arc diff" since it tries to connect to root@localhost for some reasons.

Reviewers: O1 Blessed Committers, 20after4

Reviewed By: O1 Blessed Committers, 20after4

Subscribers: 0, Cigaryno, 20after4, speck, tobiaswiese, Matthew

Tags: #calendar

Maniphest Tasks: T15136

Differential Revision: https://we.phorge.it/D25060
2022-12-08 15:32:27 -07:00
Thomas Iguchi
a8a38835e1 Fix broken file PHID extraction that causes Pholio uploads to crash
Summary:
A commit earlier this year modified the structure of the file upload transaction data value, by nesting the array of file upload PHIDs in another array.
The `extractFilePHIDs` method was not updated to deal with that change though, therefore new mock uploads via Pholio would crash.
This patch fixes that method so it can process the updated transaction data.

Resolves T15105

Test Plan: Patched my live Phabricator installation with this fix and successfully uploaded new Pholio mockups.

Reviewers: O1 Blessed Committers, Cigaryno, Matthew

Reviewed By: O1 Blessed Committers, Cigaryno, Matthew

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

Tags: #pholio

Maniphest Tasks: T15105

Differential Revision: https://we.phorge.it/D25058
2022-11-11 13:10:16 -07:00
MacFan4000
abb693962d Update sprite sheets
Summary: This fully updates some login provider icons. Somehow this didn't work fully on previous updates. I used --force this time.

Test Plan: None just ran the script which regenerated the spritesheets.

Reviewers: O1 Blessed Committers, #blessed_committers, avivey

Reviewed By: O1 Blessed Committers, #blessed_committers, avivey

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

Tags: #auth

Differential Revision: https://we.phorge.it/D25055
2022-11-11 13:04:20 -07:00
ekubischta
4aedc206c7 Update PassphraseCredential to support Mentions
Summary:
This revision allows us to see where passphrase credentials are mentioned in other parts of phabricator

This is very useful to "What is this credential for?"  If we can see where it was been mentioned

Test Plan: Mentioned a passphrase and saw it in the transaction list

Reviewers: O1 Blessed Committers, Matthew

Reviewed By: O1 Blessed Committers, Matthew

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

Differential Revision: https://we.phorge.it/D25032
2022-10-09 03:30:07 -07:00
Vedran Miletić
f8ffa393c4 Added cross-platform default fonts
Summary:
`system-ui` is provided by modern browsers as [a cross-platform default font](https://caniuse.com/font-family-system-ui). Using this font [was a controversial choice back in 2017](https://infinnie.github.io/blog/2017/systemui.html). because it did not address i18n well and therefore it was removed from Bootstrap [twbs/bootstrap#22377](https://github.com/twbs/bootstrap/pull/22377). However, it was added back in Bootstrap v5 [twbs/bootstrap#30561](https://github.com/twbs/bootstrap/pull/30561) since it got better over time.

Fixes T15049.

Test Plan: Tested locally for now.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: Matthew, avivey, Cigaryno, 20after4, Ekubischta, speck, tobiaswiese, valerio.bozzolan

Maniphest Tasks: T15049

Differential Revision: https://we.phorge.it/D25021
2022-10-09 03:30:07 -07:00
Leon Eckardt
69b2710af9 Prevent Line Numbers in Diffusion being copied as Tabs
Summary: Marks Line Numbers in Diffusion File Preview as unselectable

Test Plan:
- Select multiple Lines from a File Preview in Diffusion
- Copy them into a Text Editor
- The Leading Tabs should no longer included

Reviewers: O1 Blessed Committers, speck, Ekubischta

Reviewed By: O1 Blessed Committers, speck, Ekubischta

Subscribers: Ekubischta, speck, tobiaswiese, valerio.bozzolan

Differential Revision: https://we.phorge.it/D25024
2022-09-21 11:33:20 -06:00
Matthew Bowker
a16e8773f0 Show confirmation dialog when closing a modal if form contents have been changed
Summary: Honestly I did not realize that Differential can do this. Anyway this is related to T15034 ... Originally opened at https://secure.phabricator.com/T12676

Test Plan:
1) Start creating a task via a Workboard in Manifest, type many words, press `ESC`

2) Start creating a task via a Workboard in Manifest, type no words, press `ESC`

Reviewers: O1 Blessed Committers, Ekubischta, speck

Reviewed By: O1 Blessed Committers, Ekubischta, speck

Subscribers: Leon95, 20after4, avivey, Ekubischta, speck, tobiaswiese

Tags: #maniphest

Differential Revision: https://we.phorge.it/D25015
2022-09-21 11:26:14 -06:00
Aviv Eyal
377ac059d6 Update default wordmark and logo
Summary:
The current default wordmark is "Phabricator" which is trademarked and the
default logo is also copyright.

(This change was made by @speck directly in the deployed instnace, bringing it into `master` now).

Test Plan: should be fine.

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, speck

Differential Revision: https://we.phorge.it/D25048
2022-08-25 01:31:18 -07:00
Aviv Eyal
dbf7cd2b4a Rebrand: Rename library and update "version" logic
Summary: Make the "version" data in Config show information. Also rename the library.

Test Plan: See version "branched from" information.

Reviewers: O1 Blessed Committers, speck

Reviewed By: O1 Blessed Committers, speck

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew

Maniphest Tasks: T15006

Differential Revision: https://we.phorge.it/D25047
2022-08-25 01:26:21 -07:00
Aviv Eyal
c3f0c0b0f7 Merge Phacility/master into phorge 2022-07-25 11:50:26 -07:00
epriestley
9426765a2c Flatten "RemarkupValue" objects when setting field defaults for custom forms
Summary:
Ref T13685. "RemarkupEditField" uses a "RemarkupValue" internally, and it currently attempts to serialize into the database unsuccessfully.

Instead, flatten the value before returning it for storage.

Test Plan:
  - Edited the default description of a task in a custom form.

Maniphest Tasks: T13685

Differential Revision: https://secure.phabricator.com/D21854
2022-06-14 09:37:35 -07:00
epriestley
1fc04e238f Fix repository URI generation for SVN commit identifiers represented with integer types
Summary:
Ref T13588. See PHI2198. Some pathways represent SVN commit identifiers (which are numeric) with integers; these raise an exception in `phutil_nonempty_string()`, which is strict.

(Ideally, commit identifiers wouldn't have mixed types, but that's a dramatically less practical change.)

Test Plan: Will deploy.

Maniphest Tasks: T13588

Differential Revision: https://secure.phabricator.com/D21852
2022-06-03 15:01:04 -07:00
epriestley
944b257d5d Fix a policy issue where permissions were not properly checked when disabling global builtin queries
Summary: See <https://hackerone.com/reports/1573143>. The pathway for disabling global builtin queries is missing a policy check. Add it.

Test Plan:
  - Accessed the "/search/delete/id/.../" URI for a global builtin query as a non-administrator.
  - Before patch: could improperly disable queries.
   -After patch: proper policy exception.

Differential Revision: https://secure.phabricator.com/D21851
2022-05-31 11:00:53 -07:00
epriestley
3052ed1484 Remove obsolete, policy-violating "owners.query" API method
Summary: See <https://hackerone.com/reports/1584409>. This obsolete API method is technically policy-violating: Owners packages have had policies since D15275. See also T10360.

Test Plan: Viewed Conduit API console, no longer saw API method available.

Differential Revision: https://secure.phabricator.com/D21850
2022-05-31 10:44:45 -07:00
epriestley
835cd7f270 Improve remarkup metadata robustness against debris in the database
Summary:
Ref T13682. Versioned drafts may have missing or unexpected metadata:

  - versioned drafts from an older version of Phabricator may be missing metadata;
  - versioned drafts created by an older UI against a newer version of Phabricator may have `null` metadata.

Generally, make these workflows robust to metadata in unexpected formats, so database debris doesn't break the UI.

Test Plan: Simulated debris, interacted with UI.

Maniphest Tasks: T13682

Differential Revision: https://secure.phabricator.com/D21849
2022-05-28 06:29:43 -07:00
epriestley
809ae81752 Update Slowvote poll status to use sensible string constants
Summary: Ref T13682. This prepares for modernizing Slowvote and exposing a more usable API.

Test Plan: Ran migrations, opened and closed polls.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13682

Differential Revision: https://secure.phabricator.com/D21848
2022-05-27 10:15:01 -07:00
epriestley
c1887f0c1d Separate Slowvote poll status onto a dedicated object
Summary: Ref T13682. Prepares for use of API-friendly string constants rather than opaque integers.

Test Plan: Created and edited polls, opening and closing them. Grepped for affected methods.

Maniphest Tasks: T13682

Differential Revision: https://secure.phabricator.com/D21847
2022-05-27 10:15:01 -07:00