upload icon indicating copy to clipboard operation
upload copied to clipboard

Update FormatTextPreview.php

Open edgeinfinity1 opened this issue 11 months ago • 2 comments

Fixes #0000

Changes proposed in this pull request: Fixes the "expand" button's misbehavior while using Text Preview.

Confirmed

  • [x] Frontend changes: tested on a local Flarum installation.
  • [x] Backend changes: tests are green (run composer test).

Required changes:

edgeinfinity1 avatar Feb 24 '24 11:02 edgeinfinity1

Hi @edgeinfinity1 thanks for your contribution! Please provide steps to reproduce the issue, and maybe add some screenshots/screencasts before and after the change. Thanks!

DavideIadeluca avatar Feb 29 '24 18:02 DavideIadeluca

Hi @edgeinfinity1 thanks for your contribution! Please provide steps to reproduce the issue, and maybe add some screenshots/screencasts before and after the change. Thanks!

I'm sorry for not being able to provide screenshots before the change, because my forum is already in production state. It's very easy to reproduce the problem:

  1. use "Text Preview" for mime text files.
  2. upload a file within 5 lines, and the expand button shows and does nothing.
  3. upload a file more than 5 lines, and there is no expand button at all.

this problem is obviously because of a misjudgement in rather the file should be expandable, or say just reversed.

edgeinfinity1 avatar Mar 08 '24 08:03 edgeinfinity1