New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Further Attachments Overhaul #4195
Conversation
One idea - in phpbb if you insert the image into the post -> there is a text next to the picture (in attachment box) that this picture was inserted into the post and the insert button is hidden. Maybe a good idea to discuss :) Next really cool feature is just drag the file from attachment directly into the post and it is inserted to the desired area. Also the file size validation is before upload, so you are informed that the selected file is too big. Small features but really useful in phpbb. |
File size and file number validations are already in place. |
Ok, but lets think about it, this is an overhaul, so make it perfect :) the besf way is to check other forum softwares and take ideas from them... |
I agree the insert button should be left as is, though the reasoning behind hiding it is valid. However, replacing it with a drag and drop of attachments would be nice. |
Point well taken; however it might be a good idea to consider that in a separate PR to keep things clean and ease of PR review. This one is already huge by now. |
I would certainly find it easier to review a separate PR for drag and drop :D
…On Sat, 19 Dec 2020, at 05:59, Debabrata Trivedi wrote:
@effone <https://github.com/effone> requested your review on: #4195
<#4195> Further Attachments Overhaul.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#4195 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFW24I36PGPPJSGPHVKJT3SVQ6LNANCNFSM4U57BT7Q>.
|
Yep, drag and drop would be amazing :) |
Note to theme developers: |
What about click and drag already uploaded image and add it into the post. This is how it works in phpbb and it is really useful. Also small icon or symbol for images which are added into the post would be nice. Just my ideas, no requests... Good job anyway, this PR will improve attachment system a lot |
I worked for what you said. But you know, if there is SCEditor; there is pain. This will take some times and digging. If this gets rejected I will release my plugin :P |
I don’t think there’s any chance of it getting rejected :) Just got to review the code to make sure there’s nothing that jumps out at us.
…On Fri, 25 Dec 2020, at 19:17, Debabrata Trivedi wrote:
I worked for what you said. But you know, if there is SCEditor; there
is pain. This will take some times and digging.
I have done everything here what I did in my AJAX file upload plugin
which you have already tested a year back @Eldenroot
<https://github.com/Eldenroot> . As we are talking about modern UI; I
felt this should be in core. I maintained minimum template changes.
If this gets rejected I will release my plugin :P
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#4195 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFW24O7WHRDLWRWN33MVDTSWTQMFANCNFSM4U57BT7Q>.
|
@effone I know, and this is great! This will make mybb a little bit closer to friendlier gui and follow standards... Sceditor is really bad, I am really happy that I xan use ckeditor from martec - plugin rineditor because it is great. I hope that mybb 1.9 will not use sceditor anymore, it is a dead project without a lead dev, we need another alternative-maybe why not ckeditor? Also we maybe have misunderstood a little bit, in phpbb when you upload an image, you can take this image and put it into the text directly from attachment list just with mouse drag. It is added in img tag. I have a working phpbb local copy, I can give you an access tommorow just to try. It is not a core feature, it is just a cherry pick. I hope that all will be fine and we will get this PR into next mybb release. Thy |
@Sama34 All the points mentioned by you in your first post seems to be non-reproducible for me. Although this can happen only in case of a faulty cache copy of the old Regarding your second post: The situation pointed by you regarding uploading multiple files of mixed state is valid. However; it was the easiest method to deal with the situation to block the upload altogether as you may know the The |
@Sama34 - please could you review again? I have applied to my board with latest changes so we will see :) thx! |
I guess he has done his review and provided all required feedbacks. |
I've done some testing and all looks good. |
Thanks for testing Paul. |
@effone, this is some great work, and a big improvement on what came before. Kudos, man. That said, in my (limited) testing, I've encountered a few (minor) issues. I have not (yet?) though dug into the code to try to identify what's causing them, let alone to offer any solutions. In any case, here they are:
|
@lairdshaw I couldn't produce the rest of the points. I'll try again to look in deep. |
Ah, thanks. I'll simply trust you that that PR fixes this issue. Seems plausible based on skimming its diff.
OK. I've checked them again. Turns out that this seems to have been a misdiagnosis:
It seems that the appearance of "swapped image sizes" may simply have been due to the Image Auto-Resizer plugin's auto-resizing of the images. I'm not 100% sure of this as an explanation but it's my best guess. Re this:
I wouldn't worry about it, since it only occurred once and hasn't recurred since. This, however...
...remains an issue for me. So, that's three out of four down. Progress... |
Hmm, doesn't happen with webkit. Will check placing |
Alright, so further investigation reveals that there is a strange known issue remaining with Firefox. Exactly what we are facing. I am gonna push a patch in a few. |
@lairdshaw Great catch. |
Looks good to me, @effone. Seems to be fixed. Very pleased also to see that there's a graceful downgrade in this PR on disabling Javascript. Excellent work. |
Thanks for the review. |
Yep, good to merge! I'm going to squash and merge though if that's okay? |
Sure thing. Take your time Boss. Just wanted to let you know that its ready in all aspects. |
[Rebased for 1.9 by Laird. In the process of rebasing, I fixed some other errors, notably incorrect display of attachment usage and quota.] * Drop alert(); / File availability validation * Update attachment button removal * Attachment update check * Prompt to obtain update confirmation * MyBB 'maxattachments' setting frontend validation * Filesize calculation error fix * Remove usage of undefined language variable * Lang fix + MyBB 'maxattachments' setting frontend validation (rev) * Attach buttons alteration + js reconstruct * AJAX file upload : editpost.php * AJAX file upload : newthread.php & newreply.php * Update attachment usage on AJAX response * File count condition correction * Better selection of attachment button * Implement AJAX file upload progress bar * Margin correction * Implement file dropzone * Change input target to avoid conflict * Firefox fix: Unwanted trigger of `dragleave` while hovering text part of drop zone * Template versions bump
alert();
Post.checkAttachments
considers onlyphp_max_file_uploads
and not$mybb->settings['maxattachments']
resulting having frontend validation failure triggering backend return errors only.attachment_too_big_upload
error string says "bytes" while representing figure in MB.Init
: Quick Search submission triggersPost.checkAttachments
;post_fetch_error
in error messages (this is only available for forumdisplay and not applicable for attachment handling)