Skip to content

Enhancement: add image uploader settings import/export functionality - #6284

Merged
pajlada merged 19 commits into
Chatterino:masterfrom
knobby-tires:enhancement/image-uploader-settings
Jul 12, 2025
Merged

pajlada merged 19 commits into
Chatterino:masterfrom
knobby-tires:enhancement/image-uploader-settings

Conversation

@knobby-tires

Copy link
Copy Markdown
Contributor

Adds import/export functionality for image uploader settings as requested in #6283.

@pajlada

pajlada commented Jun 19, 2025

Copy link
Copy Markdown
Member

Hi!
At a quick glance through the code, things look good. I'll give it a proper review & test this weekend.
Thanks for your contribution!

@knobby-tires

Copy link
Copy Markdown
Contributor Author

Awesome! I am leaving town this weekend and will have very limited access to a computer. I am happy to make necessary adjustments when/if I can. Just want to make sure you know I am not abandoning the PR lol.

@pajlada pajlada left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a first pass - will do another more in-depth review once it's more testable

When I was reviewing this I was noticing the text fields don't update when the setting updates from external sources - I've fixed that in another PR. So when you merge your PR with our main branch that'll be fixed.

Comment thread src/widgets/settingspages/ExternalToolsPage.cpp Outdated
Comment thread src/widgets/settingspages/ExternalToolsPage.cpp Outdated
@pajlada pajlada linked an issue Jun 29, 2025 that may be closed by this pull request
@knobby-tires

Copy link
Copy Markdown
Contributor Author

Hi @pajlada, I believe I addressed most of what you asked :

  • I moved import/export functions to ImageUploader.hpp/cpp in the chatterino::imageuploader::detail namespace
  • I changed exportSettings to take Settings &s parameter as suggested: QJsonObject exportSettings(Settings &s);
  • I moved all related functions (importSettings, validateImportJson, parseAndApplyHeaders) to the new file
  • Updated ExternalToolsPage to use the new functions
  • Added the new files to CMakeLists.txt
  • Confirmed functionality still works correctly (export/import both working)

Next I'll work on writing unit tests for the exportSettings function next

Thanks for the detailed feedback, if I have misunderstood anything up until now please let me know. I am really trying to learn and gain real experience here.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/util/ImageUploader.cpp Outdated
Comment thread src/util/ImageUploader.cpp Outdated
Comment thread src/util/ImageUploader.hpp Outdated
Comment thread src/util/ImageUploader.hpp Outdated

@pajlada pajlada left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File structure looks good from my perspective.
Some nits with how functions are structured, some documentation, and some questions regarding validation.

Comment thread src/util/ImageUploader.cpp
Comment thread src/util/ImageUploader.hpp Outdated
Comment thread src/util/ImageUploader.hpp
Comment thread src/util/ImageUploader.hpp
Comment thread src/util/ImageUploader.hpp Outdated
Comment thread src/widgets/settingspages/ExternalToolsPage.hpp Outdated
Comment thread src/widgets/settingspages/ExternalToolsPage.cpp Outdated
Comment thread src/widgets/settingspages/ExternalToolsPage.cpp Outdated
Comment thread src/util/ImageUploader.cpp Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread src/util/ImageUploader.cpp Outdated
Comment thread src/util/ImageUploader.cpp Outdated
Comment thread src/util/ImageUploader.cpp Outdated
Comment thread src/util/ImageUploader.hpp Outdated
Comment thread src/widgets/settingspages/ExternalToolsPage.cpp Outdated
Comment thread src/widgets/settingspages/ExternalToolsPage.cpp Outdated

@pajlada pajlada left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me now - I took the liberty of doing a few minor modifications.
Could you take a look at the changes I made and see if they make sense to you @knobby-tires ?

@knobby-tires

Copy link
Copy Markdown
Contributor Author

@pajlada, Looks good to me! Thanks for the help.

@pajlada
pajlada enabled auto-merge (squash) July 12, 2025 16:05
@pajlada
pajlada merged commit 6712e8c into Chatterino:master Jul 12, 2025
@pajlada

pajlada commented Jul 12, 2025

Copy link
Copy Markdown
Member

Thank you @knobby-tires! As a first-time contributor, you are now eligible to be listed in the About page in Chatterino.

If you want this, you can open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Read the comments at the top for instructions.

@knobby-tires
knobby-tires deleted the enhancement/image-uploader-settings branch July 12, 2025 17:39
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
…rino#6284)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import image uploader settings from clipboard

2 participants