mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
[Graph] clear legacy docs (#111083)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
e2c6a039f6
commit
9f950781a8
7 changed files with 9 additions and 12 deletions
|
@ -17,18 +17,18 @@ Graph shows only up in the side bar if your server is running on a platinum or t
|
||||||
|
|
||||||
### Client `public/`
|
### Client `public/`
|
||||||
|
|
||||||
Currently most of the state handling is done by a central angular controller. This controller will be broken up into a redux/saga setup step by step.
|
Currently state handled by react/redux/saga and the core mutable `GraphWorkspace` instance, which managing the nodes and edges state. It should be rewritten in typescript and integrated into redux store.
|
||||||
|
|
||||||
* `angular/` contains all code using javascript and angular. Rewriting this code in typescript and react is currently ongoing. When the migration is finished, this folder will go away
|
* `apps/` contains all graph app routes
|
||||||
* `components/` contains react components for various parts of the interface. Components can hold local UI state (e.g. current form data), everything else should be passed in from the caller. Styles should reside in a component-specific stylesheet
|
* `components/` contains react components for various parts of the interface. Components can hold local UI state (e.g. current form data), everything else should be passed in from the caller. Styles should reside in a component-specific stylesheet
|
||||||
* `services/` contains functions that encapsule other parts of Kibana. Stateful dependencies are passed in from the outside. Components should not rely on services directly but have callbacks passed in. Once the migration to redux/saga is complete, only sagas will use services.
|
* `services/` contains the core workspace logic and functions that encapsule other parts of Kibana. Stateful dependencies are passed in from the outside. Components should not rely on services directly but have callbacks passed in. Once the migration to redux/saga is complete, only sagas will use services
|
||||||
* `helpers/` contains side effect free helper functions that can be imported and used from components and services
|
* `helpers/` contains side effect free helper functions that can be imported and used from components and services
|
||||||
* `state_management/` contains reducers, action creators, selectors and sagas. It also exports the central store creator
|
* `state_management/` contains reducers, action creators, selectors and sagas. It also exports the central store creator
|
||||||
* Each file covers one functional area (e.g. handling of fields, handling of url templates...)
|
* Each file covers one functional area (e.g. handling of fields, handling of url templates...)
|
||||||
* Generally there is no file separation between reducers, action creators, selectors and sagas of the same functional area
|
* Generally there is no file separation between reducers, action creators, selectors and sagas of the same functional area
|
||||||
* Sagas may contain cross-references between multiple functional areas (e.g. the loading saga sets fields and meta data). Because of this it is possible that circular imports occur. In this case the sagas are moved to a separate file `<functional area>.sagas.ts`.
|
* Sagas may contain cross-references between multiple functional areas (e.g. the loading saga sets fields and meta data). Because of this it is possible that circular imports occur. In this case the sagas are moved to a separate file `<functional area>.sagas.ts`.
|
||||||
* `types/` contains type definitions for unmigrated functions in `angular/` and business objects
|
* `types/` contains type definitions for unmigrated `GraphWorkspace` methods
|
||||||
* `app.js` is the central entrypoint of the app. It initializes router, state management and root components. This will become `app.tsx` when the migration is complete
|
* `router.tsx` is the central entrypoint of the app
|
||||||
|
|
||||||
|
|
||||||
### Server `server/`
|
### Server `server/`
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.gphNoUserSelect {
|
.gphNoUserSelect {
|
||||||
padding-right: $euiSizeXS;
|
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
border-radius: $euiBorderRadius;
|
border-radius: $euiBorderRadius;
|
||||||
margin-bottom: $euiSizeXS;
|
margin-bottom: $euiSizeXS;
|
||||||
|
|
||||||
& > span {
|
.kuiIcon {
|
||||||
padding-right: $euiSizeXS;
|
padding-right: $euiSizeXS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,6 @@ export const WorkspaceTopNavMenu = (props: WorkspaceTopNavMenuProps) => {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
// register things for legacy angular UI
|
|
||||||
const allSavingDisabled = props.graphSavePolicy === 'none';
|
const allSavingDisabled = props.graphSavePolicy === 'none';
|
||||||
|
|
||||||
// ===== Menubar configuration =========
|
// ===== Menubar configuration =========
|
||||||
|
|
|
@ -559,7 +559,7 @@ function GraphWorkspace(options) {
|
||||||
}
|
}
|
||||||
if (self.changeHandler) {
|
if (self.changeHandler) {
|
||||||
// Hook to allow any client to respond to position changes
|
// Hook to allow any client to respond to position changes
|
||||||
// e.g. angular adjusts and repaints node positions on screen.
|
// e.g. react adjusts and repaints node positions on screen.
|
||||||
self.changeHandler();
|
self.changeHandler();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -65,7 +65,7 @@ export const hasFieldsSelector = createSelector(
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saga making notifying angular when fields are selected to re-calculate the state of the save button.
|
* Saga making notifying react when fields are selected to re-calculate the state of the save button.
|
||||||
*
|
*
|
||||||
* Won't be necessary once the workspace is moved to redux
|
* Won't be necessary once the workspace is moved to redux
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -80,7 +80,7 @@ describe('legacy sync sagas', () => {
|
||||||
expect(env.mockedDeps.notifyReact).toHaveBeenCalled();
|
expect(env.mockedDeps.notifyReact).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('notifies angular when fields are selected', () => {
|
it('notifies react when fields are selected', () => {
|
||||||
env.store.dispatch(selectField('field1'));
|
env.store.dispatch(selectField('field1'));
|
||||||
expect(env.mockedDeps.notifyReact).toHaveBeenCalled();
|
expect(env.mockedDeps.notifyReact).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue