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

Chatbot v3 #1394

Merged
merged 164 commits into from
Feb 27, 2019
Merged

Chatbot v3 #1394

merged 164 commits into from
Feb 27, 2019

Conversation

AnkhHeart
Copy link
Contributor

  • Loyalty Implmentation
  • Heist Implementation
  • Betting Implementation
  • Poll Implementation
  • Fixed NumberInput
  • Added enter/return blocking option to TextArea
  • Gamble Minigame Implemented
  • Importer from Extension & SE Implemented
  • Queue Implemented
  • Quotes Implmeneted

Nitsorn and others added 30 commits July 31, 2018 15:09
very much a WIP, it looks like there isn't even an api endpoint for this yet. Things to do:
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12484 lines exceeds the maximum allowed for the inline comments feature.

- Removed @keydown.enter.prevent since handleInput does it when blockReturn is set to true
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12483 lines exceeds the maximum allowed for the inline comments feature.

@AppVeyorBot
Copy link

8645501

@AppVeyorBot
Copy link

❌ build failed 0861fbb

- hide songrequest default commands
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12482 lines exceeds the maximum allowed for the inline comments feature.

Copy link
Member

@avacreeth avacreeth left a comment

Choose a reason for hiding this comment

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

Nothing major from me. I would like to see all instances of any replaced with interfaces/types before we merge this though.

this.$modal.show(this.NEW_BET_OPTION_MODAL_ID);
}

onAddedHandler(option: IBettingOption = null, index: number = -1) {
Copy link
Member

Choose a reason for hiding this comment

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

Can this be extracted? This is now the 3rd time this function has been copy pasted I think.

@@ -69,6 +71,19 @@
}
}

.modal-layout-tab-content {
flex-grow: 1;
Copy link
Member

Choose a reason for hiding this comment

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

indentation is wrong

@@ -23,6 +23,10 @@ export default class ModalLayout extends Vue {
// cancel button.
@Prop({ default: true }) showCancel: boolean;

// If controls are shown, whether or not to show the
// cancel button.
Copy link
Member

Choose a reason for hiding this comment

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

This comment is wrong.

Copy link
Member

Choose a reason for hiding this comment

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

I'm a little unclear what this option is meant to do. Maybe it will be obvious once the correct comment is added.

@@ -12,7 +12,7 @@
<div class="tabs">
<button
@click="navigateDashboard"
class="tab-button"
class="tab-button tab-button--dashboard"
Copy link
Member

Choose a reason for hiding this comment

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

Does this class exist anywhere? I don't see why this was added.

this.navigationService.navigate('Chatbot');
this.chatbotApiChatbotApiService.Common.openSongRequestPreferencesWindow();
return;
}*/
Copy link
Member

Choose a reason for hiding this comment

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

Can we delete this?

this.RESET_ACTIVE_POLL();
});

this.socket.on('poll.update', (response: any) => {
Copy link
Member

Choose a reason for hiding this comment

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

Can we define interfaces for the following 3 responses?

}

@mutation()
private UPDATE_POLL_OPTIONS(options: any) {
Copy link
Member

Choose a reason for hiding this comment

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

interface?

}

@mutation()
private UPDATE_POLL_TIMER(data: any) {
Copy link
Member

Choose a reason for hiding this comment

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

Interface?

}

updateSongRequestPreferencesData(data: any) {
// NOTE: should update type
Copy link
Member

Choose a reason for hiding this comment

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

Please do

@@ -2,7 +2,7 @@ import { mutation, StatefulService } from 'services/stateful-service';
import { lazyModule } from 'util/lazy-module';
import path from 'path';
import fs from 'fs';
import { Subject } from 'rxjs';
import { BehaviorSubject, Subject } from 'rxjs';
Copy link
Member

Choose a reason for hiding this comment

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

This looks wrong.

@AppVeyorBot
Copy link

0b6b13e

@blackxored
Copy link
Contributor

General comment: we can format Vue templates with prettier, which doesn't seem like they're in all cases.

Copy link
Contributor

@holiber holiber left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, thanks for hardworking on this.

@@ -15,7 +15,7 @@ export default class WidgetProperties extends Vue {
@Inject() navigationService: NavigationService;
@Inject() windowsService: WindowsService;
@Inject() userService: UserService;
@Inject() chatbotCommonService: ChatbotCommonService;
@Inject() chatbotApiChatbotApiService: ChatbotApiService;
Copy link
Contributor

Choose a reason for hiding this comment

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

This injection doesn't work. There is no such service chatbotApiChatbotApiService

@@ -21,7 +21,7 @@ class ObsBoolInput extends ObsInput<IObsInput<boolean>> {
}

handleClick() {
if (this.value.enabled === false) return;
if (!this.value.enabled) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Chatbot must use inputs from the shared folder. All ObsInputs are only for editing libobs values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is only using things from the shared folder.

Copy link
Contributor

Choose a reason for hiding this comment

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

So why you need this change inside the obs folder here for current PR?

...this.chatAlerts,
enabled: !this.chatAlertCurrentlyEnabled,
});
},
},
{
/*{
Copy link
Contributor

@holiber holiber Feb 22, 2019

Choose a reason for hiding this comment

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

Why it's commented? If you need to keep it commented pls add // TODO: explanation

-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
transition: none !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Electron is Chromium-based app. No need for cross-browser prefixes here

const startedTimer = activePoll.settings.timer.started_at !== undefined;

if (containsSettings && containsTimer && startedTimer) {
const timeElapsed = Date.now() - activePoll.settings.timer.started_at;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't use Date.now() here.
Mutation must be a pure function that relies only on arguments and state. This method will be executed in the main and child window and Date.now() will be different.
To fix that, just pass a Date.now() as an argument for this mutation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need the Date.now() at that point in time since I am calculating the time that has elapsed since the timer has started, it's used for a countdown / count up timer.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch. I missed this.

- Removed comment from widgetproperties
- Fixed modal layout formatting
- modal layout comment fixed
- Fixed object on add bet option modal
- Betting Window now extends Poll
- Added missing types in betting & poll service
- Removed tab-button--dashboard
- Removed BehaviorSubject
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12474 lines exceeds the maximum allowed for the inline comments feature.

@AppVeyorBot
Copy link

976fbe3

- Updated update timer, passes Date.now()
- Removed unecessary injection
- Removed uuid mentions
- Added TODO comment
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12478 lines exceeds the maximum allowed for the inline comments feature.

@AppVeyorBot
Copy link

❌ build failed c634d4c Build execution time has reached the maximum allowed time for your plan (60 minutes).

- Removed browser specific transitions
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12472 lines exceeds the maximum allowed for the inline comments feature.

@AppVeyorBot
Copy link

❌ build failed a47e3db Build execution time has reached the maximum allowed time for your plan (60 minutes).

Copy link
Contributor

@holiber holiber left a comment

Choose a reason for hiding this comment

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

add .env to .gitignore and good to merge

- ignore .env
- Remove env variable
Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12474 lines exceeds the maximum allowed for the inline comments feature.

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 12473 lines exceeds the maximum allowed for the inline comments feature.

@AppVeyorBot
Copy link

b6375d5

@holiber holiber merged commit 44e86bb into staging Feb 27, 2019
@holiber holiber deleted the chatbot-v3 branch February 27, 2019 21:17
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.

7 participants