-
Notifications
You must be signed in to change notification settings - Fork 20
VMO-3852 Support deep linking for simulator + VMO-3687 Simulator on read only view #75
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
base: master
Are you sure you want to change the base?
Changes from all commits
f976e8a
4ad932b
3b70ffb
2d4b934
1337084
6e5dfda
56985e5
b31495d
30f23ed
515bc99
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,11 @@ export const routes = [ | |
| name: 'flow-details', | ||
| meta: {isFlowEditorShown: true}, | ||
| }, | ||
| { | ||
| path: 'simulator', | ||
| name: 'flow-simulator', | ||
| meta: { isSidebarShown: true }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
| }, | ||
| { | ||
| path: 'block/:blockId', | ||
| name: 'block-selected', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,8 @@ import { | |
| ActionTree, GetterTree, Module, MutationTree, | ||
| } from 'vuex' | ||
| import { IRootState } from '@/store' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
| import { IPrompt } from '@floip/flow-runner'; | ||
| import { router } from '@/router' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
| import { IPrompt } from '@floip/flow-runner' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
|
|
||
| export interface BlocksData { | ||
| isFocused: boolean; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint Expected a comma. (@typescript-eslint/member-delimiter-style)
|
||
|
|
@@ -24,6 +25,7 @@ export const getters: GetterTree<IClipboardState, IRootState> = { | |
| blocksData: (state) => state.blocksData, | ||
| getBlockPrompt: (state) => (index: number) => state.blocksData[index].prompt, | ||
| isBlockFocused: (state) => (index: number) => state.blocksData[index].isFocused, | ||
| hasSimulator: (_, _2, _3, rootGetters) => rootGetters['flow/hasOfflineMode'] && rootGetters.isFeatureSimulatorEnabled && !rootGetters['builder/isEditable'], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint This line has a length of 158. Maximum allowed is 140. (max-len)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint Unexpected any value in conditional. An explicit comparison or type cast is required. (@typescript-eslint/strict-boolean-expressions)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint Unexpected any value in conditional. An explicit comparison or type cast is required. (@typescript-eslint/strict-boolean-expressions)
|
||
| } | ||
|
|
||
| export const mutations: MutationTree<IClipboardState> = { | ||
|
|
@@ -38,6 +40,10 @@ export const mutations: MutationTree<IClipboardState> = { | |
| export const actions: ActionTree<IClipboardState, IRootState> = { | ||
| setSimulatorActive({ commit }, value) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
| commit('setSimulatorActive', value) | ||
| const routeName = value ? 'flow-simulator' : 'flow-canvas' | ||
| router.replace({ | ||
| name: routeName, | ||
| }) | ||
| }, | ||
| resetBlocksData({ state }) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
| state.blocksData = [] | ||
|
|
@@ -58,7 +64,7 @@ export const actions: ActionTree<IClipboardState, IRootState> = { | |
| }, | ||
| removeFromBlocksData({ state }, index: number) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space after '{'. (object-curly-spacing)
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint There should be no space before '}'. (object-curly-spacing)
|
||
| state.blocksData.splice(index) | ||
| } | ||
| }, | ||
| } | ||
|
|
||
| export const store: Module<IClipboardState, IRootState> = { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,22 +11,7 @@ | |
| v-if="isSimulatorActive" | ||
| class="tree-sidebar-container" | ||
| :class="{ 'slide-out': !$route.meta.isSidebarShown,}"> | ||
| <div | ||
| class="sidebar-cue" | ||
| :class="{'sidebar-close': $route.meta.isSidebarShown}" | ||
| @click="showOrHideSidebar"> | ||
| <font-awesome-icon | ||
| v-if="$route.meta.isSidebarShown" | ||
| :icon="['fac', 'minimize']" | ||
| class="fa-btn" /> | ||
| <font-awesome-icon | ||
| v-else | ||
| :icon="['fac', 'expand']" | ||
| class="fa-btn" /> | ||
| </div> | ||
|
|
||
| <div | ||
| class="tree-sidebar"> | ||
| <div v-if="$route.name === 'flow-simulator' && hasSimulator" class="tree-sidebar"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint 'class' should be on a new line. (vue/max-attributes-per-line)
|
||
| <clipboard-root /> | ||
| </div> | ||
| </aside> | ||
|
|
@@ -148,7 +133,7 @@ export default { | |
|
|
||
| ...mapGetters('flow', ['activeFlow']), | ||
| ...mapGetters('builder', ['activeBlock', 'isEditable', 'interactionDesignerBoundingClientRect']), | ||
| ...mapGetters('clipboard', ['isSimulatorActive']), | ||
| ...mapGetters('clipboard', ['hasSimulator', 'isSimulatorActive']), | ||
|
|
||
| jsKey() { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)
|
||
| return get(this.selectedBlock, 'jsKey') | ||
|
|
@@ -221,6 +206,9 @@ export default { | |
| if (this.$route.meta?.isBlockEditorShown) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint Unexpected any value in conditional. An explicit comparison or type cast is required. (@typescript-eslint/strict-boolean-expressions)
|
||
| this.setIsBlockEditorOpen(true) | ||
| } | ||
| if (this.$route.name === 'flow-simulator' && this.hasSimulator()) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we already have this condition here, what if we change Would that work?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @safydy-r This condition has been added here to open up the simulator when the URL says There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reporter: ESLint Unexpected any value in conditional. An explicit comparison or type cast is required. (@typescript-eslint/strict-boolean-expressions)
|
||
| this.setSimulatorActive(true) | ||
| } | ||
| }, 500) | ||
| console.debug('Vuej tree interaction designer mounted!') | ||
|
|
||
|
|
@@ -242,6 +230,7 @@ export default { | |
| ...mapMutations('builder', ['activateBlock', 'setIsBlockEditorOpen', 'setInteractionDesignerBoundingClientRect']), | ||
| ...mapActions('builder', ['setIsEditable']), | ||
| ...mapMutations('flow', ['flow_setActiveFlowId']), | ||
| ...mapActions('clipboard', ['setSimulatorActive']), | ||
|
|
||
| ...mapActions([ | ||
| 'attemptSaveTree', | ||
|
|
||
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.
Reporter: ESLint
Rule: eslint.rules.@typescript-eslint/strict-boolean-expressions
Severity: ERROR
File: src/components/interaction-designer/toolbar/TreeBuilderToolbar.vue L495
Unexpected any value in conditional. An explicit comparison or type cast is required. (@typescript-eslint/strict-boolean-expressions)