Feroze Mohideen 3 лет назад
Родитель
Сommit
cb13d51fc1

+ 5 - 8
dashboard/src/components/porter/ExpandableSection.tsx

@@ -25,13 +25,10 @@ const ExpandableSection: React.FC<Props> = ({
   collapseText,
   collapseText,
   maxHeight,
   maxHeight,
 }) => {
 }) => {
-  const [isExpanded, setIsExpanded] = useState(false);
-  useEffect(() => {
-    setIsExpanded(isInitiallyExpanded);
-  }, [isInitiallyExpanded]);
+  const [isExpanded, setIsExpanded] = useState(isInitiallyExpanded ?? false);
 
 
   return (
   return (
-    <StyledExpandableSection 
+    <StyledExpandableSection
       isExpanded={isExpanded}
       isExpanded={isExpanded}
       background={background}
       background={background}
       noWrapper={noWrapper}
       noWrapper={noWrapper}
@@ -44,7 +41,7 @@ const ExpandableSection: React.FC<Props> = ({
           </ExpandButton>
           </ExpandButton>
         </Container>
         </Container>
       ) : (
       ) : (
-        <HeaderRow 
+        <HeaderRow
           isExpanded={isExpanded}
           isExpanded={isExpanded}
           onClick={() => setIsExpanded(!isExpanded)}
           onClick={() => setIsExpanded(!isExpanded)}
           color={color}
           color={color}
@@ -71,7 +68,7 @@ const ExpandButton = styled.div`
   font-size: 13px;
   font-size: 13px;
 `;
 `;
 
 
-const HeaderRow = styled.div<{ 
+const HeaderRow = styled.div<{
   isExpanded: boolean;
   isExpanded: boolean;
   color?: string;
   color?: string;
 }>`
 }>`
@@ -97,7 +94,7 @@ const HeaderRow = styled.div<{
   }
   }
 `;
 `;
 
 
-const StyledExpandableSection = styled.div<{ 
+const StyledExpandableSection = styled.div<{
   isExpanded: boolean;
   isExpanded: boolean;
   background?: string;
   background?: string;
   noWrapper?: boolean;
   noWrapper?: boolean;

+ 5 - 2
dashboard/src/main/home/app-dashboard/new-app-flow/GithubActionModal.tsx

@@ -23,7 +23,7 @@ const GithubActionModal: React.FC<GithubActionModalProps> = ({
             </Text>
             </Text>
             <Spacer height="15px" />
             <Spacer height="15px" />
             <Text color="helper">
             <Text color="helper">
-                In order to automatically update your services every time new code is pushed to your GitHub branch, you will need the following file in your Github repository:
+                In order to automatically update your services every time new code is pushed to your GitHub branch, the following file must exist in your Github repository:
             </Text>
             </Text>
             <Spacer y={1} />
             <Spacer y={1} />
             <ExpandableSection
             <ExpandableSection
@@ -33,6 +33,7 @@ const GithubActionModal: React.FC<GithubActionModalProps> = ({
                 Header={
                 Header={
                     <ModalHeader>./github/workflows/porter_deploy.yml</ModalHeader>
                     <ModalHeader>./github/workflows/porter_deploy.yml</ModalHeader>
                 }
                 }
+                isInitiallyExpanded={true}
                 ExpandedSection={
                 ExpandedSection={
                     <>
                     <>
                         <Spacer height="15px" />
                         <Spacer height="15px" />
@@ -52,7 +53,7 @@ const GithubActionModal: React.FC<GithubActionModalProps> = ({
             />
             />
             <Spacer y={1} />
             <Spacer y={1} />
             <Text color="helper">
             <Text color="helper">
-                Porter can open a PR for you to approve and merge this file into your repository, or you can add it yourself.
+                Porter can open a PR for you to approve and merge this file into your repository, or you can add it yourself. If you allow Porter to open a PR, you will be redirected to the PR in a new tab after hitting Complete below.
             </Text>
             </Text>
             <Spacer y={1} />
             <Spacer y={1} />
             <Select
             <Select
@@ -61,9 +62,11 @@ const GithubActionModal: React.FC<GithubActionModalProps> = ({
                     { label: "I will copy the file into my repository myself", value: "I will copy the file into my repository myself" },
                     { label: "I will copy the file into my repository myself", value: "I will copy the file into my repository myself" },
                 ]}
                 ]}
                 onChange={(x: any) => console.log(x)}
                 onChange={(x: any) => console.log(x)}
+                width="100%"
             />
             />
             <Button
             <Button
                 onClick={closeModal}
                 onClick={closeModal}
+                width={"100%"}
             >
             >
                 Complete
                 Complete
             </Button>
             </Button>