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

feat(editor): create new workflows page #4267

Merged
merged 42 commits into from
Oct 18, 2022

Conversation

alexgrozav
Copy link
Member

No description provided.

@alexgrozav alexgrozav added ui Enhancement in /editor-ui or /design-system n8n team Authored by the n8n team labels Oct 5, 2022
break;
}
case 'workflow-open': {
this.$store.dispatch('ui/openModal', WORKFLOW_OPEN_MODAL_KEY);
Copy link
Contributor

Choose a reason for hiding this comment

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

reminder to also delete modal completely

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

});
}
},
onActiveChange (data: { id: string, active: boolean }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should move this to workflow activator level.. that's where we are making the api request now

Copy link
Member Author

Choose a reason for hiding this comment

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

Wasn't entirely sure how it works. Thanks for pointing that out! Fixed now.

return;
}

if (event.metaKey || event.ctrlKey) {
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ thanks for keeping this

Comment on lines 72 to 78
value: {
type: Object,
default: () => ({}),
},
keys: {
type: Array,
default: (): string[] => [],
Copy link
Contributor

Choose a reason for hiding this comment

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

would be great to add types here... as PropType<whatever>

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Done!

@@ -0,0 +1,65 @@
<template>
<n8n-select
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not the same as n8n-user-select ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Migrated to n8n-user-select (added support for disabled entries as well).


import PageViewLayout from "@/components/layouts/PageViewLayout.vue";
import PageViewLayoutList from "@/components/layouts/PageViewLayoutList.vue";
import CredentialCard from "@/components/CredentialCard.vue";
Copy link
Contributor

Choose a reason for hiding this comment

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

is this still used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, removed.

showMessage,
debounceHelper,
).extend({
name: 'ResourcesListLayout',
Copy link
Contributor

Choose a reason for hiding this comment

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

reminder to write in kebab-case

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

}
});

this.$telemetry.track('User set filters in cred list', {
Copy link
Contributor

Choose a reason for hiding this comment

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

should be refactored out..

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@@ -185,12 +204,20 @@ export const store = new Vuex.Store({
if (index === -1) {
state.activeWorkflows.push(workflowId);
}

if (state.workflows[workflowId]) {
state.workflows[workflowId].active = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Vue.set for reactivity?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

},
setWorkflowInactive(state, workflowId: string) {
const index = state.activeWorkflows.indexOf(workflowId);
if (index !== -1) {
state.activeWorkflows.splice(index, 1);
}

if (state.workflows[workflowId]) {
state.workflows[workflowId].active = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Vue.set for reactivity?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

@linear
Copy link

linear bot commented Oct 6, 2022

N8N-4605

size="small"
@click.stop.prevent="showAll = true"
>
+{{ hiddenTagsLength }} more
Copy link
Contributor

Choose a reason for hiding this comment

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

i18n?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Also added story for truncated tags.

@@ -725,15 +724,6 @@ export default mixins(
e.preventDefault();

this.callDebounced('cutSelectedNodes', { debounceTime: 1000 });
} else if (e.key === 'o' && this.isCtrlKeyPressed(e) === true) {
Copy link
Contributor

Choose a reason for hiding this comment

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

reminder to remind Deb to update docs

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

sub_view: this.getTelemetrySubview(),
});
},
sendSortingTelemetry() {
this.$telemetry.track('User changed sorting in cred list', {
this.$telemetry.track(`User changed sorting in ${this.resourceKey} list`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

reminder to update telemetry table with new event and let david know....

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. David is aware and agreed to the change.

@@ -151,3 +171,8 @@ export default Vue.extend({
align-items: center;
}
</style>

<style lang="scss" scoped>
Copy link
Contributor

Choose a reason for hiding this comment

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

no closing tag here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Forgot about this. Removed.

@alexgrozav alexgrozav changed the title feat(editor): create new workflows page (N8N-4605) feat(editor): create new workflows page Oct 11, 2022
@@ -880,6 +880,7 @@ export const schema = {
sharing: {
format: Boolean,
default: false,
env: 'N8N_ENTERPRISE_FEATURES_SHARING',
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume you did not mean to push this?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's absolutely right, fixed.

mutdmour
mutdmour previously approved these changes Oct 18, 2022
@alexgrozav alexgrozav merged commit be7aac3 into master Oct 18, 2022
@alexgrozav alexgrozav deleted the n8n-4605-create-layout-of-new-workflow-list branch October 18, 2022 13:28
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Oct 18, 2022
@janober
Copy link
Member

janober commented Oct 21, 2022

Got released with [email protected]

@janober janober removed the Upcoming Release Will be part of the upcoming release label Oct 21, 2022
valya pushed a commit to valya/n8n that referenced this pull request Nov 8, 2022
* feat(editor): extract credentials view into reusable layout components for workflows view

* feat(editor): add workflow card and start work on empty state

* feat: add hoverable card and finish workflows empty state

* fix: undo workflows response interface changes

* chore: fix linting issues.

* fix: remove enterprise sharing env schema

* fix(editor): fix workflows resource view when sharing is enabled

* fix: change owner tag design and order

* feat: add personalization survey on workflows page

* fix: update component snapshots

* feat: refactored workflow card to use workflow-activator properly

* fix: fix workflow activator and proptypes

* fix: hide owner tag for workflow card until sharing is available

* fix: fixed ownedBy and sharedWith appearing for workflows list

* feat: update tags component design

* refactor: change resource filter select to n8n-user-select

* fix: made telemetry messages reusable

* chore: remove unused import

* refactor: fix component name casing

* refactor: use Vue.set to make workflow property reactive

* feat: add support for clicking on tags for filtering

* chore: fix tags linting issues

* fix: fix resources list layout when title words are very long

* refactor: add active and inactive status text to workflow activator

* fix: fix credentials and workflows sorting when name contains leading whitespace

* fix: remove wrongfully added style tag

* feat: add translations and storybook examples for truncated tags

* fix: remove enterprise sharing env from schema

* refactor: fix workflows module and workflows field store naming conflict

* fix: fix workflow activator wrapping

* feat: updated empty workflows list cards design

* feat: update workflow activator margins and workflow card

* feat: add duplicate workflow functionality and update tags

* feat: fix duplicate workflow flow

* fix: fix status color for workflow activator with could not be started status

* fix: remove createdAt and updatedAt from workflow duplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants