Merge pull request #11227 from ToolJet/fix/p1-bugs

Fix: viewer canvas and sidebar scroll
This commit is contained in:
Johnson Cherian 2024-11-06 17:13:36 +05:30 committed by GitHub
commit 2989da8a83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 17 additions and 5 deletions

View file

@ -31,12 +31,12 @@ export const AppCanvas = ({ moduleId, appId, isViewerSidebarPinned }) => {
const currentLayout = useStore((state) => state.currentLayout, shallow);
const queryPanelHeight = useStore((state) => state?.queryPanel?.queryPanelHeight || 0);
const isDraggingQueryPane = useStore((state) => state.queryPanel.isDraggingQueryPane, shallow);
const { isAppDarkMode } = useAppDarkMode();
const canvasBgColor = useStore((state) => state.getCanvasBackgroundColor('canvas', isAppDarkMode), shallow);
const canvasContainerHeight = computeCanvasContainerHeight(queryPanelHeight, isDraggingQueryPane);
const isAutoMobileLayout = useStore((state) => state.getIsAutoMobileLayout(), shallow);
const setIsComponentLayoutReady = useStore((state) => state.setIsComponentLayoutReady, shallow);
const canvasMaxWidth = useAppCanvasMaxWidth({ mode: currentMode });
const { isAppDarkMode } = useAppDarkMode();
const editorMarginLeft = useSidebarMargin(canvasContainerRef);
const pageSwitchInProgress = useStore((state) => state.pageSwitchInProgress);
const setPageSwitchInProgress = useStore((state) => state.setPageSwitchInProgress);
@ -71,8 +71,8 @@ export const AppCanvas = ({ moduleId, appId, isViewerSidebarPinned }) => {
// transform: `scale(1)`,
borderLeft: editorMarginLeft + 'px solid',
height: currentMode === 'edit' ? canvasContainerHeight : '100%',
// backgroundColor: canvasBgColor,
background: !isAppDarkMode ? '#EBEBEF' : '#2E3035',
backgroundColor: canvasBgColor,
// background: !isAppDarkMode ? '#EBEBEF' : '#2E3035',
marginLeft:
isViewerSidebarPinned && currentLayout !== 'mobile' && currentMode !== 'edit'
? pageSidebarStyle === 'icon'

View file

@ -1,3 +1,9 @@
.PopoverContent {
&.page {
min-height: unset !important;
}
}
.edit-page-overlay-toggle {
opacity: 0;
transition: opacity 0.1s;

View file

@ -112,7 +112,7 @@ export const ViewerSidebarNavigation = ({
borderRight: !styles?.borderColor?.isDefault ? `1px solid ${styles?.borderColor?.value}` : '',
}}
>
<div className="position-relative">
<div className="position-relative" style={{ height: '100%' }}>
<ButtonSolid
onClick={() => {
toggleSidebarPinned();

View file

@ -122,7 +122,6 @@ export const createAppSlice = (set, get) => ({
const appId = get().app.appId;
const filteredQueryParams = queryParams.filter(([key, value]) => {
if (!value) return false;
if (key === 'env' && !isLicenseValid()) return false;
return true;
});

View file

@ -571,6 +571,13 @@
.page-handler-wrapper {
background: transparent;
height: 100%;
scrollbar-width: none;
overflow: auto;
&::-webkit-scrollbar {
display: none;
}
.tj-list-item-selected {
.custom-icon {