From 1e31ddc1dea283d823549a14fcb6ce4caef32fbc Mon Sep 17 00:00:00 2001 From: EmilioTR Date: Wed, 27 Mar 2024 10:53:44 +0100 Subject: [PATCH 1/5] fixed the title overflow in selection menu --- .../InteractionLayout/SelectionMenu/SelectionMenu.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/InteractionLayout/SelectionMenu/SelectionMenu.jsx b/src/components/InteractionLayout/SelectionMenu/SelectionMenu.jsx index e1411fae..b31caaf3 100644 --- a/src/components/InteractionLayout/SelectionMenu/SelectionMenu.jsx +++ b/src/components/InteractionLayout/SelectionMenu/SelectionMenu.jsx @@ -37,8 +37,10 @@ const menuItemTheme = createTheme({ verticalAlign: "middle", }, "&:hover": { + display: "inline-flex", overflow: "visible", - minWidth: "fit-content" + whiteSpace: "normal" , + minWidth: "fit-content", } }, }, From 49af54a3126b4f82ae18da64c705118a0b23ac2c Mon Sep 17 00:00:00 2001 From: EmilioTR Date: Wed, 27 Mar 2024 11:30:45 +0100 Subject: [PATCH 2/5] added query title above the result table --- .../ListResultTable/QueryResultList/QueryResultList.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ListResultTable/QueryResultList/QueryResultList.jsx b/src/components/ListResultTable/QueryResultList/QueryResultList.jsx index 5412f149..b6ed4bce 100644 --- a/src/components/ListResultTable/QueryResultList/QueryResultList.jsx +++ b/src/components/ListResultTable/QueryResultList/QueryResultList.jsx @@ -1,5 +1,5 @@ import { Component, useEffect, useState } from "react"; -import { Datagrid, ListView, Title, useListContext } from "react-admin"; +import { Datagrid, ListView, Title, useListContext, useResourceDefinition } from "react-admin"; import ActionBar from "../../ActionBar/ActionBar"; import GenericField from "../../../representationProvider/GenericField"; import { Term } from "sparqljs"; @@ -7,13 +7,14 @@ import config from "../../../config"; import TableHeader from "./TableHeader/TableHeader"; import Button from '@mui/material/Button'; import SearchOffIcon from '@mui/icons-material/SearchOff'; -import { SvgIcon, Box } from "@mui/material"; +import { SvgIcon, Box, Typography } from "@mui/material"; /** * @param {object} props - the props passed down to the component * @returns {Component} custom ListViewer as defined by react-admin containing the results of the query with each variable its generic field. */ function QueryResultList(props) { + const QueryTitle = useResourceDefinition().options.label; const { data } = useListContext(props); const {changeVariables, submitted} = props; const [values, setValues] = useState(undefined); @@ -28,8 +29,9 @@ function QueryResultList(props) { return ( <> - {submitted && <Aside changeVariables={changeVariables}/> /* Adding button to make a new query - top left corner */ } + {submitted && <Aside changeVariables={changeVariables}/> /* Adding button to make a new query - top left corner */ } + <Typography variant="h3" alignSelf={"center"} mt={2} > {QueryTitle} </Typography> {values ?( <ListView title=" " actions={<ActionBar />} {...props} > <Datagrid header={<TableHeader config={config}/>} bulkActionButtons={false}> From 5f4e2217ace73af7cb88befda7115290f4a2c910 Mon Sep 17 00:00:00 2001 From: EmilioTR <Emilio.TenaRomero@hotmail.com> Date: Wed, 27 Mar 2024 11:31:05 +0100 Subject: [PATCH 3/5] updated CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6521c38..bcd773c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- Query title above the result table (#41) ### Changed - On empty query result, show clear message (#86) ### Fixed - Fixed pagination bug in templated queries (#80) +- Fixed title display inside the selection menu when hovering, does not flow over table anymore ### Removed From 5f70dc222fb81a7950d5bf8d988545f35da42a6c Mon Sep 17 00:00:00 2001 From: EmilioTR <Emilio.TenaRomero@hotmail.com> Date: Wed, 27 Mar 2024 15:08:36 +0100 Subject: [PATCH 4/5] changed fontsize to 2rem and aligned title left --- .../ListResultTable/QueryResultList/QueryResultList.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ListResultTable/QueryResultList/QueryResultList.jsx b/src/components/ListResultTable/QueryResultList/QueryResultList.jsx index b6ed4bce..a1c470ff 100644 --- a/src/components/ListResultTable/QueryResultList/QueryResultList.jsx +++ b/src/components/ListResultTable/QueryResultList/QueryResultList.jsx @@ -31,7 +31,7 @@ function QueryResultList(props) { <Title title={config.title} /> {submitted && <Aside changeVariables={changeVariables}/> /* Adding button to make a new query - top left corner */ } - <Typography variant="h3" alignSelf={"center"} mt={2} > {QueryTitle} </Typography> + <Typography fontSize={"2rem"} mt={2} > {QueryTitle} </Typography> {values ?( <ListView title=" " actions={<ActionBar />} {...props} > <Datagrid header={<TableHeader config={config}/>} bulkActionButtons={false}> From cab388dd5541b8844429b417d4573a86885681eb Mon Sep 17 00:00:00 2001 From: EmilioTR <Emilio.TenaRomero@hotmail.com> Date: Wed, 27 Mar 2024 15:08:49 +0100 Subject: [PATCH 5/5] updated CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcd773c4..ad5fde80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed pagination bug in templated queries (#80) -- Fixed title display inside the selection menu when hovering, does not flow over table anymore +- Fixed title display inside the selection menu when hovering, does not flow over table anymore (#41) ### Removed