2020-09-24 16:05:18 +00:00
|
|
|
import React, { memo, useEffect } from "react";
|
2019-10-18 08:16:26 +00:00
|
|
|
import styled from "styled-components";
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
import ExplorerSidebar from "pages/Editor/Explorer";
|
2020-09-02 06:44:01 +00:00
|
|
|
import { PanelStack, Classes } from "@blueprintjs/core";
|
|
|
|
|
import { Colors } from "constants/Colors";
|
2020-09-24 04:47:37 +00:00
|
|
|
import * as Sentry from "@sentry/react";
|
2020-09-24 16:05:18 +00:00
|
|
|
import PerformanceTracker, {
|
|
|
|
|
PerformanceTransactionName,
|
|
|
|
|
} from "utils/PerformanceTracker";
|
2021-05-18 18:29:39 +00:00
|
|
|
import { Layers } from "constants/Layers";
|
2019-10-18 08:16:26 +00:00
|
|
|
|
|
|
|
|
const SidebarWrapper = styled.div`
|
2020-09-02 06:44:01 +00:00
|
|
|
background-color: ${Colors.MINE_SHAFT};
|
2021-01-27 11:38:21 +00:00
|
|
|
padding: 0;
|
2020-12-24 04:32:25 +00:00
|
|
|
width: ${(props) => props.theme.sidebarWidth};
|
2021-05-18 18:29:39 +00:00
|
|
|
z-index: ${Layers.sideBar};
|
2020-09-02 06:44:01 +00:00
|
|
|
|
2020-12-24 04:32:25 +00:00
|
|
|
color: ${(props) => props.theme.colors.textOnDarkBG};
|
2019-11-22 14:02:55 +00:00
|
|
|
overflow-y: auto;
|
2020-09-02 06:44:01 +00:00
|
|
|
& .${Classes.PANEL_STACK} {
|
|
|
|
|
height: 100%;
|
|
|
|
|
.${Classes.PANEL_STACK_VIEW} {
|
|
|
|
|
background: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-10-18 08:16:26 +00:00
|
|
|
`;
|
|
|
|
|
|
2020-09-02 06:44:01 +00:00
|
|
|
const initialPanel = { component: ExplorerSidebar };
|
|
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
export const Sidebar = memo(() => {
|
2020-09-24 16:05:18 +00:00
|
|
|
PerformanceTracker.startTracking(PerformanceTransactionName.SIDE_BAR_MOUNT);
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
PerformanceTracker.stopTracking();
|
|
|
|
|
});
|
2019-11-22 14:02:55 +00:00
|
|
|
return (
|
2020-03-30 14:21:21 +00:00
|
|
|
<SidebarWrapper className="t--sidebar">
|
2020-09-02 06:44:01 +00:00
|
|
|
<PanelStack initialPanel={initialPanel} showPanelHeader={false} />
|
2019-11-22 14:02:55 +00:00
|
|
|
</SidebarWrapper>
|
|
|
|
|
);
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Sidebar.displayName = "Sidebar";
|
2019-10-18 08:16:26 +00:00
|
|
|
|
2020-09-24 04:47:37 +00:00
|
|
|
export default Sentry.withProfiler(Sidebar);
|