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

added controls to display, select, add, and remove automation configs #599

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d15c564
added controls to display, select, add, and remove automation configs
jtuckerfubo Oct 8, 2024
7accd13
Update webviews/src/views/RokuAutomationView/ConfigControls.svelte
jtuckerfubo Oct 8, 2024
e681ce3
Replaced ConfigControls with AutoRunsEditor, adding expanded set of
jtuckerfubo Oct 11, 2024
34ecece
Some UI tweaks
TwitchBronBron Oct 14, 2024
85643a7
Merge branch 'master' into feature/542-support-multiple-automations
justintucker1 Oct 28, 2024
4becf75
new ui per/BP, features a drop down style panel with an html table
justintucker1 Oct 28, 2024
015df44
small usability improvements
justintucker1 Oct 28, 2024
281cc4d
added dnd run reordering
justintucker1 Oct 29, 2024
49ef0eb
adding double click run renaming
justintucker1 Oct 29, 2024
8925e41
add arrow key selection for usability
justintucker1 Oct 29, 2024
a59ee73
modify drag over feedback for better usability
justintucker1 Oct 30, 2024
630b37b
ensure selected run is preserved between sessions
justintucker1 Oct 30, 2024
840b1a2
ensure targeted run is executed when user presses run button
justintucker1 Oct 30, 2024
b8506b2
strictly typed variables per review
justintucker1 Nov 5, 2024
adaa7b9
replace arrow functions with declarative functions per review
justintucker1 Nov 6, 2024
fe57417
replace explicit promise resolve/reject handling with async/await
justintucker1 Nov 9, 2024
dcb9f5b
svelte/typescript auto formatting
justintucker1 Nov 9, 2024
4944edb
replaced direct observation of html events with svelte bindings per
justintucker1 Nov 9, 2024
176fd44
reduce selected run display font size per review
justintucker1 Nov 9, 2024
2efbe60
replaced triangle-down with menu icon in selected run display per review
justintucker1 Nov 9, 2024
41adcae
added a play button to runs in the list of runs
justintucker1 Nov 11, 2024
17b3d8a
adding function argument types to comply with review feedback request
justintucker1 Nov 11, 2024
2df014b
just in case we want this to be typed
justintucker1 Nov 11, 2024
07284a2
Merge branch 'master' into feature/542-support-multiple-automations
TwitchBronBron Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/viewProviders/RokuAutomationViewViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class RokuAutomationViewViewProvider extends BaseRdbViewProvider {
super(context, dependencies);

this.addMessageCommandCallback(ViewProviderCommand.storeRokuAutomationConfigs, async (message) => {
this.selectedConfig = message.context.selectedConfig;
this.rokuAutomationConfigs = message.context.configs;
// Make sure to use JSON.stringify or weird stuff happens
await context.workspaceState.update(WorkspaceStateKey.rokuAutomationConfigs, JSON.stringify(message.context));
Expand All @@ -25,7 +26,12 @@ export class RokuAutomationViewViewProvider extends BaseRdbViewProvider {

this.addMessageCommandCallback(ViewProviderCommand.runRokuAutomationConfig, async (message) => {
const index = message.context.configIndex;
await this.runRokuAutomationConfig(index);
try {
await this.runRokuAutomationConfig(index);
} catch (e) {
this.updateCurrentRunningStep(-1);
throw e;
}
return true;
});

Expand Down Expand Up @@ -87,6 +93,7 @@ export class RokuAutomationViewViewProvider extends BaseRdbViewProvider {
}

private isRecording = false;
private selectedConfig;
jtuckerfubo marked this conversation as resolved.
Show resolved Hide resolved
private rokuAutomationConfigs: {
name: string;
steps: {
Expand Down Expand Up @@ -153,10 +160,12 @@ export class RokuAutomationViewViewProvider extends BaseRdbViewProvider {
const json = this.extensionContext.workspaceState.get(WorkspaceStateKey.rokuAutomationConfigs);
if (typeof json === 'string') {
const result = JSON.parse(json);
this.selectedConfig = result.selectedConfig;
this.rokuAutomationConfigs = result.configs;
}

const message = this.createEventMessage(ViewProviderEvent.onRokuAutomationConfigsLoaded, {
selectedConfig: this.selectedConfig,
configs: this.rokuAutomationConfigs
});

Expand Down
Loading