Skip to content

Fix unkown platform images#868

Merged
joanagmaia merged 2 commits intomainfrom
bug/unkown-platform-images
May 16, 2023
Merged

Fix unkown platform images#868
joanagmaia merged 2 commits intomainfrom
bug/unkown-platform-images

Conversation

@joanagmaia
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia commented May 16, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at 8bbfe51

This pull request adds support for custom platforms that are not part of the predefined list of integrations. It updates several components that display platform icons, names, or tooltips to handle the case where the platform config object or image is not found. It uses a generic user icon and the platform name as fallback values for such platforms. It also simplifies some conditional rendering logic and avoids hard-coding the 'other' platform name. The affected components are platform-svg-icon.vue, platform.vue, member-identities.vue, member-merge-suggestions-details.vue, widget-activities-platform-content.vue, widget-activities-type.vue, widget-members-table.vue, community-help-center-table.vue, and platform-list.vue.

🤖 Generated by Copilot at 8bbfe51

We added some code to support
Custom platforms of any sort
We show a tooltip
And a user icon bit
If the config object is naught

Why

How

🤖 Generated by Copilot at 8bbfe51

  • Add support for custom platforms that are not part of the predefined list of integrations, such as Medium or Stack Overflow. (link, link, link, link, link, link, link, link, link, link)
  • Use the platform name as a fallback value for the tooltip content, the event tracking channel, and the chart label if the config object for the platform is not found. (link, link, link)
  • Show a tooltip and a generic user icon for custom platforms that do not have a config object or an image in the member-identities.vue, member-merge-suggestions-details.vue, platform-svg-icon.vue, and platform.vue components. (link, link, link, link)
  • Include custom platforms in the platforms array that is used to render the platform tabs and charts in the widget-activities-platform-content.vue component. (link)
  • Simplify the conditional rendering of the platform image in the widget-activities-type.vue and community-help-center-table.vue components by removing the plat !== 'other' condition and using the imageProperties computed property instead. (link, link)
  • Use a different class for custom platforms that do not have a predefined class in the buttons.scss and platform.vue components. (link, link)
  • Add a show-tooltip prop to the app-platform and platform.vue components to enable the tooltip feature for the platform icons in different components that use them. (link, link)
  • Add a platformConfig computed property to the platform-svg-icon.vue component to reuse the computed property in the template and the script sections of the component. (link)
  • Prevent rendering a link for custom platforms that do not have a config object or a profile URL in the platform-svg-icon.vue component. (link)
  • Avoid repeating the same component for each platform and use a dynamic prop instead in the community-help-center-table.vue component. (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 requested a review from gaspergrom May 16, 2023 08:12
@joanagmaia joanagmaia self-assigned this May 16, 2023
@joanagmaia joanagmaia added the Bug Created by Linear-GitHub Sync label May 16, 2023
@joanagmaia joanagmaia merged commit 5587c52 into main May 16, 2023
@joanagmaia joanagmaia deleted the bug/unkown-platform-images branch May 16, 2023 10:24
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