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

Connections console: Add Angular badge for Angular plugins #70789

Merged
merged 35 commits into from
Jul 11, 2023

Conversation

xnyo
Copy link
Member

@xnyo xnyo commented Jun 28, 2023

What is this feature?

Adds "Angular" badge next to Angular plugins to the on-prem connections console.
image

Why do we need this feature?

Angular deprecation

Who is this feature for?

Grafana users who rely on Angular datasources

Which issue(s) does this PR fix?:

Related to #68974

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@xnyo xnyo added area/plugins area/frontend add to changelog javascript Pull requests that update Javascript code no-backport Skip backport of PR labels Jun 28, 2023
@xnyo xnyo self-assigned this Jun 28, 2023
@xnyo xnyo added this to the 10.1.x milestone Jun 28, 2023
Copy link
Member

@academo academo left a comment

Choose a reason for hiding this comment

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

Left a comment about the condition. Not only a matter of preference but safer code. see https://codesandbox.io/s/autumn-sunset-dp7vdj?file=/src/App.js

@xnyo xnyo requested a review from academo July 5, 2023 11:08
Copy link
Contributor

@sympatheticmoose sympatheticmoose left a comment

Choose a reason for hiding this comment

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

LGTM

@xnyo xnyo changed the title Connections console: Show Angular badge Connections console (on-prem): Add Angular badge for Angular plugins Jul 7, 2023
@torkelo
Copy link
Member

torkelo commented Jul 7, 2023

The design of these cards (and placement of the badges) look a bit unpolished. Say compared to plugin list:

Screenshot 2023-07-07 at 14 20 24

@xnyo xnyo changed the title Connections console (on-prem): Add Angular badge for Angular plugins Connections console: Add Angular badge for Angular plugins Jul 7, 2023
@xnyo
Copy link
Member Author

xnyo commented Jul 7, 2023

The design of these cards (and placement of the badges) look a bit unpolished. Say compared to plugin list:

@torkelo Yeah it does look a bit off. I have only added the "Angular" badge in this PR. I have tried moving the new badge below the logo, added a bit more padding and made the logo bigger to make it more similar to the plugins list:
image

It still look a bit empty compared to the plugins list, but I think it's better than what we have now. WDYT? Shall I push this version instead?

@torkelo
Copy link
Member

torkelo commented Jul 7, 2023

I pushed a branch here (https://github.com/grafana/grafana/compare/connections-card-design) with some changes to how to correctly extend/modify Card component to add things like badges, I also aligned the styling with the data source cards (used in new data source page), cards that looks so much better.

Screenshot 2023-07-07 at 15 03 15

I think with description and the [Core] Badge (or Installed) to also mark which data sources are bundled plugins (or installed) would also be useful. And this list really needs some default sorting to show show the popular ones first (or popular in a separate group).

With description (did not add the [Core] or [Installed] badges, as it requires more changes to the component props to pass in that info
Screenshot 2023-07-07 at 15 04 27

@torkelo
Copy link
Member

torkelo commented Jul 7, 2023

@xnyo
Copy link
Member Author

xnyo commented Jul 7, 2023

Thank you, I will merge it with this branch 🙌

@xnyo
Copy link
Member Author

xnyo commented Jul 7, 2023

I have merged those changes into this PR's code. I decided to keep the description hidden for now, since it messes up the spacing if there's too much text, and the purpose of this PR was just to add the Angular badge. e.g.:

image

The other changes can be done in another PR if that's okay, I sent the feedback to connections working group, thanks :)

@torkelo
Copy link
Member

torkelo commented Jul 7, 2023

@xnyo yea, let's skip description for now. Needs some fine tuning to skip / cut long descriptions

@torkelo
Copy link
Member

torkelo commented Jul 7, 2023

And the card grid template needs update, it positions the description strangly

Copy link
Contributor

@mckn mckn left a comment

Choose a reason for hiding this comment

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

LGTM! Great suggestions by @torkelo

@xnyo xnyo merged commit 9945c02 into main Jul 11, 2023
@xnyo xnyo deleted the giuseppe/angular-deprecation/connections-angular-badge branch July 11, 2023 08:12
@mikkancso
Copy link
Contributor

About showing the description on the cards:
We already have a plan to improve how these cards look in the catalog. Please feel free to submit any feedback in this thread.
We are planning to work on this in Q3, so please don't do ad-hoc improvements without consulting us, because it will only make our job more difficult.

polibb pushed a commit that referenced this pull request Jul 14, 2023
* Angular deprecation: Add Angular badge in plugin catalog page

* Angular deprecation: Add alert in plugin details page

* Angular deprecation: Disable install button if for Angular plugins

* removed extra console.log

* Add tests for Angular badge

* Add tests for PluginDetailsAngularDeprecation

* Add tests for InstallControlsButton

* Add tests for ExternallyManagedButton

* Table tests

* Catalog: Update angular deprecation message

* PR review feedback

* Update tests

* Update copy for angular tooltip and alert

* Update tests

* Fix test warnings

* Fix angularDetected not being set for remote catalog plugins

* Dynamic alert text based on grafana config

* Connections: Add Angular badge to Angular plugins

* Add test for connections console angular badge

* Fix tests

* Fix tests

* Moved tests

* PR review: Use ternary operator instead of &&

* Fixes to how to use Card component

* comment out desc

* Do not use deprecated theme.v1 and theme.typography.size

* pr review feedback

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend area/plugins javascript Pull requests that update Javascript code no-backport Skip backport of PR
Projects
Development

Successfully merging this pull request may close these issues.

7 participants