1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00
phorge-phorge/webroot/rsrc/css
Andre Klapper fa687b4ba0 Always ellipsize long filename in file upload dialog
Summary:
Firefox does not ellipsize long filenames after selecting them in the File Upload dialog; Chromium does (for unknown reasons).

Could hardcode the "remaining" width for the `<input>` element itself (approx. 340px) based on calculating the CSS widths and margins of all surrounding elements but that is error-prone if CSS for one of those surrounding elements ever changed.
Thus instead use `max-width: stretch` for the `<input>` element itself. Per its limited support (see https://caniuse.com/?search=max-width), set also `-moz-available` (https://bugzilla.mozilla.org/show_bug.cgi?id=1495868) and `-webkit-fill-available` (see https://bugs.chromium.org/p/chromium/issues/detail?id=611857) aliases.

Closes T15553

Test Plan:
* Both in Firefox and in Chromium, go to an existing task, select "File Upload", select a file with a long name.
* See that the filename is now correctly ellipsized in Firefox.
* See no changes in Chromium.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15553

Differential Revision: https://we.phorge.it/D25347
2023-07-29 12:14:50 +03:00
..
aphront When users submit "editing" inlines, warn them that their inlines will be saved 2020-05-04 13:13:15 -07:00
application Ponder Answer Comments: indent textarea as Comments 2023-07-19 21:28:24 +02:00
core Unify user-select CSS directives 2023-05-27 21:26:49 +02:00
diviner Lots of little fixes for Dark Mode (Experimental) 2017-07-19 14:41:23 -07:00
font Show change information in file icons in the filetree 2020-04-22 08:38:29 -07:00
fuel Improve handle/status list display on devices in commit graph lists 2020-08-12 09:04:08 -07:00
layout Unify user-select CSS directives 2023-05-27 21:26:49 +02:00
phui Always ellipsize long filename in file upload dialog 2023-07-29 12:14:50 +03:00
syntax Generate syntax highlighting CSS from a reusable map 2016-05-05 02:50:48 -07:00
sprite-login.css Correct Phorge icon on Auth Provider page 2023-06-15 12:02:57 +02:00
sprite-tokens.css More tokens 2016-07-03 18:32:40 -07:00