Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into chatterino7
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Oct 6, 2024
2 parents 19b4ba7 + afa8067 commit 51ed3c1
Show file tree
Hide file tree
Showing 103 changed files with 3,008 additions and 635 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog-category-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
}
return "";
- uses: pajlads/changelog-checker@v1.0.1
- uses: pajlads/changelog-checker@v1.0.2
if: steps.label-checker.outputs.result != 'skip'
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4

- name: Check formatting with Prettier
uses: actionsx/prettier@3d9f7c3fa44c9cb819e68292a328d7f4384be206
uses: Nerixyz/actionsx-prettier@v3-adj
with:
# prettier CLI arguments.
args: --write .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ jobs:
cd ../pubsub-server-test
./server 127.0.0.1:9050 &
cd ../build-test
ctest --repeat until-pass:4 --output-on-failure --exclude-regex ClassicEmoteNameFiltering
ctest --repeat until-pass:4 --output-on-failure
working-directory: build-test
2 changes: 1 addition & 1 deletion .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
cd ..\pubsub-server-test
.\server.exe 127.0.0.1:9050 &
cd ..\build-test
ctest --repeat until-pass:4 --output-on-failure --exclude-regex ClassicEmoteNameFiltering
ctest --repeat until-pass:4 --output-on-failure
working-directory: build-test

- name: Clean Conan cache
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
-DCHATTERINO_GENERATE_COVERAGE=On \
-DCMAKE_BUILD_TYPE=Debug \
..
cmake --build .
cmake --build . -j $(nproc)
working-directory: build-test

- name: Download and extract Twitch PubSub Server Test
Expand All @@ -88,11 +88,17 @@ jobs:
cd ../pubsub-server-test
./server 127.0.0.1:9050 &
cd ../build-test
ctest --repeat until-pass:4 --output-on-failure --exclude-regex ClassicEmoteNameFiltering
ctest --repeat until-pass:4 --output-on-failure
working-directory: build-test

