-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add randomizeFilename toggle to QuickReply #2927
base: master
Are you sure you want to change the base?
Conversation
Adds a button to the QuickReply that allows for toggling of randomize filename. If a file is present when it is clicked, the filename is randomized. This is destructive, the original filename is not restored if toggled off
The filename field is already getting pretty crowded, so it might be better if this button only showed up for people who have the "Randomize Filename" feature enabled. If we do that, the next question is whether the button should be default on/off or have a persistent state separate from the "Randomize Filename" setting. What do you think? |
Another option would be to move some of the stuff currently in the filename field (much of it having nothing to do with files) somewhere else. But we'd have to think about where. |
I could try adding a toolbar down at the bottom below the input controls, and move these elements down into that area. Might be easier to reason about. As for making it a setting, thats not hard either, would probably be best to make the existing setting just toggle the button's presence/visibility |
Could the 'Files' button be removed, as clicking 'No selected file' does the same (perhaps IMO, the option in the settings would say "add toggle to QR to randomize filename of files posted" or whatever, and only once that is enabled show the icon (which is enabled). It would then stay enabled until turned off, and would have to be re-enabled next time. I'm sure there is a scenario where someone sets up 10 posts to upload and perhaps wants posts 4 and 6 to be random, but post 5 to be not random, so it would have to accommodate for that. If it's turned off, it does not turn it off in the Settings box - only for that particular post, or if not re-enabled. |
A concern of removing the files button is it may impact tabability of file selection. Another reason to add a toolbar is to support other options, such as an image reencode like Android apps support (there's a request for enchantment for this) or other things. I don't feel changing the width is a good solution. The current width fits nicely to the right of the catalog and posts section of the page, and tools and scripts are built with it's size in mind. Make it bigger and you run the risk of breaking them Finally, moving them to a toolbar may actually improve the keyboard flow. Instead of having to tab over several options to get to post (for users who don't know there's a keyboard shortcut that posts) you have them as auxillary navigation targets. It's not hard to make the tabbing loop around back up to submit With regards to settings, I'd probably add a "show option to toggle randomizer" independent of the current setting. Users can then have global randomization, toggleable randomization, or no randomization. With it visible, it works as you have requested, or almost so. I can change the randomize current file functionality so that it checks if there are multiple posts, and only randomizes if not, that allows the user to build a dump list and toggle randomization as they build it |
Allows the user to control if they want to see the randomize filename button on their QR. Button appearance is independent of the actual randomize filename setting Allows the user to control if they want to see the randomize filename button on their QR. Button appearance is independent of the actual randomize filename setting
When toggling the randomize-filename-button, don't rename existing files if there is a dumplist active. Do rename existing files if only one post is present
Could the I'm of the belief that 4chan X is the main extension, and other scripts/styles like OneeChan should adapt to the changes. If 4chan X decides to make the min-width of the QR 350px and not 300, then OneeChan should update to accommodate for that. |
src/Posting/QR.coffee
Outdated
@@ -218,7 +218,7 @@ QR = | |||
setRandomizedFilename: (enabled) -> | |||
Conf['Randomize Filename'] = enabled | |||
QR.nodes.randomizedFilename.classList.toggle 'disabled', !enabled | |||
if enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update on sync probably shouldn't touch the filenames of existing files at all. And a user click should be able to toggle the randomization of a file regardless of whether it's in a dumplist.
I think what we really want is a non-destructive version that can restore the original filename if toggled off. |
I don't see the randomizer on the quick reply bar anymore, is it still in the latest build? |
@randoomdude was never merged in |
@paradox460 Can you just add the script version of it manually then? How do you do that? |
This resolves #3308 |
Adds a button to the QuickReply that allows for toggling of randomize filename.
If a file is present when it is clicked, the filename is randomized. This is destructive, the original filename is not restored if toggled off
Fixes #473, #1409, #1574, #1573, #1848, #2200, #2660, #2890