Skip to content

Commit

Permalink
Merge branch 'main' into 551-pbi-wrapper-custom-access-denied-message
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellhaaland committed Feb 15, 2024
2 parents 3dfc414 + 2b506fd commit 36c905a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/power-bi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-powerbi",
"version": "1.0.14",
"version": "1.0.16",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down
10 changes: 7 additions & 3 deletions packages/power-bi/src/lib/components/QuickFilter/QuickFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ const StyledFilterButtons = styled.div`
const StyledQuickFilterWrapper = styled.div`
display: grid;
width: 100%;
justify-content: flex-end;
grid-template-columns: repeat(auto-fit, minmax(60px, max-content));
gap: 2em;
justify-content: flex-start;
grid-template-columns: repeat(auto-fit, minmax(max-content, 50px));
grid-template-rows: 1fr;
gap: 10px;
align-items: center;
overflow-x: hidden;
padding-left: 10px;
padding-right: 10px;
`;

const FilterButtonContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ActiveFilter, PowerBiFilter, PowerBiFilterItem } from '../../types';
import { getFilterHeaderText } from '../../utils/getFilterHeader';
import { FilterController } from '../Filter/Filter';
import { PowerBiGroupPopoverMenu } from '../groupPopoverMenu/GroupPopoverMenu';
import { StyledFilterGroupWrapper } from './quickFilterGroup.styles';
import { StyledFilterGroupContent, StyledFilterGroupWrapper } from './quickFilterGroup.styles';

interface PowerBiFilterGroupProps {
controller: FilterController;
Expand All @@ -24,18 +24,21 @@ export const PowerBiFilterGroup = ({

if (!activeFilters) return null;
const isAllChecked = activeFilters.length === 0 || activeFilters.length === group.filterVals.length;

return (
<div style={{ height: '50px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<>
<StyledFilterGroupWrapper onClick={() => setIsOpen((s) => !s)} ref={anchorEl}>
<div>
{getFilterHeaderText(
isAllChecked,
group.type,
activeFilters.map((s) => s?.toString() ?? '(Blank)')
)}
</div>
<StyledFilterGroupContent>
<div>
{getFilterHeaderText(
isAllChecked,
group.type,
activeFilters.map((s) => s?.toString() ?? '(Blank)')
)}
</div>

<Icon color={tokens.colors.text.static_icons__tertiary.hex} name="chevron_down" />
<Icon color={tokens.colors.text.static_icons__tertiary.hex} name="chevron_down" />
</StyledFilterGroupContent>
</StyledFilterGroupWrapper>
{isOpen && (
<PowerBiGroupPopoverMenu
Expand All @@ -48,6 +51,6 @@ export const PowerBiFilterGroup = ({
onCloseMenu={() => setIsOpen(false)}
/>
)}
</div>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ import { tokens } from '@equinor/eds-tokens';
import styled from 'styled-components';

export const StyledFilterGroupWrapper = styled.div`
height: 50px;
width: min-content;
display: flex;
align-items: center;
`;

export const StyledFilterGroupContent = styled.div`
height: auto;
width: auto;
width: min-content;
display: flex;
align-items: center;
cursor: pointer;
justify-content: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
2 changes: 1 addition & 1 deletion packages/workspace-fusion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-fusion",
"version": "7.0.4",
"version": "7.0.6",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down

0 comments on commit 36c905a

Please sign in to comment.