-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enforce types #154
Conversation
…omplete/definitions
…,GithubUserOrganization types.
…iption of the state is represents.
…per type inference for form values.
… other improvements
…elected and routed from installations/index
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 :) |
There was a problem hiding this 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:
- Components should not have logic they should only handle UI
- Containers folder is the place where we handle all the business logic and connect things
- Storybook shouldn't handle logic otherwise we will have a new place to refactor when we do any change to the component.
- We are using lowerCase for the first letter of all file names as well as folder names
- Styled components should live in a separate file.
- 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
…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.
…ieces of state accordingly.
…light change to handlers and types for ease of use.
…from page to FormFlow component.
There was a problem hiding this 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
* 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>
resolves #145, #146, #147