Connect My Computer: Use a single document #31699
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to #27881
Initially, we added two types of documents:
doc.connect_my_computer_setup
anddoc.connect_my_computer_status
. It turned out that this is not the best idea: we have to replace one document type with another in a few places and we already have a bug around it. Also, we don't really need two types of documents - we never display both of them at the same time.Still, the distinction between setup and status is kept on the component level. However, to decide which one should be displayed, we can just check whether an agent has been configured (there is a config file on a disk).
I haven't renamed filenames (
DocumentConnectMyComputerSetup.tsx
->Setup.tsx
) because we have a few PRs opened that modify them and I don't want to cause unnecessary merge conflicts.