-
Notifications
You must be signed in to change notification settings - Fork 703
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
Chatbot v3 #1394
Conversation
AnkhHeart
commented
Feb 19, 2019
- 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
very much a WIP, it looks like there isn't even an api endpoint for this yet. Things to do:
There was a problem hiding this 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
There was a problem hiding this 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.
❌ build failed 0861fbb |
- hide songrequest default commands
There was a problem hiding this 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.
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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.
app/components/ModalLayout.vue
Outdated
@@ -69,6 +71,19 @@ | |||
} | |||
} | |||
|
|||
.modal-layout-tab-content { | |||
flex-grow: 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation is wrong
app/components/ModalLayout.vue.ts
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is wrong.
There was a problem hiding this comment.
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.
app/components/TopNav.vue
Outdated
@@ -12,7 +12,7 @@ | |||
<div class="tabs"> | |||
<button | |||
@click="navigateDashboard" | |||
class="tab-button" | |||
class="tab-button tab-button--dashboard" |
There was a problem hiding this comment.
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; | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete this?
app/services/chatbot/chatbot-poll.ts
Outdated
this.RESET_ACTIVE_POLL(); | ||
}); | ||
|
||
this.socket.on('poll.update', (response: any) => { |
There was a problem hiding this comment.
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?
app/services/chatbot/chatbot-poll.ts
Outdated
} | ||
|
||
@mutation() | ||
private UPDATE_POLL_OPTIONS(options: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface?
app/services/chatbot/chatbot-poll.ts
Outdated
} | ||
|
||
@mutation() | ||
private UPDATE_POLL_TIMER(data: any) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do
app/services/platform-apps/index.ts
Outdated
@@ -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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong.
General comment: we can format Vue templates with prettier, which doesn't seem like they're in all cases. |
There was a problem hiding this 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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
app/components/page-components/Chatbot/windows/ChatbotCapsProtectionWindow.vue.ts
Show resolved
Hide resolved
app/components/page-components/Chatbot/windows/ChatbotCommandPreferencesWindow.vue.ts
Outdated
Show resolved
Hide resolved
...this.chatAlerts, | ||
enabled: !this.chatAlertCurrentlyEnabled, | ||
}); | ||
}, | ||
}, | ||
{ | ||
/*{ |
There was a problem hiding this comment.
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
app/components/page-components/Chatbot/Importer/ChatbotStreamElementsModal.vue.ts
Show resolved
Hide resolved
-webkit-transition: none !important; | ||
-moz-transition: none !important; | ||
-o-transition: none !important; | ||
transition: none !important; |
There was a problem hiding this comment.
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
app/components/page-components/Chatbot/Poll/ChatbotPollOptionModal.vue.ts
Show resolved
Hide resolved
const startedTimer = activePoll.settings.timer.started_at !== undefined; | ||
|
||
if (containsSettings && containsTimer && startedTimer) { | ||
const timeElapsed = Date.now() - activePoll.settings.timer.started_at; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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.
- Updated update timer, passes Date.now() - Removed unecessary injection - Removed uuid mentions - Added TODO comment
There was a problem hiding this 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.
❌ build failed c634d4c Build execution time has reached the maximum allowed time for your plan (60 minutes). |
- Removed browser specific transitions
There was a problem hiding this 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.
❌ build failed a47e3db Build execution time has reached the maximum allowed time for your plan (60 minutes). |
There was a problem hiding this 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
There was a problem hiding this 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.
There was a problem hiding this 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.