This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 375
fix: catch dotnet errors during creation and offer download link #7062
Merged
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fbc3802
catch dotnet error
benbrown 0c52f90
Handle error for missing dotnet 3.1 during creation
benbrown 5e124e9
remove unnecessary wrapper funct
benbrown c6769a1
Merge branch 'main' into benbrown/secretsinit
cwhitten edc87ba
Merge branch 'main' into benbrown/secretsinit
cwhitten 03852bb
Merge branch 'main' into benbrown/secretsinit
cwhitten c199d53
Merge branch 'main' into benbrown/secretsinit
benbrown 8f59c0c
update to syntax of component, small cleanup items from PR
benbrown dc94305
remove old NodeModal (replaced by InstallDepMOdal)
benbrown b84245d
Merge branch 'main' into benbrown/secretsinit
GeoffCoxMSFT 55bd3d4
Merge branch 'main' into benbrown/secretsinit
cwhitten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
Composer/packages/client/src/components/InstallDepModal.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /* eslint-disable react/no-danger */ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| /** @jsx jsx */ | ||
| import { DialogTypes, DialogWrapper } from '@bfc/ui-shared/lib/components/DialogWrapper'; | ||
| import { jsx } from '@emotion/core'; | ||
| import formatMessage from 'format-message'; | ||
| import { DefaultButton, PrimaryButton } from 'office-ui-fabric-react/lib/components/Button'; | ||
| import { DialogFooter } from 'office-ui-fabric-react/lib/components/Dialog'; | ||
| import React from 'react'; | ||
| import { Text } from 'office-ui-fabric-react/lib/Text'; | ||
| import { Link } from 'office-ui-fabric-react/lib/Link'; | ||
| import { mergeStyles } from 'office-ui-fabric-react/lib/Styling'; | ||
|
|
||
| const dialogFooterClass = mergeStyles({ | ||
|
benbrown marked this conversation as resolved.
Outdated
|
||
| marginTop: '25px', | ||
| }); | ||
|
|
||
| type InstallDepModalProps = { | ||
|
benbrown marked this conversation as resolved.
|
||
| setIsOpen: Function; | ||
| isOpen: boolean; | ||
| title: string; | ||
| text: string; | ||
| link: string; | ||
| linkText: string; | ||
| learnMore?: string; | ||
| learnMoreText?: string; | ||
| }; | ||
|
|
||
| export const InstallDepModal: React.FC<InstallDepModalProps> = (props) => { | ||
| return ( | ||
| <DialogWrapper | ||
| dialogType={DialogTypes.DesignFlow} | ||
| isOpen={props.isOpen} | ||
| title={props.title} | ||
| onDismiss={() => { | ||
| props.setIsOpen(false); | ||
| }} | ||
| > | ||
| <Text> | ||
| <span>{props.text}</span> | ||
| {props.learnMore && ( | ||
| <span> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this and nbsp and use margin instead
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. We've talked about this before several times. An NBSP is the appropriate way to add a space between 2 inline elements. Margin is overkill and inapprorpriate for inline elements. |
||
| | ||
| <Link href={props.learnMore} target="_blank"> | ||
| {props.learnMoreText} | ||
| </Link> | ||
| </span> | ||
| )} | ||
| </Text> | ||
| <DialogFooter className={dialogFooterClass}> | ||
| <PrimaryButton data-testid="InstallButton" href={props.link} target="_blank" text={props.linkText} /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This testId seems too generic. installDotNet? In addition, if its not required we can remove it |
||
| <DefaultButton | ||
| text={formatMessage('Cancel')} | ||
| onClick={() => { | ||
| props.setIsOpen(false); | ||
| }} | ||
| /> | ||
| </DialogFooter> | ||
| </DialogWrapper> | ||
| ); | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.