A platform for community discussion. Free, open, simple.
UX: Show creator username in workflows list and drop last editor column (#44818)
David Battersby170d8559832e
diff --git a/plugins/discourse-workflows/admin/assets/javascripts/admin/components/workflows/index.gjs b/plugins/discourse-workflows/admin/assets/javascripts/admin/components/workflows/index.gjsindex ff1d06a12ec..b3d134f3175 100644--- a/plugins/discourse-workflows/admin/assets/javascripts/admin/components/workflows/index.gjs+++ b/plugins/discourse-workflows/admin/assets/javascripts/admin/components/workflows/index.gjs@@ -309,14 +309,11 @@ export default class WorkflowsIndex extends Component {@rowClass="workflows-index__row"><:head>- <th class="d-table__header-cell">{{i18n- "discourse_workflows.creator"- }}</th><th class="d-table__header-cell">{{i18n"discourse_workflows.workflow_name"}}</th><th class="d-table__header-cell">{{i18n- "discourse_workflows.last_editor"+ "discourse_workflows.creator"}}</th><th class="d-table__header-cell">{{i18n"discourse_workflows.last_update"@@ -329,19 +326,6 @@ export default class WorkflowsIndex extends Component {}}</th></:head><:row as |workflow|>- <td class="d-table__cell --detail workflows-index__creator">- <div class="d-table__mobile-label">- {{i18n "discourse_workflows.creator"}}- </div>- {{#if workflow.createdBy}}- <DUserLink- class="workflows-index__creator-link"- @user={{workflow.createdBy}}- >- {{dAvatar workflow.createdBy imageSize="tiny"}}- </DUserLink>- {{/if}}- </td><td class="d-table__cell --overview workflows-index__name"><LinkToclass="d-table__overview-link"@@ -379,17 +363,17 @@ export default class WorkflowsIndex extends Component {</div>{{/if}}</td>- <td class="d-table__cell --detail workflows-index__last-editor">+ <td class="d-table__cell --detail workflows-index__creator"><div class="d-table__mobile-label">- {{i18n "discourse_workflows.last_editor"}}+ {{i18n "discourse_workflows.creator"}}</div>- {{#if workflow.updatedBy}}+ {{#if workflow.createdBy}}<DUserLink- class="workflows-index__last-editor-link"- @user={{workflow.updatedBy}}+ class="workflows-index__creator-link"+ @user={{workflow.createdBy}}>- {{dAvatar workflow.updatedBy imageSize="tiny"}}- <span>{{workflow.updatedBy.username}}</span>+ {{dAvatar workflow.createdBy imageSize="tiny"}}+ <span>{{workflow.createdBy.username}}</span></DUserLink>{{/if}}</td>diff --git a/plugins/discourse-workflows/assets/stylesheets/common/version/versions-manager.scss b/plugins/discourse-workflows/assets/stylesheets/common/version/versions-manager.scssindex 05dd0fa19f4..a6d5ea9696e 100644--- a/plugins/discourse-workflows/assets/stylesheets/common/version/versions-manager.scss+++ b/plugins/discourse-workflows/assets/stylesheets/common/version/versions-manager.scss@@ -2,7 +2,7 @@&__author {display: inline-flex;align-items: center;- gap: var(--space-1);+ gap: var(--space-2);}&__badge {diff --git a/plugins/discourse-workflows/assets/stylesheets/common/workflows-index.scss b/plugins/discourse-workflows/assets/stylesheets/common/workflows-index.scssindex 060b74803da..e6ef23825f7 100644--- a/plugins/discourse-workflows/assets/stylesheets/common/workflows-index.scss+++ b/plugins/discourse-workflows/assets/stylesheets/common/workflows-index.scss@@ -35,11 +35,11 @@min-width: 0;}- &__last-editor-link {+ &__creator-link {display: flex;width: fit-content;align-items: center;- gap: var(--space-1);+ gap: var(--space-2);}&__warning {diff --git a/plugins/discourse-workflows/config/locales/client.en.yml b/plugins/discourse-workflows/config/locales/client.en.ymlindex 5bed7c395f6..45a88117b5b 100644--- a/plugins/discourse-workflows/config/locales/client.en.yml+++ b/plugins/discourse-workflows/config/locales/client.en.yml@@ -128,7 +128,6 @@ en:keep_editing: "Keep editing"workflow_name: "Workflow name"creator: "Creator"- last_editor: "Last editor"last_update: "Last update"last_run: "Last run"status: "Status"diff --git a/plugins/discourse-workflows/spec/system/page_objects/pages/workflows.rb b/plugins/discourse-workflows/spec/system/page_objects/pages/workflows.rbindex 48bd26c9e93..43f70e270d1 100644--- a/plugins/discourse-workflows/spec/system/page_objects/pages/workflows.rb+++ b/plugins/discourse-workflows/spec/system/page_objects/pages/workflows.rb@@ -77,13 +77,6 @@ module PageObjects).clickselfend-- def click_last_editor(workflow)- find(- ".workflows-index__row[data-item-id='#{workflow.id}'] .workflows-index__last-editor-link",- ).click- self- endendendenddiff --git a/plugins/discourse-workflows/spec/system/workflows_spec.rb b/plugins/discourse-workflows/spec/system/workflows_spec.rbindex 34d7da79edb..1eb21b7dc66 100644--- a/plugins/discourse-workflows/spec/system/workflows_spec.rb+++ b/plugins/discourse-workflows/spec/system/workflows_spec.rb@@ -181,21 +181,15 @@ RSpec.describe "Discourse Workflows" doexpect(workflows_page).to have_no_failed_workflow(recovered_workflow)end- it "opens a user card from the creator and last editor avatars" do+ it "opens a user card from the creator" docreator = Fabricate(:user)- editor = Fabricate(:user)workflow = Fabricate(:discourse_workflows_workflow, created_by: creator)- workflow.update!(updated_by: editor)user_card = PageObjects::Components::UserCard.newworkflows_page.visit_indexworkflows_page.click_creator(workflow)expect(user_card).to be_showing_user(creator.username)-- page.send_keys(:escape)- workflows_page.click_last_editor(workflow)- expect(user_card).to be_showing_user(editor.username)endcontext "with workflow tags" do