Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Make the quick filter popover menu resizeble #455

Merged
merged 5 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions apps/test-app/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ export function App() {
getFilterMeta: async () => [
{
filterItems: [
{ count: 10, value: '1' },
{ count: 9, value: '2' },
{ count: 10, value: 'test' },
{
count: 9,
value: 'test',
},
],
isQuickFilter: true,
name: 'test',
Expand Down
2 changes: 1 addition & 1 deletion packages/filter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-filter",
"version": "2.0.5",
"version": "2.0.6",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,16 @@ export const StyledSearchHolder = styled.div<{ className: string }>`
`;

export const StyledMenuWrapper = styled.div`
width: 200px;
`;
width: auto;
max-width: 1000px;
overflow: hidden;
resize: horizontal;
min-width: 200px; // Hacky way to move the resize drag button
direction: rtl; // https://stackoverflow.com/a/60633726 resize is defaulted to be placed on the botton-right side of the div.
> div {
direction: ltr;
} // So we make the div right-to-left, so the resize is moved to the bottom left corner.
`; // Then we change inner div to left-to-right again.

export const StyledFilterItemList = styled.div<{ items: number }>`
height: ${({ items }) => (items > 10 ? '300px' : `${items * 22 + 16}px`)};
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": "4.0.1",
"version": "4.0.2",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down