Skip to content

Internal: make arguments in TTabBar more contextualised#4803

Closed
vadi2 wants to merge 1 commit intoMudlet:developmentfrom
vadi2:improve-clarity-ttabbar
Closed

Internal: make arguments in TTabBar more contextualised#4803
vadi2 wants to merge 1 commit intoMudlet:developmentfrom
vadi2:improve-clarity-ttabbar

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Feb 14, 2021

Brief overview of PR changes/additions

Internal: make arguments in TTabBar more contextualised

Motivation for adding to Mudlet

Easier dev time

Other info (issues closed, discussion etc)

#4788 (comment)

@vadi2 vadi2 requested a review from a team as a code owner February 14, 2021 11:25
@vadi2 vadi2 requested a review from a team February 14, 2021 11:25
@vadi2 vadi2 mentioned this pull request Feb 14, 2021
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Feb 14, 2021

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

}

void TStyle::setNamedTabState(const QString& text, const bool state, QSet<QString>& effect)
void TStyle::setNamedTabState(const QString& profileName, const bool state, QSet<QString>& effect)
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.

That wasn't quite what I meant - notice how the methods that have "Name" in their name (like this:
"set Name dTabState"
perhaps it would be better if text as a parameter/argument was replaced by name within this class - which would be a little more consistent here and go some way towards your wording:

Suggested change
void TStyle::setNamedTabState(const QString& profileName, const bool state, QSet<QString>& effect)
void TStyle::setNamedTabState(const QString& name, const bool state, QSet<QString>& effect)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't follow - because the named tab's name is the profile name.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Then again, there is a separation of concerns...

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.

I don't follow - because the named tab's name is the profile name.

Then again, there is a separation of concerns...

In this usage - sure - but if we (or some other project) used the class somewhere else, then profileName doesn't fit.

OTOH Since the methods refer to the text on the tab as the "text" - in setNamedTabState and tabName and as the argument to the methods that take a QString argument to select a particular tab as opposed to those that take an ìnteger and refer to that number as the "index" - it seems reasonable to me {and I would accept without much grumbling} a change from text to name - profileName just doesn't sit well with me. 🙁

💡 Say, for instance, if we redid the Editor to use this class to put the different Mudlet items {"aliases", "buttons", "keybindings" etc.} as tabs across the top - instead of the current buttons on the side; then "name" would still fit - but "profileName" wouldn't.

🤞 hoping to avoid: 🚲 🚲 🏠 🚲 🚲

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK I agree

@vadi2 vadi2 closed this Feb 16, 2021
@vadi2 vadi2 deleted the improve-clarity-ttabbar branch February 16, 2021 18:31
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.

2 participants