diff --git a/app/client/cypress/locators/QueryEditor.json b/app/client/cypress/locators/QueryEditor.json index 045bfba86913..8f9fd177e9df 100644 --- a/app/client/cypress/locators/QueryEditor.json +++ b/app/client/cypress/locators/QueryEditor.json @@ -9,7 +9,7 @@ "addDatasource": ".t--add-datasource", "editDatasourceButton": ".t--edit-datasource", "switch": ".t--form-control-SWITCH input", - "queryResponse": "(//div[@class='table']//div[@class='tr'])[2]//div[@class='td mp-mask']", + "queryResponse": "(//div[@class='table']//div[@class='tr'])[2]//div[@class='td as-mask']", "querySelect": "//div[contains(@class, 't--template-menu')]//div[text()='Select']", "queryCreate": "//div[contains(@class, 't--template-menu')]//div[text()='Create']", "queryUpdate": "//div[contains(@class, 't--template-menu')]//div[text()='Update']", diff --git a/app/client/cypress/support/Pages/DataSources.ts b/app/client/cypress/support/Pages/DataSources.ts index 234337cc9a61..8064c9eb4055 100644 --- a/app/client/cypress/support/Pages/DataSources.ts +++ b/app/client/cypress/support/Pages/DataSources.ts @@ -147,7 +147,7 @@ export class DataSources { option + "']"; _queryTableResponse = - "//div[@data-guided-tour-id='query-table-response']//div[@class='tbody']//div[@class ='td mp-mask']"; + "//div[@data-guided-tour-id='query-table-response']//div[@class='tbody']//div[@class ='td as-mask']"; _queryResponseHeader = (header: string) => "//div[@data-guided-tour-id='query-table-response']//div[@class='table']//div[@role ='columnheader']//span[text()='" + header + diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 74294b336c73..c34efc626b2c 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -816,7 +816,7 @@ Cypress.Commands.add("ValidatePaginateResponseUrlData", (runTestCss) => { cy.wait(2000); cy.get(runTestCss).click(); cy.wait(2000); - cy.xpath("//div[@class='tr'][1]//div[@class='td mp-mask'][6]//span") + cy.xpath("//div[@class='tr'][1]//div[@class='td as-mask'][6]//span") .invoke("text") .then((valueToTest) => { // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -841,7 +841,7 @@ Cypress.Commands.add("ValidatePaginateResponseUrlDataV2", (runTestCss) => { cy.wait(2000); cy.get(runTestCss).click(); cy.wait(2000); - cy.xpath("//div[@class='tr'][1]//div[@class='td mp-mask'][6]//span") + cy.xpath("//div[@class='tr'][1]//div[@class='td as-mask'][6]//span") .invoke("text") .then((valueToTest) => { // eslint-disable-next-line cypress/no-unnecessary-waiting diff --git a/app/client/src/PluginActionEditor/components/PluginActionResponse/components/Table.tsx b/app/client/src/PluginActionEditor/components/PluginActionResponse/components/Table.tsx index 3eb85a11b4fd..915dd81d9afd 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionResponse/components/Table.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionResponse/components/Table.tsx @@ -44,12 +44,14 @@ export const TableWrapper = styled.div<{ minColumnWidth?: number }>` justify-content: space-between; flex-direction: column; overflow: auto; + .tableWrap { height: 100%; display: block; overflow-x: auto; overflow-y: hidden; } + .table { border-spacing: 0; color: var(--ads-v2-color-fg); @@ -57,29 +59,37 @@ export const TableWrapper = styled.div<{ minColumnWidth?: number }>` display: table; width: 100%; height: auto; + .thead, .tbody { overflow: hidden; } + .tbody { height: calc(100% - ${TABLE_SIZES.COLUMN_HEADER_HEIGHT}px); + .tr { width: 100%; } } + .tr { overflow: hidden; border-bottom: 1px solid var(--ads-v2-color-black-75); + &.selected-row { background: var(--ads-v2-color-bg-subtle); + &:hover { background: var(--ads-v2-color-bg-subtle); } } + &:hover { background: var(--ads-v2-color-gray-50); } } + .th, .td { margin: 0; @@ -87,6 +97,7 @@ export const TableWrapper = styled.div<{ minColumnWidth?: number }>` position: relative; font-size: ${TABLE_SIZES.ROW_FONT_SIZE}px; line-height: ${TABLE_SIZES.ROW_FONT_SIZE}px; + ${(props) => `${ props.minColumnWidth ? `min-width: ${props.minColumnWidth}px;` : "" @@ -94,6 +105,7 @@ export const TableWrapper = styled.div<{ minColumnWidth?: number }>` :last-child { border-right: 0; } + .resizer { display: inline-block; width: 10px; @@ -104,24 +116,28 @@ export const TableWrapper = styled.div<{ minColumnWidth?: number }>` transform: translateX(50%); z-index: 1; ${"" /* prevents from scrolling while dragging on touch devices */} - touch-action:none; + touch-action: none; + &.isResizing { cursor: n-resize; } } } + .th { padding: 0 10px 0 0; height: ${TABLE_SIZES.COLUMN_HEADER_HEIGHT}px; line-height: ${TABLE_SIZES.COLUMN_HEADER_HEIGHT}px; background: var(--ads-v2-color-gray-50); } + .td { height: auto; line-height: ${TABLE_SIZES.ROW_HEIGHT}px; padding: 0 10px; } } + .draggable-header, .hidden-header { width: 100%; @@ -132,30 +148,38 @@ export const TableWrapper = styled.div<{ minColumnWidth?: number }>` color: var(--ads-v2-color-fg); font-weight: 500; padding-left: 10px; + &.sorted { padding-left: 5px; } } + .draggable-header { cursor: pointer; + &.reorder-line { width: 1px; height: 100%; } } + .hidden-header { opacity: 0.6; } + .column-menu { height: ${TABLE_SIZES.COLUMN_HEADER_HEIGHT}px; line-height: ${TABLE_SIZES.COLUMN_HEADER_HEIGHT}px; } + .th { display: flex; justify-content: space-between; + &.highlight-left { border-left: 2px solid var(--ads-v2-color-border-success); } + &.highlight-right { border-right: 2px solid var(--ads-v2-color-border-success); } @@ -313,7 +337,7 @@ function Table(props: TableProps) { return (
{cell.render("Cell")} @@ -348,7 +372,7 @@ function Table(props: TableProps) { {headerGroups.map((headerGroup: any, index: number) => (
{headerGroup.headers.map( diff --git a/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx b/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx index 80ba7bbf0079..c71f8d115e8a 100644 --- a/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/PeekOverlayPopup/PeekOverlayPopup.tsx @@ -157,7 +157,7 @@ export function PeekOverlayPopUpContent( > {(dataType === "object" || dataType === "array") && jsData !== null && ( e.stopPropagation()} > @@ -325,7 +325,7 @@ export function LogItem(props: LogItemProps) { if (typeof logDatum === "object") { return ( e.stopPropagation()} > @@ -334,7 +334,7 @@ export function LogItem(props: LogItemProps) { ); } else { return ( - + {`${logDatum} `} ); diff --git a/app/client/src/components/editorComponents/Debugger/StateInspector/StateInspector.tsx b/app/client/src/components/editorComponents/Debugger/StateInspector/StateInspector.tsx index 831de87e2adb..dc1b99d93a77 100644 --- a/app/client/src/components/editorComponents/Debugger/StateInspector/StateInspector.tsx +++ b/app/client/src/components/editorComponents/Debugger/StateInspector/StateInspector.tsx @@ -66,7 +66,7 @@ export const StateInspector = () => { {selectedItem ? ( ; diff --git a/app/client/src/pages/AppViewer/AppPage/AppPage.tsx b/app/client/src/pages/AppViewer/AppPage/AppPage.tsx index 5f9d27d7dc39..36d615618d3f 100644 --- a/app/client/src/pages/AppViewer/AppPage/AppPage.tsx +++ b/app/client/src/pages/AppViewer/AppPage/AppPage.tsx @@ -54,7 +54,7 @@ export function AppPage(props: AppPageProps) { sidebarWidth={sidebarWidth} > diff --git a/app/client/src/pages/Editor/Canvas.tsx b/app/client/src/pages/Editor/Canvas.tsx index c34f2fc358c8..b0d1140e50e1 100644 --- a/app/client/src/pages/Editor/Canvas.tsx +++ b/app/client/src/pages/Editor/Canvas.tsx @@ -92,7 +92,7 @@ const Canvas = (props: CanvasProps) => {