Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds more sass + small improvements #19

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

supervanya
Copy link
Collaborator

@supervanya supervanya commented Feb 13, 2022

2022-02-13 00 14 29

closes #7

User Improvements:

  • Adds ability to turn off the plugin inside the popups
  • Adds hella sass to the messages
  • Improves documentation to explain how to manually toggle the plugin with a command

Dev Chores:

  • Add prettier config to the repo

const actionButton = `Turn it back ${oppositeState}`;
const message = `Toggled ${currentState}. You can alway run "MouseTrap: Toggle On/Off"`;
vscode.window.showInformationMessage(message, {}, actionButton).then(action => {
action === actionButton && vscode.commands.executeCommand('mouse-trap.toggle');
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure what's happening with the logic here. Why do you need the equality check?

const currentState = on ? 'On' : 'Off';
const oppositeState = on ? 'Off' : 'On';
const actionButton = `Turn it back ${oppositeState}`;
const message = `Toggled ${currentState}. You can alway run "MouseTrap: Toggle On/Off"`;
Copy link
Owner

@hootio hootio Feb 13, 2022

Choose a reason for hiding this comment

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

  • *always
  • I'd put a newline after the first sentence: Toggled ${currentState}.\nYou can always run "MouseTrap: Toggle On/Off"

if (sassyPopupMessage) {
const popUp = vscode.window.showInformationMessage(sassyPopupMessage, {}, 'Turn Off');
popUp.then(action => {
if (action === 'Turn Off') {
Copy link
Owner

Choose a reason for hiding this comment

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

Same here, a bit confused what this check does.

mouseTrackerCallback(event);
}
});
vscode.window.onDidChangeTextEditorSelection(event => on && mouseTrackerCallback(event));
Copy link
Owner

Choose a reason for hiding this comment

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

Nice!

} else if (count < 50) {
return `Really, mouse? Again? (failure count: ${count})`;
} else if (count === 50) {
return `You score is: 50! I will stop bombarding you with messages unless you hit 100, which you won't, right?`;
Copy link
Owner

@hootio hootio Feb 13, 2022

Choose a reason for hiding this comment

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

  • *Your
  • I'd remove the colon :

function getSassyMessage() {
// we could show messages less frequently
if (count < 10) {
return `You have used the mouse ${count} times`;
Copy link
Owner

Choose a reason for hiding this comment

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

Period at the end? Just to stay consistent with the other sentences

Copy link
Owner

@hootio hootio left a comment

Choose a reason for hiding this comment

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

Great changes! Left some suggestions / questions

} else if (count === 20) {
return `This isn't working. It's me, it's not you. Maybe turn it off?`;
} else if (count < 50) {
return `Really, mouse? Again? (failure count: ${count})`;
Copy link
Owner

Choose a reason for hiding this comment

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

Not a big fan of this (failure count: ${count}) thing anymore since the tone/language of the other messages have changed.

} else if (count === 100) {
return `Used the mouse 100 times, are you even trying?`;
} else if (count < 200) {
return `What if you used duct tape for the mouse? (failure count: ${count})`;
Copy link
Owner

Choose a reason for hiding this comment

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

Same thing about failure count

} else if (count < 200) {
return `What if you used duct tape for the mouse? (failure count: ${count})`;
} else if (count === 300) {
return `What if you duct taped the mouse? Just an idea ¯\_(ツ)_/¯`;
Copy link
Owner

Choose a reason for hiding this comment

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

Mentioning duct tape again? Change one of them?

} else if (count === 300) {
return `What if you duct taped the mouse? Just an idea ¯\_(ツ)_/¯`;
} else {
return `Used the mouse ${count} times`;
Copy link
Owner

Choose a reason for hiding this comment

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

  • Period here too?
  • Maybe something super disappointed? Could even use emojis probs. Perhaps:
    😪 ${count} times

vscode.commands.executeCommand('mouse-trap.toggle');
}
});
``;
Copy link
Owner

Choose a reason for hiding this comment

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

What's this? 😄

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.

Add character / personality to messages
2 participants