hfs icon indicating copy to clipboard operation
hfs copied to clipboard

Comments for uploaded files are written & displayed incorrectly via descript.ion file

Open jbrown123 opened this issue 1 year ago • 5 comments

BEFORE

  • Are you using a reverse-proxy, like nginx?

Not using one, also not applicable

To Reproduce

Steps to reproduce the behavior: Upload a file via HFS to an upload enabled folder Click the comment button and put in more than one word separated by spaces Upload the file

Describe the bug

The upload process injects for each space or other non-alphanumeric character

Expected behavior

I expected the comment to be recorded as sent. At the very least, I expect the output to interpret the HTML escaped characters corretly.

Screenshots

image

Environment (please complete the following information):

  • OS: Windows 10, 64 bit
  • HFS Version 0.52.9 (latest stable)
  • Browser chrome (doesn't matter)

Additional context

None

jbrown123 avatar Jul 01 '24 00:07 jbrown123

wow! thanks for reporting. this bug doesn't apply to the set-comment made from the list

rejetto avatar Jul 01 '24 09:07 rejetto

There's a way to set comments elsewhere? Other than editing the descript.ion file, where can they be set?

jbrown123 avatar Jul 01 '24 15:07 jbrown123

Commenting from a phone is painful

jbrown123 avatar Jul 01 '24 15:07 jbrown123

If you can upload, you should also see the "comment" command when you open the file menu, from the files list

rejetto avatar Jul 01 '24 16:07 rejetto

Ah, yes. I see that. And I can confirm that it works mostly correctly.

It doesn't support a leading return in the comment (it gets stripped). You can manually edit the descript.ion file and add a leading return and that does work correctly. (I prefer the v2 style comments where they appear below the item rather than starting to the right of it.)

Any chance we can get rid of the quotes around the comment?

Maybe make both of these options (comments beside / comments below and with or without quotes)?

jbrown123 avatar Jul 01 '24 16:07 jbrown123

you can customize the style of the comments of course, and make all the changes you said. it's CSS, so it heavilty depends on your knowledge on the topic. once you devise all the changes that you need, you can enter your new style rules like described at https://github.com/rejetto/hfs/wiki/Customization

to know what rules you need you should study how the page is done, as there's no documentation about it yet. People making web pages know how to do that even without documentation: you right click on the comment, click inspect. You'll see that you are on a div with class entry-comment. This "studying" tool is nothing specific to hfs, but all web pages, so I expect some guide/documentation to exist somewhere.

Maybe make both of these options (comments beside / comments below and with or without quotes)?

the possible styles are virtually infinite, the option is not the right way to go. Someone can make a simple plugin/theme that just change the style of the comments, and you can install it.

rejetto avatar Jul 01 '24 17:07 rejetto

for example, this can be a good start

.entry-comment { display: block }
.entry-comment::before, .entry-comment::after { display: none }

rejetto avatar Jul 01 '24 21:07 rejetto

this is was fixed in 0.53.0-rc18

rejetto avatar Jul 02 '24 12:07 rejetto