-
Notifications
You must be signed in to change notification settings - Fork 72
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
✨ 374 New File Names #382
✨ 374 New File Names #382
Conversation
testId: string; | ||
trace: ITrace; | ||
assertion?: Assertion; | ||
trace: TTrace; |
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.
We are not going to use interfaces anymore, we are going to be using types for the whole of the FE app and it should always be starting with a T
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.
why we are moving away from interfaces? https://ncjamieson.com/prefer-interfaces/
@@ -0,0 +1,2 @@ | |||
// eslint-disable-next-line no-restricted-exports | |||
export {default} from './Router'; |
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.
Moving the Router under the components folder
import { | ||
useGetTestByIdQuery, | ||
useGetTestResultByIdQuery, | ||
useRunTestMutation, | ||
useUpdateTestResultMutation, | ||
} from 'redux/services/TestService'; | ||
} from 'gateways/Test.gateway'; |
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.
This are now coming from the gateway file
@@ -0,0 +1,22 @@ | |||
export const BASE_URL = 'http://localhost:8080'; |
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.
Introducing constants files
import {escapeString} from '../utils'; | ||
import {getSpanValue} from './SpanService'; | ||
|
||
const getOperator = (op: COMPARE_OPERATOR) => { |
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.
Moving this to the Operator Service
@@ -0,0 +1,57 @@ | |||
import {CompareOperator} from '../Operator/Operator.constants'; |
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.
Types are now defined under each of the entities
@@ -11,7 +11,7 @@ type TTour = Record<GuidedTours, boolean>; | |||
|
|||
const GUIDED_TOUR_KEY = 'guided_tour'; | |||
|
|||
const {get, set} = LocalStorageService<TTour>(GUIDED_TOUR_KEY); | |||
const {get, set} = LocalStorageGateway<TTour>(GUIDED_TOUR_KEY); |
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.
Gateways = I/O
Services = Business logic
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.
nice
@@ -0,0 +1,13 @@ | |||
import {CompareOperator, CompareOperatorNameMap, CompareOperatorSymbolMap} from './Operator.constants'; |
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.
Moving forward services will be static functions that provide an object with methods and attributes. This allows the possibility of composing if required.
This PR is the first PR based on the documentation https://kubeshop.atlassian.net/wiki/spaces/KUBESHOP/pages/486309895/Post+MVP+Frontend+Improvements that updates the front end architecture to be more flexible and scalable.
Changes
Fixes
Checklist