Skip to content
New issue

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

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

Already on GitHub? # to your account

Implement column action #1939

Closed
13 of 15 tasks
JoCa96 opened this issue Oct 9, 2024 · 1 comment
Closed
13 of 15 tasks

Implement column action #1939

JoCa96 opened this issue Oct 9, 2024 · 1 comment
Assignees
Labels
cooperation Issues for projects in cooperative mode dev Requires technical expertise

Comments

@JoCa96
Copy link
Collaborator

JoCa96 commented Oct 9, 2024

Depends on

Why?

This feature is needed for our collaboration project PSF.

In case of advanced filtering/sorting or multiple column actions being required, we need to show the actions in a special flyout.

This story is implemented on the basis of the advanced sorting mode.

Design

Figma > Data > Advanced Sorting

Acceptance criteria

  • TableFeature type is extended to be able to add column actions
  • the actions can be configured for an inline and a list view
  • The OnyxDataGrid shows the column actions in a flyout when
    • there is more than one action defined
    • an action only has a listComponent defined
  • The existing sorting feature is extended with a list component as shown in Figma

Implementation details

The basic useTableFeature composable API (defined in #1852) is extended like this:

export type TableFeature< /* ... */> = {
  // same as before ...

  /**
   * Allows the modification of the header columns before render.
   */
  header?: {
    /** actions are shown after the header label, later `listComponent` can be added */
    actions?: {
      label: string;
      /** optional icon component to be shown in the column header, if not defined list mode will be enforced */
      iconComponent?: Component;
      /** components to render in the list mode of the column actions, if multiple are defined, they will be grouped together */
      listComponents: Component | Component[];
      onTrigger: (event: MouseEvent) => void;
    }[];
  };
};

Applicable ARIA Pattern

Definition of Done

  • covered by tests
    • functional tests (Playwright or unit test)
    • visual tests (Playwright screenshots)
  • follow-up tickets were created if necessary -> Implement UX feedback for moreActions #2293
  • updated version + documentation is deployed
  • Storybook can show the feature
  • Storybook code snippet of new/changed examples are checked that they are generated correctly
  • Namings are aligned with Figma

Approval

@JoCa96 JoCa96 added this to onyx Oct 9, 2024
@JoCa96 JoCa96 converted this from a draft issue Oct 9, 2024
@JoCa96 JoCa96 added dev Requires technical expertise cooperation Issues for projects in cooperative mode labels Oct 9, 2024
@JoCa96 JoCa96 added this to the Tables milestone Oct 9, 2024
@JoCa96 JoCa96 added the 0-refinement All issues that can or need to be estimated in our next refinement label Oct 9, 2024
@JoCa96 JoCa96 self-assigned this Oct 9, 2024
@JoCa96 JoCa96 moved this from New to Backlog in onyx Oct 9, 2024
@JoCa96 JoCa96 mentioned this issue Oct 9, 2024
11 tasks
@JoCa96 JoCa96 removed the 0-refinement All issues that can or need to be estimated in our next refinement label Oct 9, 2024
@mj-hof mj-hof moved this from Backlog to Ready in onyx Oct 9, 2024
@JoCa96
Copy link
Collaborator Author

JoCa96 commented Nov 4, 2024

This ticket is not blocked anymore, see

actions?: (column: keyof TEntry) => {

@MajaZarkova MajaZarkova moved this from Ready to In Progress in onyx Nov 27, 2024
@MajaZarkova MajaZarkova moved this from In Progress to Ready in onyx Nov 28, 2024
@MajaZarkova MajaZarkova moved this from Ready to In Progress in onyx Dec 2, 2024
MajaZarkova added a commit that referenced this issue Dec 9, 2024
<!-- Is your PR related to an issue? Then please link it via the
"Relates to #" below. Else, remove it. -->

Relates to #1939 

DataGridFeature type is extended to support listItems which are rendered
as a flyout right next to the header

## Checklist

- [x] The added / edited code has been documented with
[JSDoc](https://jsdoc.app/about-getting-started)
- [x] All changes are documented in the documentation app (folder
`apps/docs`)
- [x] A changeset is added with `npx changeset add` if your changes
should be released as npm package (because they affect the library
usage)
@MajaZarkova MajaZarkova moved this from In Progress to In Approval in onyx Dec 10, 2024
ChristianBusshoff pushed a commit that referenced this issue Dec 10, 2024
<!-- Is your PR related to an issue? Then please link it via the
"Relates to #" below. Else, remove it. -->

Relates to #1939 

DataGridFeature type is extended to support listItems which are rendered
as a flyout right next to the header

## Checklist

- [x] The added / edited code has been documented with
[JSDoc](https://jsdoc.app/about-getting-started)
- [x] All changes are documented in the documentation app (folder
`apps/docs`)
- [x] A changeset is added with `npx changeset add` if your changes
should be released as npm package (because they affect the library
usage)
MajaZarkova added a commit that referenced this issue Dec 10, 2024
<!-- Is your PR related to an issue? Then please link it via the
"Relates to #" below. Else, remove it. -->

Relates to #1939 

- The more actions storybook example is renamed to Header Interactions
- The flyout options are added to every column
- The flyout options are changes
The changes were requested by UX
@github-project-automation github-project-automation bot moved this from In Approval to Done in onyx Dec 10, 2024
MajaZarkova added a commit that referenced this issue Dec 18, 2024
<!-- Is your PR related to an issue? Then please link it via the
"Relates to #" below. Else, remove it. -->

Relates to #1939 

When listItems are not set the icons will be rendered inside the flyout

## Checklist

- [x] The added / edited code has been documented with
[JSDoc](https://jsdoc.app/about-getting-started)
@mj-hof mj-hof changed the title Implement OnyxDataGrid column action Implement column action Jan 30, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cooperation Issues for projects in cooperative mode dev Requires technical expertise
Projects
Status: Done
Development

No branches or pull requests

2 participants