- name: Run benchmark
timeout-minutes: 2
run: |
./bin/chatterino-benchmark --benchmark_min_time=1x
working-directory: build-test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
plugin: gcov
Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
- Major: Add option to show pronouns in user card. (#5442, #5583)
- Major: Release plugins alpha. (#5288)
- Major: Improve high-DPI support on Windows. (#4868, #5391)
- Major: Added transparent overlay window (default keybind: <kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>N</kbd>). (#4746)
- Minor: Removed the Ctrl+Shift+L hotkey for toggling the "live only" tab visibility state. (#5530)
- Minor: Add support for Shared Chat messages. Shared chat messages can be filtered with the `flags.shared` filter variable, or with search using `is:shared`. Some messages like subscriptions are filtered on purpose to avoid confusion for the broadcaster. If you have both channels participating in Shared Chat open, only one of the message triggering your highlight will trigger. (#5606, #5625)
- Minor: Moved tab visibility control to a submenu, without any toggle actions. (#5530)
- Minor: Add option to customise Moderation buttons with images. (#5369)
- Minor: Colored usernames now update on the fly when changing the "Color @usernames" setting. (#5300)
Expand All @@ -30,7 +32,8 @@
- Minor: Removed experimental IRC support. (#5547)
- Minor: Moderators can now see which mods start and cancel raids. (#5563)
- Minor: The emote popup now reloads when Twitch emotes are reloaded. (#5580)
- Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426)
- Minor: Added `--login <username>` CLI argument to specify which account to start logged in as. (#5626)
- Bugfix: Fixed tab move animation occasionally failing to start after closing a tab. (#5426, #5612)
- Bugfix: If a network request errors with 200 OK, Qt's error code is now reported instead of the HTTP status. (#5378)
- Bugfix: Fixed restricted users usernames not being clickable. (#5405)
- Bugfix: Fixed a crash that could occur when logging was enabled in IRC servers that were removed. (#5419)
Expand All @@ -49,6 +52,11 @@
- Bugfix: Fixed account switch not being saved if no other settings were changed. (#5558)
- Bugfix: Fixed some tooltips not being readable. (#5578)
- Bugfix: Fixed log files being locked longer than needed. (#5592)
- Bugfix: Fixed global badges not showing in anonymous mode. (#5599)
- Bugfix: Fixed grammar in the user highlight page. (#5602)
- Bugfix: Fixed incorrect message being disabled in some cases upon approving or denying an automod caught message. (#5611)
- Bugfix: Fixed double-click selection not working when clicking outside a message. (#5617)
- Bugfix: Fixed emotes starting with ":" not tab-completing. (#5603)
- Dev: Update Windows build from Qt 6.5.0 to Qt 6.7.1. (#5420)
- Dev: Update vcpkg build Qt from 6.5.0 to 6.7.0, boost from 1.83.0 to 1.85.0, openssl from 3.1.3 to 3.3.0. (#5422)
- Dev: Unsingletonize `ISoundController`. (#5462)
Expand Down Expand Up @@ -85,8 +93,16 @@
- Dev: Fixed benchmarks segfaulting on run. (#5559)
- Dev: Refactored `MessageBuilder` to be a single class. (#5548)
- Dev: Recent changes are now shown in the nightly release description. (#5553, #5554, #5593)
- Dev: The timer for `StreamerMode` is now destroyed on the correct thread. (#5571)
- Dev: The timer for `StreamerMode` is now destroyed on the correct thread. (#5571, #5624)
- Dev: Cleanup some parts of the `magic_enum` adaptation for Qt. (#5587)
- Dev: Refactored `static`s in headers to only be present once in the final app. (#5588)
- Dev: Run benchmarks in CI. (#5610)
- Dev: Added more tests for input completion. (#5604)
- Dev: Refactored legacy Unicode zero-width-joiner replacement. (#5594)
- Dev: The JSON output when copying a message (<kbd>SHIFT</kbd> + right-click) is now more extensive. (#5600)
- Dev: Twitch messages are now sent using Twitch's Helix API instead of IRC by default. (#5607)
- Dev: `GIFTimer` is no longer initialized in tests. (#5608)
- Dev: Emojis now use flags instead of a set of strings for capabilities. (#5616)

## 2.5.1

Expand Down
11 changes: 9 additions & 2 deletions benchmarks/src/RecentMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#include "messages/Emote.hpp"
#include "mocks/BaseApplication.hpp"
#include "mocks/DisabledStreamerMode.hpp"
#include "mocks/Emotes.hpp"
#include "mocks/LinkResolver.hpp"
#include "mocks/Logging.hpp"
#include "mocks/TwitchIrcServer.hpp"
#include "mocks/UserData.hpp"
#include "providers/bttv/BttvEmotes.hpp"
Expand All @@ -16,7 +18,6 @@
#include "providers/seventv/SeventvEmotes.hpp"
#include "providers/twitch/TwitchBadges.hpp"
#include "providers/twitch/TwitchChannel.hpp"
#include "singletons/Emotes.hpp"
#include "singletons/Resources.hpp"

#include <benchmark/benchmark.h>
Expand Down Expand Up @@ -110,8 +111,14 @@ class MockApplication : public mock::BaseApplication
return &this->linkResolver;
}

ILogging *getChatLogger() override
{
return &this->logging;
}

mock::EmptyLogging logging;
AccountController accounts;
Emotes emotes;
mock::Emotes emotes;
mock::UserDataController userData;
mock::MockTwitchIrcServer twitch;
mock::EmptyLinkResolver linkResolver;
Expand Down
92 changes: 65 additions & 27 deletions docs/ChatterinoTheme.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,47 @@
"text": { "$ref": "#/definitions/qt-color" }
},
"required": ["backgrounds", "line", "text"]
},
"text-colors": {
"type": "object",
"additionalProperties": false,
"properties": {
"caret": { "$ref": "#/definitions/qt-color" },
"chatPlaceholder": { "$ref": "#/definitions/qt-color" },
"link": { "$ref": "#/definitions/qt-color" },
"regular": { "$ref": "#/definitions/qt-color" },
"system": { "$ref": "#/definitions/qt-color" }
},
"required": ["caret", "chatPlaceholder", "link", "regular", "system"]
},
"message-backgrounds": {
"type": "object",
"additionalProperties": false,
"properties": {
"alternate": { "$ref": "#/definitions/qt-color" },
"regular": { "$ref": "#/definitions/qt-color" }
},
"required": ["alternate", "regular"]
},
"message-colors": {
"type": "object",
"additionalProperties": false,
"properties": {
"backgrounds": { "$ref": "#/definitions/message-backgrounds" },
"disabled": { "$ref": "#/definitions/qt-color" },
"highlightAnimationEnd": { "$ref": "#/definitions/qt-color" },
"highlightAnimationStart": { "$ref": "#/definitions/qt-color" },
"selection": { "$ref": "#/definitions/qt-color" },
"textColors": { "$ref": "#/definitions/text-colors" }
},
"required": [
"backgrounds",
"disabled",
"highlightAnimationEnd",
"highlightAnimationStart",
"selection",
"textColors"
]
}
},
"type": "object",
Expand All @@ -229,37 +270,12 @@
"type": "object",
"additionalProperties": false,
"properties": {
"backgrounds": {
"type": "object",
"additionalProperties": false,
"properties": {
"alternate": { "$ref": "#/definitions/qt-color" },
"regular": { "$ref": "#/definitions/qt-color" }
},
"required": ["alternate", "regular"]
},
"backgrounds": { "$ref": "#/definitions/message-backgrounds" },
"disabled": { "$ref": "#/definitions/qt-color" },
"highlightAnimationEnd": { "$ref": "#/definitions/qt-color" },
"highlightAnimationStart": { "$ref": "#/definitions/qt-color" },
"selection": { "$ref": "#/definitions/qt-color" },
"textColors": {
"type": "object",
"additionalProperties": false,
"properties": {
"caret": { "$ref": "#/definitions/qt-color" },
"chatPlaceholder": { "$ref": "#/definitions/qt-color" },
"link": { "$ref": "#/definitions/qt-color" },
"regular": { "$ref": "#/definitions/qt-color" },
"system": { "$ref": "#/definitions/qt-color" }
},
"required": [
"caret",
"chatPlaceholder",
"link",
"regular",
"system"
]
}
"textColors": { "$ref": "#/definitions/text-colors" }
},
"required": [
"backgrounds",
Expand All @@ -270,6 +286,27 @@
"textColors"
]
},
"overlayMessages": {
"type": "object",
"additionalProperties": false,
"properties": {
"backgrounds": { "$ref": "#/definitions/message-backgrounds" },
"disabled": { "$ref": "#/definitions/qt-color" },
"selection": { "$ref": "#/definitions/qt-color" },
"textColors": { "$ref": "#/definitions/text-colors" },
"background": {
"$ref": "#/definitions/qt-color",
"description": "Note: The alpha value is ignored (set through the settings)"
}
},
"required": [
"backgrounds",
"disabled",
"selection",
"textColors",
"background"
]
},
"scrollbars": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -376,6 +413,7 @@
"required": [
"accent",
"messages",
"overlayMessages",
"scrollbars",
"splits",
"tabs",
Expand Down
2 changes: 1 addition & 1 deletion lib/settings
38 changes: 38 additions & 0 deletions mocks/include/mocks/Emotes.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#pragma once

#include "singletons/Emotes.hpp"

namespace chatterino::mock {

class Emotes : public IEmotes
{
public:
Emotes()
{
this->emojis.load();
// don't initialize GIFTimer
}

ITwitchEmotes *getTwitchEmotes() override
{
return &this->twitch;
}

IEmojis *getEmojis() override
{
return &this->emojis;
}

GIFTimer &getGIFTimer() override
{
return this->gifTimer;
}

private:
TwitchEmotes twitch;
Emojis emojis;

GIFTimer gifTimer;
};

} // namespace chatterino::mock
16 changes: 16 additions & 0 deletions resources/themes/Black.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
"system": "#8c7f7f"
}
},
"overlayMessages": {
"backgrounds": {
"alternate": "#32000000",
"regular": "transparent"
},
"disabled": "#64000000",
"selection": "#40ffffff",
"textColors": {
"caret": "#ffffff",
"chatPlaceholder": "#5d5555",
"link": "#4286f4",
"regular": "#ffffff",
"system": "#8c7f7f"
},
"background": "#000"
},
"scrollbars": {
"background": "#00000000",
"thumb": "#4d4d4d",
Expand Down
16 changes: 16 additions & 0 deletions resources/themes/Dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
"system": "#8c7f7f"
}
},
"overlayMessages": {
"backgrounds": {
"alternate": "#32000000",
"regular": "transparent"
},
"disabled": "#64000000",
"selection": "#40ffffff",
"textColors": {
"caret": "#ffffff",
"chatPlaceholder": "#5d5555",
"link": "#4286f4",
"regular": "#ffffff",
"system": "#8c7f7f"
},
"background": "#000"
},
"scrollbars": {
"background": "#00000000",
"thumb": "#575757",
Expand Down
16 changes: 16 additions & 0 deletions resources/themes/Light.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
"system": "#8c7f7f"
}
},
"overlayMessages": {
"backgrounds": {
"alternate": "#32000000",
"regular": "transparent"
},
"disabled": "#64000000",
"selection": "#40ffffff",
"textColors": {
"caret": "#ffffff",
"chatPlaceholder": "#5d5555",
"link": "#4286f4",
"regular": "#ffffff",
"system": "#8c7f7f"
},
"background": "#333"
},
"scrollbars": {
"background": "#00000000",
"thumb": "#a8a8a8",
Expand Down
Loading

0 comments on commit 51ed3c1

Please sign in to comment.