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

Catalog: Display badges for Angular plugins and disable install if Angular is disabled #69084

Merged
merged 23 commits into from
Jun 28, 2023

Conversation

xnyo
Copy link
Member

@xnyo xnyo commented May 25, 2023

What is this feature?

When Angular support is disabled in the instance:

It changes some UI elements in the plugins catalog only for Angular plugins:

Plugins catalog page

immagine

  • Adds an "Angular" badge in the plugin card

Plugin details page

immagine

  • Disables the "Install" button. This will also be done for the "Install via grafana.com" button for HG
  • Displays an alert with more info and a link to Angular deprecation docs (text to be changed)

Why do we need this feature?

Improves Angular deprecation discoverability for operators when browsing the plugins catalog.

Who is this feature for?

Grafana operators

Which issue(s) does this PR fix?:

Related to #68974

Special notes for your reviewer:

Requires the following PRs to be merged in GCOM, so isAngular is returned by the API:

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 javascript Pull requests that update Javascript code no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels May 25, 2023
@xnyo xnyo added this to the 10.1.x milestone May 25, 2023
@xnyo xnyo self-assigned this May 25, 2023
@xnyo xnyo changed the title WIP: Angular deprecation: Plugin catalog changes WIP: Catalog: Display badges for Angular plugins and disable install if Angular is disabled May 26, 2023
@xnyo xnyo added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes and removed no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Jun 9, 2023
@xnyo xnyo changed the title WIP: Catalog: Display badges for Angular plugins and disable install if Angular is disabled Catalog: Display badges for Angular plugins and disable install if Angular is disabled Jun 12, 2023
@xnyo xnyo marked this pull request as ready for review June 12, 2023 15:10
@xnyo xnyo requested a review from a team as a code owner June 12, 2023 15:10
@xnyo xnyo removed the request for review from a team June 12, 2023 15:10
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!

target="_blank"
rel="noreferrer"
>
Read more about Angular support deprecation.
Copy link
Contributor

Choose a reason for hiding this comment

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

@shih-chris Could you advise what we would need to add here in order to start tracking whether a user from an organization has clicked this link?

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.

Great work on this @xnyo

@xnyo xnyo added add to changelog and removed no-changelog Skip including change in changelog/release notes labels Jun 28, 2023
@xnyo xnyo merged commit dde4a03 into main Jun 28, 2023
17 checks passed
@xnyo xnyo deleted the giuseppe/angular-deprecation/catalog-angular-badge branch June 28, 2023 07:58
harisrozajac pushed a commit that referenced this pull request Jun 29, 2023
…gular is disabled (#69084)

* 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

* Moved deprecation message to a separate function

* Removed unused Props in PluginAngularBadge
harisrozajac pushed a commit that referenced this pull request Jun 30, 2023
…gular is disabled (#69084)

* 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

* Moved deprecation message to a separate function

* Removed unused Props in PluginAngularBadge
@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.

None yet

5 participants