Skip to content

Make it clearer for Mudlet newbies where trigger text goes#4673

Merged
vadi2 merged 3 commits intoMudlet:developmentfrom
vadi2:add-pattern-placeholder
Jan 29, 2021
Merged

Make it clearer for Mudlet newbies where trigger text goes#4673
vadi2 merged 3 commits intoMudlet:developmentfrom
vadi2:add-pattern-placeholder

Conversation

@vadi2
Copy link
Copy Markdown
Member

@vadi2 vadi2 commented Jan 24, 2021

Brief overview of PR changes/additions

Add a placeholder on the 1st pattern where the trigger pattern goes:

image

Motivation for adding to Mudlet

We've seen cases where it's not obvious to new players:
image

Other info (issues closed, discussion etc)

Text to find was explicitly chosen because newbies to text games won't know what a trigger pattern is. That said trigger pattern is still included as an educational measure + to help veterans from other clients.

Pattern is only on the 1st one because after you fill in the first pattern, you know what the field is for, so you don't need the 'nag'.

I've tried several variants, I think this one is the best:
image

But opinions on others welcome:
image

@vadi2 vadi2 requested a review from a team as a code owner January 24, 2021 10:37
@vadi2 vadi2 requested a review from a team January 24, 2021 10:37
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jan 24, 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.

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Jan 24, 2021

If you were to reproduce it in ALL the items - would it be helpful to revise the placeholder text if the type QComboBox is set to a different type? This is so the text could reflect what is to go in the box - you can use the same slot-signal method as I previously used to copy a coloured icon from the QComboBox to that QLineEdit but which got removed...?

  1. substring: Text to find
  2. perl regex: Perl compatible regular expression
  3. start of line: Text to find at the beginning of a line
  4. exact match: Whole (all) line of text to find
  5. lua function: Name of lua function returning true or false
  6. line space: not applicable
  7. color trigger: not applicable
  8. prompt: not applicable

Also, for the substring case - as it is the default - you might need to also say - Text to find (this item ignored if left empty like this)

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 24, 2021

you can use the same slot-signal method as I previously used to copy a coloured icon from the QComboBox to that QLineEdit but which got removed...?

Which slot is that?

@Kebap
Copy link
Copy Markdown
Contributor

Kebap commented Jan 24, 2021

I like the suggestion.
Only some of the texts seem too complicated.
Also may need adjustment with the code placeholder text down below.

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Jan 26, 2021

Which slot is that?

(void) dlgTriggerPatternEdit::slot_triggerTypeComboBoxChanged(const int) which got modified in #4531 as @Delwing also moved the coloured square that I had positioned to the left side within the QLineEdit that displayed the text (because I hadn't sorted out how to style the text via a built in Mudlet global style sheet to accommodate Light vs Dark DEs - on my TODO list...!) to a separate label which is filled with a icon with the corresponding colour.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 26, 2021

Not sure how I like it, I think it loses sight of the original goal. See gif:

Peek 2021-01-26 17-08

Code is pushed so you can try it for yourself.

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.

I was thinking that it would be applied to all the items - though as I said in that case the default (substring) one should also say something about leaving it empty means it is ignored. (Of course having all of them being so ignored is marked as an error for a non-trigger group TTriger instance).

@SlySven
Copy link
Copy Markdown
Member

SlySven commented Jan 26, 2021

Also given the space available it is possible for the line spacer one to actually say something about what the number means. Does a 0 valid mean an ignored line spacer trigger item - if so then QSpinBox::specialValueText could be useful...

@Kebap
Copy link
Copy Markdown
Contributor

Kebap commented Jan 26, 2021

Maybe try more similar texts like these examples:

substring: add your text to find - anywhere in the game output
perl regex: add your text to find - as a regular expression pattern
start of line: add your text to find - as the beginning of a line
exact match: add your text to find - as the whole text line

For "lua function" and "line spacer" I would not put any placeholder texts.

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 27, 2021

I was thinking that it would be applied to all the items - though as I said in that case the default (substring) one should also say something about leaving it empty means it is ignored. (Of course having all of them being so ignored is marked as an error for a non-trigger group TTriger instance).

I think it is pretty obvious that if it is empty, it does not do anything - spelling out that much detail doesn't make for a pretty result to look at.

Also given the space available it is possible for the line spacer one to actually say something about what the number means. Does a 0 valid mean an ignored line spacer trigger item - if so then QSpinBox::specialValueText could be useful...

Could be, but I'll leave that rabbithole for later 😅

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 27, 2021

Here's a fusion from the suggestions. Looks good now:

Tweaked text to find

@Kebap
Copy link
Copy Markdown
Contributor

Kebap commented Jan 27, 2021

Getting better indeed.
Only doubt, you explain "exact match" with much the same words now. So not really. Also why drop the "text to find" pretext?

@vadi2
Copy link
Copy Markdown
Member Author

vadi2 commented Jan 27, 2021

It didn't add much value and just made the placeholder longer, while we want to be short as possible, look at how nice this was: https://user-images.githubusercontent.com/110988/105627597-1b0dc980-5e38-11eb-9749-9a2630285444.png

Similar wording for exact match doesn't seem too bad because the placeholder is concise and straight to the point

@vadi2 vadi2 merged commit 68ad594 into Mudlet:development Jan 29, 2021
@vadi2 vadi2 deleted the add-pattern-placeholder branch January 29, 2021 09:34
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
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.

3 participants