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: add display name to grouping keys #559

Merged
merged 25 commits into from
Dec 21, 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
2 changes: 1 addition & 1 deletion .github/helpers/src/issue-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function checkIssues(client: Octo, pr: number) {
id
number
title
timelineItems(first: 100, itemTypes: [CONNECTED_EVENT]) {
timelineItems(first: 100, itemTypes: [CONNECTED_EVENT, CROSS_REFERENCED_EVENT]) {
__typename
... on PullRequestTimelineItemsConnection{
totalCount
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: 🔨CI
on:
push:
branches:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-issue-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Verify linked issue
name: 👮Verify linked issue

# This action works with pull requests and pushes
permissions:
Expand All @@ -18,7 +18,7 @@ permissions:
statuses: read,
}
on:
workflow_dispatch:
pull_request:

jobs:
issue-check:
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Prettify
name: 💄Prettify

# This action works with pull requests and pushes
on:
pull_request:
push:
branches:
- main
pull_request:
push:
branches:
- main

jobs:
prettier:
runs-on: ubuntu-latest
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,md,ts,tsx}
- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
# This part is also where you can pass other options, for example:
prettier_options: --write **/*.{js,md,ts,tsx}
2 changes: 1 addition & 1 deletion packages/garden/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-garden",
"version": "6.0.3",
"version": "7.0.0",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Autocomplete, CircularProgress, Divider, EdsProvider, Label, Radio } from '@equinor/eds-core-react';
import { Fragment, startTransition, useRef } from 'react';
import { GroupingOption } from '../../types';
import {
RadioButtonWrapper,
RadioCategoryWrapper,
Expand Down Expand Up @@ -83,18 +82,22 @@ export function GroupingSelector<TContext>({
<Autocomplete
ref={selectorRef}
key={groupingKeys[0]}
options={gardenMetaQuery.data.allGroupingOptions.map((option: GroupingOption) => option.groupingKey)}
options={gardenMetaQuery.data.allGroupingOptions}
label={'Group by'}
optionLabel={(s) => s?.displayName ?? s?.groupingKey ?? ''}
hideClearButton
multiple={false}
selectedOptions={[groupingKeys[0]]}
onOptionsChange={(changes) => handleGardenKeyChange(changes.selectedItems[0])}
selectedOptions={[gardenMetaQuery.data.allGroupingOptions.find((s) => s.groupingKey == groupingKeys[0])]}
onOptionsChange={(changes) => handleGardenKeyChange(changes.selectedItems[0]?.groupingKey)}
/>
<Autocomplete
options={gardenMetaQuery.data.validGroupingOptions}
label={'Then Group by'}
selectedOptions={[groupingKeys.at(1)]}
onOptionsChange={(changes) => handleExistingSelectionChange(changes.selectedItems[0])}
selectedOptions={[
gardenMetaQuery.data.allGroupingOptions.find((s) => s.groupingKey === groupingKeys.at(1)),
]}
optionLabel={(s) => s?.displayName ?? s?.groupingKey ?? ''}
onOptionsChange={(changes) => handleExistingSelectionChange(changes.selectedItems[0]?.groupingKey)}
/>
</StyledAutoCompleteWrapper>

Expand Down
3 changes: 2 additions & 1 deletion packages/garden/src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type GardenMeta = {
columnCount: number;
rowCount: number;
allGroupingOptions: GroupingOption[];
validGroupingOptions: string[];
validGroupingOptions: GroupingOption[];
columnWidth?: number;
};

Expand Down Expand Up @@ -55,6 +55,7 @@ export type GardenHeaderGroup = {

export type GroupingOption = {
groupingKey: string;
displayName: string;
timeInterval: string[] | null;
dateVariant: string[] | null;
};
39 changes: 36 additions & 3 deletions packages/workspace-fusion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/workspace-fusion",
"version": "6.1.2",
"version": "7.0.0",
"type": "module",
"sideEffects": false,
"license": "MIT",
Expand All @@ -18,6 +18,40 @@
"files": [
"dist"
],
"typesVersions": {
">=4.2": {
".": [
"dist/types/index"
],
"garden": [
"dist/types/lib/integrations/garden/index"
],
"grid": [
"dist/types/lib/integrations/grid/index"
],
"power-bi": [
"dist/types/lib/integrations/power-bi/index"
],
"filter": [
"dist/types/lib/integrations/filter/index"
],
"status-bar": [
"dist/types/lib/integrations/status-bar/index"
],
"sidesheet": [
"dist/types/lib/integrations/sidesheet/index"
],
"grid-module": [
"dist/types/modules/grid/index"
],
"power-bi-module": [
"dist/types/modules/power-bi/index"
],
"garden-module": [
"dist/types/modules/garden/index"
]
}
},
"exports": {
".": {
"require": "./dist/index.cjs",
Expand Down Expand Up @@ -106,6 +140,5 @@
"type": "git",
"url": "git+https://github.com/equinor/fusion-workspace.git",
"directory": "packages/workspace-fusion"
},
"gitHead": "6407f12589214b96228ab87d32a211f7c1cd6ba4"
}
}
7 changes: 0 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading