-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix bug where mutations menu would show wrong workflow #1011
Conversation
Error in production mode, else warn (instead of being off entirely)
]) | ||
}) | ||
|
||
describe('iterateType', () => { |
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.
Show skeleton loader in mutations menu while mutations are still loading
'import/no-duplicates': 'off', | ||
'no-duplicate-imports': 'error' |
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 results in less faff when importing typedef
s separately from the proper imports (like how we use if TYPE_CHECKING:
in Python)
import FormGenerator from '@/components/graphqlFormGenerator/FormGenerator' | ||
import Task from '@/components/cylc/Task' | ||
import FormGenerator from '@/components/graphqlFormGenerator/FormGenerator.vue' | ||
import Task from '@/components/cylc/Task.vue' |
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 is just to allow VSCode intellisense to work)
if (!this.mutations || this.user.permissions.length < 2) { | ||
if (!this.mutations.length || this.user.permissions.length < 2) { |
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.
Remember that empty arrays are truthy in JavaScript! Always use .length
for testing conventional truthiness otherwise you're just testing that it is not undefined
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.
Works great Ronnie! Tested running three concurrent workflows with five old workflows, no issues that I can see.
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.
Checked out and tested manually, including the auth changes via test user account. Working smoothly for me.
Fixes a bug where navigating between running workflows and clicking on the workflow hamburger button would bring up the menu for the previous workflow. Closes #1006.
Note: It is not possible to write an e2e test for the bugfix while we only have one workflow in the mock/demo mode, so reviewers should test manually. You may want to review commit-by-commit.
This also changes the way the mutations menu is handled while the set of mutations is still loading. Instead of waiting until the mutations have loaded before allowing the user to open the menu, it now opens the menu and displays a skeleton loader until the mutations have loaded.
In practice the time it takes to load the mutations is small but for testing purposes you can manually delay the loading by e.g. 15s by applying this patch:
Also adds test for:
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.