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

Give Setup webview a single section #3441

Merged
merged 1 commit into from
Mar 12, 2023

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented Mar 10, 2023

2/2 main <- #3440 <- this

Related to #3434.

This PR uses the shared component created in #3440 to give the Setup webview a single section.

Demo

Screen.Recording.2023-03-10.at.3.26.06.pm.mov

Note: This looks odd now but there will be a section above for the walkthrough and one below for Studio. I will also condense the EmptyStates to EmptySections (isFullScreen=false)

@mattseddon mattseddon added the product PR that affects product label Mar 10, 2023
@mattseddon mattseddon self-assigned this Mar 10, 2023
@mattseddon mattseddon changed the base branch from main to create-shared-component March 10, 2023 04:43
needsGitInitialized={needsGitInitialized}
needsGitCommit={needsGitCommit}
projectInitialized={projectInitialized}
pythonBinPath={pythonBinPath}
Copy link
Member Author

Choose a reason for hiding this comment

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

[Q] Should I just match the plots and experiments <App/>s and bring redux in here now?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's worth it yet for the few levels that we have and how simple the components are.

> = ({
children,
menuItems,
menuItems = [],
Copy link
Member Author

Choose a reason for hiding this comment

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

[F] We don't need this right now but I thought maybe we could use it for a carousel-like action to move between the screens.

Copy link
Member Author

Choose a reason for hiding this comment

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

<- -> in the icon menu

@mattseddon mattseddon marked this pull request as ready for review March 10, 2023 04:49
}

if (!hasData) {
return <NoData />
Copy link

Choose a reason for hiding this comment

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

Avoid too many return statements within this function.

}

if (hasData === undefined) {
return <EmptyState>Loading Project...</EmptyState>
Copy link

Choose a reason for hiding this comment

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

Avoid too many return statements within this function.

return <NoData />
}

return <EmptyState>{"You're all setup"}</EmptyState>
Copy link

Choose a reason for hiding this comment

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

Avoid too many return statements within this function.

pythonBinPath: string | undefined
}

export const SetupExperiments: React.FC<SetupExperimentsProps> = ({
Copy link

Choose a reason for hiding this comment

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

Function SetupExperiments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.

return <CliIncompatible checkCompatibility={checkCompatibility} />
}

if (cliCompatible === undefined) {
Copy link

Choose a reason for hiding this comment

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

Similar blocks of code found in 2 locations. Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Mar 10, 2023

Code Climate has analyzed commit fc5aa0e and detected 5 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 4
Duplication 1

The test coverage on the diff in this pull request is 95.1% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.7% (0.0% change).

View more on Code Climate.

@mattseddon mattseddon requested a review from shcheklein March 10, 2023 04:52
needsGitInitialized={needsGitInitialized}
needsGitCommit={needsGitCommit}
projectInitialized={projectInitialized}
pythonBinPath={pythonBinPath}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's worth it yet for the few levels that we have and how simple the components are.

Copy link
Contributor

@julieg18 julieg18 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!

Note: This looks odd now but there will be a section above for the walkthrough and one below for Studio. I will also condense the EmptyStates to EmptySections (isFullScreen=false)

Why not we hold off adding the collapsible section until there is more than one?

@mattseddon
Copy link
Member Author

Great work!

Note: This looks odd now but there will be a section above for the walkthrough and one below for Studio. I will also condense the EmptyStates to EmptySections (isFullScreen=false)

Why not we hold off adding the collapsible section until there is more than one?

That's the next PR. I was going to hold off merging this until it is ready.

@mattseddon mattseddon merged commit a376e19 into create-shared-component Mar 12, 2023
@mattseddon mattseddon deleted the give-setup-section branch March 12, 2023 21:03
mattseddon added a commit that referenced this pull request Mar 12, 2023
@mattseddon
Copy link
Member Author

Merged this because I thought it was a different branch. Will replace the PR 💢 😠!

@mattseddon mattseddon restored the give-setup-section branch March 12, 2023 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants