As I move my own distro of PrivateBin to version 1.3.4 I've retrospectively applied all the changes that are not included in upstream.
Meanwhile I've spent some time fixing bugs I found in this release.
Some features I found useful had also been included.
To avoid polluting this repo with load of issues and merge conflicts caused by regenerating SRI in every PR, I would like to ask everyone for suggestion regarding what should be included in my PR.
I'll make a total of 2 PRs, one for bugfixes and one for features & enhancements to help reduce the effort required, meanwhile separating each changes into its own commit so we can have a clean history.
Here is a list of everything that can be included:
resource: to script-src cspheader to fix pdf display in FirefoxDOMPurify mess with forward slash in expirationDateStringHelper.durationToSeconds, as it doesn't handle weeksTopNav.isAttachmentReadonly logic so dropzone won't show when shouldn'tAttachmentViewer.readFileData unreachable logic path and remove call to me.handleAttachmentPreview as it no longer existHelper.urls2linksbootstrap.php (visual change maybe undesired)bootstrap-auto theme which will automatically switch to dark theme based on css preferred-color-scheme, works seemlessly with devices running browsers support system level dark themeAttachmentViewer.handleBlobAttachmentPreview
This document will expire in 4 minutes. upon open and 1 minute later it will become This document will expire in 3 minutes. and another 3 minutes later it will become This document has expired.Here is a preview of all changes that can be included, please notice this is just a draft and changes are squashed so they are in one single commit:
https://github.com/Haocen/PrivateBin-Contribute/pull/3
Cheers for keeping such a valuable project healthy and vivid.
A demo contain all changes is now available:
https://privatebin-staging.herokuapp.com/
First of all: Wow, thanks for all that work! :tada:
Of course, I guess, we are very glad to accept any bug fixes.
The only other things I'd have objections too are:
Disable text copy and select, remove rawText button when paste type is burn after read (cannot really stop user from copying content if they know how to open dev tools)
This has been discussed in https://github.com/PrivateBin/PrivateBin/issues/498 and declined.
Other notes:
Implement bootstrap-auto theme which will automatically switch to dark theme based on css preferred-color-scheme, works seemlessly with devices running browsers support system level dark theme
Awesome! This fixes https://github.com/PrivateBin/PrivateBin/issues/433
Open all links in new window
Fixes #61
Copy new paste link when click on copyhint, change copyhint content, avoid warping copyhint
Fixes #12
Generally, please: If you introduce/fix a feature and there is an open issue, please do mention this in your PR(s) when fixing them. You can (automatically) let issues close when a PR is merged by adding some "magic" text to your PR _body_.
Of course, in general, if we have open issues that are not discussed/declined or so, you are always free to submit pull requests. We'd gladly appreciate them. One PR per issue is ideal.
And as I saw you've created many issues for these things before by yourself: Of course, if we declined a feature in the past and there is no new discussion, we'll still decline it. :smiley:
Cheers for keeping such a valuable project healthy and vivid.
Cheers back to you for all those fixes and addressing a lot of (partially old) issues for features we should have implemented long time ago… :stuck_out_tongue_winking_eye:
As I saw, @elrido also did a PR review on your proposed PR to address some coding issues. If you'll propose the PR(s) then here, we'll likely may also have some more things to discuss and review.
In general, I'd want to say we, however, very much appreciate your changes and the work you've put into this. :smiley:
Thanks for the input, I've updated the issue with latest discussion.
I'll be sure to link my PR to individual issues it fix & implement when I open them.
Sorry for bring up some already declined proposals. I was too lazy to maintain both patched master branch and personal branch in same repo as the commit history can become really tangled, when doing the compare everything not included in master branch popup, including those have been declined.
I'll be sure to exclude those changes we don't want, I'm listing them here to avoid accidentally include them when I work on new PRs.
Hi, I wonder if we're good with the latest list I proposed?
If so I can start working on the PRs, starting from the bugfixes.
I guess so, yes. I have nothing more to add. @elrido, do you? (I guess he's reviewing the PR already, anyway… :wink:)
Nope, lets get that PR, to trigger the unit tests and do a final review.
To avoid creating more issues, proposing here: do not show "Raw text" button if no text provided in paste (when only file was sent).
Good idea, although I'm still always in favor to track bugs in issues, but okay, fine.
Need #651 for fix opengraph
Hi, sorry for leave this hanging so long.
I'll pick up from where I left and try to complete re-implementing the attachment preview very soon.
Regarding other issues you would like to fix, I'll take a look when I finish all outstanding issues listed.
The auto theme switch and copy by clicking on copy hint will be next thing I'll work on.
Following that, I'll work on mobile navbar auto expand/collapse.
Keep in mind that we will have to migrate to bootstrap 4 or 5 if it gets released soon. So maybe don't spend a lot of time on fixing the bootstrap 3 mobile navbar (which IMHO is still working fine on the devices I have access to).
I looked at the boostrap 4 navbar and it seemed there isn't any feature that will automatically expand collapsed navbar on small screen devices.
The problem I'm trying to solve here is when send being clicked on mobile device while navbar is collapsed, the screen looks as if it is freezed, because the Sending... status message was displayed in navbar such that user cannot see it if navbar is not expanded.
Or we could move that "Sending..." message out of the navbar into the main tag further below? It might belong better with all the other status messages, warnings and errors - all such temporary notifications in one place.
https://github.com/PrivateBin/PrivateBin/blob/33bcce593a3e8baa7ebdf6abf00175b399582fc9/tpl/bootstrap.php#L449-L457
IMHO I like that message being in the navbar on desktop device… when you have such a status, you hide al buttons anyway as they make no sense to click on it.
Plus: It avoids "visual interference" i.e. bumping up and down of the main text content e.g. when PrivateBin is processing something.
(Disclaimer: Note IIIRC I was also the one, who introduced that behaviour.)