Skip to content

refactor(devtools): disable unsupported features #60585

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

Closed
wants to merge 2 commits into from

Conversation

hawkgs
Copy link
Member

@hawkgs hawkgs commented Mar 27, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Feature

What is the new behavior?

Prepare the app for Wiz & ACX and handle unsupported features by disabling their respective UI.

Does this PR introduce a breaking change?

  • Yes
  • No

@ngbot ngbot bot added this to the Backlog milestone Mar 27, 2025
@hawkgs
Copy link
Member Author

hawkgs commented Mar 27, 2025

@dgp1130, @AleksanderBodurri , could you take a quick look at the PR and verify whether I am in the right direction and the change is in line with the current BE design? First time updating that part of the app. Thanks!

TBD: The feature has to be tested.

@hawkgs hawkgs force-pushed the devtools/unsupported-features branch from 32c78f3 to 4be0224 Compare March 27, 2025 15:43
@hawkgs hawkgs force-pushed the devtools/unsupported-features branch 4 times, most recently from 23a7a37 to 2b0b8bc Compare April 8, 2025 13:19
@hawkgs hawkgs marked this pull request as ready for review April 8, 2025 13:20
@hawkgs
Copy link
Member Author

hawkgs commented Apr 8, 2025

@dgp1130, the PR is ready. All new changes are in the fixup commit. I had to do some code restructuring – mainly extracting getRoots in a separate file in order to avoid circular dependency between component-tree.ts and ng-debug-api.ts. Added some tests and clarification comments.

Copy link
Contributor

@dgp1130 dgp1130 left a comment

Choose a reason for hiding this comment

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

Left some minor suggestions, but overall I think this looks great! Thanks for pushing on this.

// Temporary solution. Convert to an eligible API when available.
// https://github.com/angular/angular/pull/60585#discussion_r2017047132
// If there is a Wiz application, make Profiler API unavailable.
return !getRoots()
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: How does DevTools behave if there are multiple roots and one is Angular and another is not? Could we enable these tabs as long as any one app is Angular? Would the functionality in those tabs even work?

Copy link
Member Author

@hawkgs hawkgs Apr 10, 2025

Choose a reason for hiding this comment

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

I was considering that for some time as well but since we don't formally support multiple applications yet and I am not entirely sure how the app will react, I decided to play it on the safe side and disable the features altogether. I can do a more thorough check sometime next week.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed it's untreaded ground, I'm mainly curious to how well DevTools reacts to multiple roots from the same application. I feel like that should work, but I haven't tried it.

I'm ok to be more restrictive here and we can open it up when we get to proper multi-app support.

hawkgs added 2 commits April 10, 2025 12:12
Prepare the app for Wiz & ACX and handle unsupported features by disabling their respective UI.
@hawkgs hawkgs force-pushed the devtools/unsupported-features branch from 2b0b8bc to 92e8a9d Compare April 10, 2025 09:12
Copy link
Member

@AleksanderBodurri AleksanderBodurri left a comment

Choose a reason for hiding this comment

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

Thanks for this @hawkgs 🙏

@dgp1130 dgp1130 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Apr 21, 2025
@dgp1130
Copy link
Contributor

dgp1130 commented Apr 22, 2025

Switching to target: major as there seems to be a merge conflict on 19.2.x.

@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit cebb9d2.

The changes were merged into the following branches: main

@hawkgs hawkgs deleted the devtools/unsupported-features branch April 23, 2025 07:55
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: devtools target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants