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

Enforce types #154

Merged

Conversation

D-B-Hawk
Copy link
Contributor

resolves #145, #146, #147

D-B-Hawk added 26 commits April 5, 2023 15:42
@fharper
Copy link
Contributor

fharper commented Apr 11, 2023

Thanks for this PR @D-B-Hawk, someone from the team will review it. In the meantime, I would love to send you some kubefirst swag: if you want, fill the form at http://kubefirst.io/swag please :)

Copy link
Contributor

@CristhianF7 CristhianF7 left a comment

Choose a reason for hiding this comment

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

Hey @D-B-Hawk, Thanks for contributing to the Console Project for Kubefirst 💯

This is great 🚀 . I left some suggestions here's the summary:

  1. Components should not have logic they should only handle UI
  2. Containers folder is the place where we handle all the business logic and connect things
  3. Storybook shouldn't handle logic otherwise we will have a new place to refactor when we do any change to the component.
  4. We are using lowerCase for the first letter of all file names as well as folder names
  5. Styled components should live in a separate file.
  6. We will revisit the form flow together so please point this PR to this branch feat_derrick_enforce_types.

Sorry for the long text here. Great work again

.yarn/install-state.gz Outdated Show resolved Hide resolved
components/AwsReadinessForm/AwsReadinessForm.tsx Outdated Show resolved Hide resolved
components/AwsReadinessForm/AwsReadinessForm.tsx Outdated Show resolved Hide resolved
components/service/index.tsx Outdated Show resolved Hide resolved
components/tooltip/tooltip.stories.tsx Outdated Show resolved Hide resolved
pages/installations/aws-github.tsx Outdated Show resolved Hide resolved
redux/api/index.ts Show resolved Hide resolved
redux/slices/availableSites.ts Outdated Show resolved Hide resolved
redux/slices/githubUser.slice.ts Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
@CristhianF7 CristhianF7 changed the base branch from main to feat_derrick_enforce_types April 12, 2023 23:31
…herit className, id for styling. create wrapper to place link as expected with styled-components.
… folders. replace color strings with names constants. use named exports for more readable and constant naming convention of differing style themes.
…light change to handlers and types for ease of use.
@D-B-Hawk D-B-Hawk requested a review from CristhianF7 April 17, 2023 16:12
Copy link
Contributor

@CristhianF7 CristhianF7 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 the Updates @D-B-Hawk.

I'll push some follow ups and restore the current stepper implementation since I think I found a solution for the useForm types

@CristhianF7 CristhianF7 merged commit 24d4714 into konstructio:feat_derrick_enforce_types Apr 19, 2023
CristhianF7 added a commit that referenced this pull request Apr 22, 2023
* Enforce types (#154)

* chore: move constants to central location

* chore: place overrides in declaration.d.ts file for accurate ts autocomplete/definitions

* chore: place utils in central location. add GithubUser,GithubUserPlan,GithubUserOrganization types.

* refactor: update readiness slice to a more descriptive variable description of the state is represents.

* chore: remove selectors. state selection exposed by useAppSelector.

* refactor: githubApi axed. githubUser slice state houses pertinent github user info.

* chore: getUser, getUserOrganization thunks made with tests to verify behavior.

* chore: enforce types

* refactor: update installation slice

* chore: update some hooks

* refactor: make controlled fields pass generic type to control for proper type inference for form values.

* refactor: a button is a button

* chore: more accurate description of what component actually is

* chore: pull InstallationButtons into separate comp

* chore: pull InstallationCard into its own component

* chore: pull InstallationInfoCard into separate comp

* chore: create InstallationStepContainer

* chore: layout comps, odds and ends. no inherent comp styles to throw off layout

* refactor: update LocalSetupForm and LocalFormFlow

* refactor: update aws github forms and flow.

* refactor: update aws gitlab forms and install flow

* chore: add civo github readiness, setup forms and install flow

* chore: add civo gitlab readiness, setup forms and install flow.

* chore: remove dashboard implementation. layout change simplification. other improvements

* loosely hooked up installations for existing options. installations selected and routed from installations/index

* fix: have forms validate before advancing step.

* chore: create NextLink comp because Link provided by next does not inherit className, id for styling. create wrapper to place link as expected with styled-components.

* fix: strip and import styles from .styled files. lowercase naming for folders. replace color strings with names constants. use named exports for more readable and constant naming convention of differing style themes.

* fix: pin node@16.15.1. nuke node_modules  and re-install

* fix: rename slices based off of pr review note. renamed getters and pieces of state accordingly.

* fix: export generated hooks. add proper arg types to api mutations. slight change to handlers and types for ease of use.

* fix: drop form/form flow stories. seperate/import styles. move logic from page to FormFlow component.

* coerce boolean|undefined value to string for accepted input value.

* adds updates to civo github

---------

Co-authored-by: Jared Edwards <jared@kubefirst.com>

* chore: create Tag component

* chore: add Card component

* chore: add GitProviderButton component

* chore: add CloudProviderCard component

* fix: extend Typography instead of div

* chore: add beta tag option

* chore: update InstallationType. move GitProvider enum back to where it was? add optional gitProvider to installationSlice as well as make installType optional.

* fix: update/simplify useInstallation. keeping it around because future complexity might change/other comp reliance.

* chore: drop InstallationInfoCard. no longer used

* fix: update comps reliant on useInstallation

* chore: update installations page to new look. mockup of selection since the provider selection/flow has changed.

* chore: add mvp terminal showing socket output

* Installation selection cleanup (#159)

* move InstallationSelection into containers

* chore: add useWebsocket hook

* refactor: update TerminalLogs to take optional websocket and write formatted stream data to xterminal

* fix: add small amount of flexibility with CloudProviderCard width so styles are more responsive between shift below large breakpoint.

* chore: update installation pages to route through single point and render component based on gitProvider and installType.

---------

Co-authored-by: Derrick <76881293+D-B-Hawk@users.noreply.github.com>
Co-authored-by: Jared Edwards <jared@kubefirst.com>
Co-authored-by: Derrick Hawkins <derrick.b.hawkins@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add aws gitlab form flow
4 participants