Skip to content

feat: rework highlights & their UI#6695

Draft
pajlada wants to merge 6 commits into
masterfrom
feat/highlights-gui
Draft

feat: rework highlights & their UI#6695
pajlada wants to merge 6 commits into
masterfrom
feat/highlights-gui

Conversation

@pajlada

@pajlada pajlada commented Dec 30, 2025

Copy link
Copy Markdown
Member

This PR shows the progress I'm going through for a highlights rework.
There's an MD file in the PR that describes a little bit what my goals are.
I will fill out this description later.

I am currently not open to feedback for this PR.

Things that would be nice:

  • Exporting/Importing individual highlights
  • Exporting/Importing list of highlights
  • Disabling individual highlights without deleting them

@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


// turn a vector item into a model row
SharedHighlight HighlightBetaModel::getItemFromRow(
std::vector<QStandardItem *> &row, const SharedHighlight &original)

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.

warning: parameter 'original' is unused [misc-unused-parameters]

Suggested change
std::vector<QStandardItem *> &row, const SharedHighlight &original)
std::vector<QStandardItem *> &row, const SharedHighlight & /*original*/)

explicit HighlightBetaModel(QObject *parent);

// Used here, in HighlightingPage and in UserHighlightModel
enum Column {

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.

warning: enum 'Column' is unscoped, use 'enum class' instead [cppcoreguidelines-use-enum-class]

    enum Column {
         ^

explicit HighlightBetaModel(QObject *parent);

// Used here, in HighlightingPage and in UserHighlightModel
enum Column {

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.

warning: enum 'Column' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]

    enum Column {
         ^

explicit HighlightBetaModel(QObject *parent);

// Used here, in HighlightingPage and in UserHighlightModel
enum Column {

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.

warning: initial values in enum 'chatterino::HighlightBetaModel::Column' are not consistent, consider explicit initialization of all, none or only the first enumerator [cert-int09-c]

src/controllers/highlights/HighlightBetaModel.hpp:24:

-         COUNT,
+         COUNT = 4,

{
}

bool HighlightPhrase::isEnabled() const

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.

warning: method 'isEnabled' can be made static [readability-convert-member-functions-to-static]

Suggested change
bool HighlightPhrase::isEnabled() const
bool HighlightPhrase::isEnabled()

src/controllers/highlights/HighlightPhrase.hpp:40:

-     bool isEnabled() const;
+     static bool isEnabled() ;

});

QObject::connect(view, &QTableView::clicked,
[this, view, model](const QModelIndex &clicked) {

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.

warning: lambda capture 'this' is not used [clang-diagnostic-unused-lambda-capture]

Suggested change
[this, view, model](const QModelIndex &clicked) {
[ view, model](const QModelIndex &clicked) {

});

QObject::connect(view, &QTableView::clicked,
[this, view, model](const QModelIndex &clicked) {

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.

warning: lambda capture 'view' is not used [clang-diagnostic-unused-lambda-capture]

                     [this, view, model](const QModelIndex &clicked) {
                            ^

this fix will not be applied because it overlaps with another fix

});
QObject::connect(
this->configureDialog, &HighlightsBetaConfigureDialog::confirmed, this,
[this, index, view](SharedHighlight data) {

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.

warning: chatterino::HighlightsBetaWidget::openConfigureDialog(QTableView *, const QModelIndex &)::(anonymous class)::operator(): Missing reference on non-trivial type (SharedHighlight data) [clazy-function-args-by-ref]

Suggested change
[this, index, view](SharedHighlight data) {
[this, index, view](const SharedHighlight &data) {

});
QObject::connect(
this->configureDialog, &HighlightsBetaConfigureDialog::confirmed, this,
[this, index, view](SharedHighlight data) {

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.

warning: lambda capture 'this' is not used [clang-diagnostic-unused-lambda-capture]

Suggested change
[this, index, view](SharedHighlight data) {
[ index, view](SharedHighlight data) {

});
QObject::connect(
this->configureDialog, &HighlightsBetaConfigureDialog::confirmed, this,
[this, index, view](SharedHighlight data) {

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.

warning: the parameter 'data' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]

Suggested change
[this, index, view](SharedHighlight data) {
[this, index, view](const SharedHighlight& data) {

@pajlada
pajlada force-pushed the feat/highlights-gui branch from 72e7693 to 3144ac0 Compare January 18, 2026 13:01
@pajlada pajlada added the hold for release Wait with merging this PR or fully exploring this issue until the next release has been published. label Jan 31, 2026
@pajlada pajlada removed the hold for release Wait with merging this PR or fully exploring this issue until the next release has been published. label Mar 28, 2026
@pajlada
pajlada force-pushed the feat/highlights-gui branch 3 times, most recently from 7619c99 to d9b661f Compare April 11, 2026 10:29
@pajlada
pajlada force-pushed the feat/highlights-gui branch 4 times, most recently from 416a95b to ca3bb7d Compare April 25, 2026 10:20
@pajlada
pajlada force-pushed the feat/highlights-gui branch 9 times, most recently from c038a8c to f17a84b Compare May 2, 2026 13:11
@pajlada
pajlada force-pushed the feat/highlights-gui branch 2 times, most recently from 00a0a5b to 210716b Compare May 9, 2026 10:20
@pajlada
pajlada force-pushed the feat/highlights-gui branch from 8bb9bc4 to eaf5071 Compare May 16, 2026 09:39
@pajlada
pajlada force-pushed the feat/highlights-gui branch 3 times, most recently from 0c84e7e to 57885ed Compare May 24, 2026 09:37
@pajlada
pajlada force-pushed the feat/highlights-gui branch from 3fd2b4f to 14ffe60 Compare June 6, 2026 09:43
@pajlada
pajlada force-pushed the feat/highlights-gui branch 3 times, most recently from a76738e to 1a5bf9f Compare June 7, 2026 10:41
@pajlada
pajlada force-pushed the feat/highlights-gui branch 3 times, most recently from 1bafa08 to c53af0f Compare June 14, 2026 13:57
@pajlada
pajlada force-pushed the feat/highlights-gui branch from 0b182bc to 5a02f02 Compare June 25, 2026 06:43
@pajlada
pajlada force-pushed the feat/highlights-gui branch 2 times, most recently from 5918afa to 8e18d8b Compare June 28, 2026 10:52
@pajlada pajlada linked an issue Jun 28, 2026 that may be closed by this pull request
4 tasks
@pajlada
pajlada force-pushed the feat/highlights-gui branch 6 times, most recently from 67c5736 to 5eccbe2 Compare July 6, 2026 06:48
@pajlada
pajlada force-pushed the feat/highlights-gui branch 2 times, most recently from 1cbe3e4 to e292d3c Compare July 19, 2026 08:13
@pajlada
pajlada force-pushed the feat/highlights-gui branch from e292d3c to c7ac05b Compare July 21, 2026 05:33
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.

"Move Up" on topmost highlight entry causes it to shift to bottom

1 participant