Skip to content

Change line spacer trigger type to use spin box#4531

Merged
vadi2 merged 1 commit intoMudlet:developmentfrom
Delwing:line-spacer-accept-numbers
Dec 28, 2020
Merged

Change line spacer trigger type to use spin box#4531
vadi2 merged 1 commit intoMudlet:developmentfrom
Delwing:line-spacer-accept-numbers

Conversation

@Delwing
Copy link
Copy Markdown
Contributor

@Delwing Delwing commented Dec 26, 2020

Brief overview of PR changes/additions

As mentioned in #4253 it would be puzzling to accept text values for trigger spacer.
image

Motivation for adding to Mudlet

Make input less puzzling for trigger spacer

Other info (issues closed, discussion etc)

closes #4253

move icon out of line edit action to make all types have small icon on the left
@Delwing Delwing requested a review from a team as a code owner December 26, 2020 01:56
@Delwing Delwing requested a review from a team December 26, 2020 01:56
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Dec 26, 2020

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.

regexList << pattern;

switch (mTriggerPatternEdit.at(i)->comboBox_patternType->currentIndex()) {
switch (patternType) {
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.

Since you are using patternType directly here, it would make sense to use the same defines in the case XXX:s.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Forgive me my lack of knowledge, but not sure what are you talking here about. I am actually not sure why this switch was there instead of just appending index directly to list.

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.

🤔 Ah, probably for code robustness - so that the index was not hard coded to the values defined in the REGEX_XXXX values (bit of a bad choice - TRIGGERTYPE_XXXX` would have been a better one IMVHO).

Yeah, in hindsight my suggestion isn't a change that should be made after all. I.e. ignore my previous comment... 🤦‍♂️

Copy link
Copy Markdown
Member

@SlySven SlySven left a comment

Choose a reason for hiding this comment

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

Okay, I don't have any further issues - but I'd rather a third party also look it over so I'll defer to @vadi2 ....

@vadi2 vadi2 changed the title change line spacer input to use spin box Change line spacer trigger type to use spin box Dec 28, 2020
Copy link
Copy Markdown
Member

@vadi2 vadi2 left a comment

Choose a reason for hiding this comment

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

Nice little piece of work, thanks for doing this!

@vadi2 vadi2 merged commit 802ebd2 into Mudlet:development Dec 28, 2020
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
move icon out of line edit action to make all types have small icon on the left

Co-authored-by: Piotr Wilczynski <piotr.wilczynski@bisnode.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.

Line spacer triggers shouldn't allow nonnumeric values to be input

3 participants