Skip to content

Fix activity types display in dashboard#847

Merged
joanagmaia merged 1 commit intomainfrom
bug/top-activities-type-widget
May 10, 2023
Merged

Fix activity types display in dashboard#847
joanagmaia merged 1 commit intomainfrom
bug/top-activities-type-widget

Conversation

@joanagmaia
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia commented May 10, 2023

Changes proposed ✍️

  • Remove translation to render activity types, add a fallback instead
  • Use merge method from lodash to merge custom and default activities, so if the same platforms exist on both, the activity types are merged instead of replaced by custom ones as it was before

What

🤖 Generated by Copilot at 8301a72

The pull request improves the dashboard UI by enhancing the display of activity types from different sources and avoiding errors when the tenant name is missing. It uses lodash.merge and optional chaining in dashboard-activity-types.vue and dashboard-page.vue.

🤖 Generated by Copilot at 8301a72

To avoid errors from currentTenant
The code added a chaining element
It also merged types
From different pipes
And handled unknowns with a comment

Why

How

🤖 Generated by Copilot at 8301a72

  • Handle unknown or unsupported activity types in dashboard by displaying a default text (link)
  • Import and use merge function from lodash library to combine default and custom activity types without overwriting or losing nested properties (link, link)
  • Add optional chaining operator to currentTenant.name expression in dashboard-page.vue to prevent errors if currentTenant is null or undefined (link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@joanagmaia joanagmaia added the Bug Created by Linear-GitHub Sync label May 10, 2023
@joanagmaia joanagmaia requested a review from gaspergrom May 10, 2023 13:25
@joanagmaia joanagmaia self-assigned this May 10, 2023
@joanagmaia joanagmaia merged commit 0a2b5aa into main May 10, 2023
@joanagmaia joanagmaia deleted the bug/top-activities-type-widget branch May 10, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants