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

[TableListView] Upcoming requirements #159995

Open
sebelga opened this issue Jun 20, 2023 · 5 comments
Open

[TableListView] Upcoming requirements #159995

sebelga opened this issue Jun 20, 2023 · 5 comments
Assignees
Labels
Component:TableListView Feature:Content Management User generated content (saved objects) management Meta Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@sebelga
Copy link
Contributor

sebelga commented Jun 20, 2023

The <TableListView /> is a component used by multiple teams in different contexts. Its purpose is to provide a consistent user experience for the different content listing page across Kibana. At the same time it needs to be flexible enough to accommodate different product requirements.

There has been multiple contributions lately to the <TableListView /> component (#155716, #157988) which is awesome (🎉). It also showed that there is a need to align the vision that the SharedUX team has with the component (Content management effort, UX improvements) and the product needs of the consumers of the component.

Let's use this issue to track and gather the different teams and product requirements.

Background

Almost a year ago to the day (!) I created a meta issue to improve the previous TableListView (https://github.com/elastic/kibana-team/issues/525). We had a new design from the UI team and we split the work into multiple issues and phases to finally create the package version of the component. At some points priorities shifted and some issues were left undone.

The main tasks that were left undone were:

As a reference, this is the complete list of open issues for the TableListView. The oldest ones are the UX improvements left undone from the meta issue.

Content management requirements

Teams requirements

  • Security:
    The Security team would like to be able to "lock" the table items to only display those that contain a specific tag have a tag pre-selected when loading the table.
    There was a PR to implement it that finally didn't get merged and got closed.

  • Visualisation:

    • They required multiple tabs: it's been implemented here.

    • From the conversation and mock up we can see that they would also like to extend the column (e.g. include "Usage"), have some custom bulk actions ("merge", "duplicate").

To discuss: in one of their wireframe it looks like the "tags" are moved to a dedicated column which, if implemented, would reverse the work that we did to group the title, description and tags in one column.

image

@sebelga sebelga added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Feature:Content Management User generated content (saved objects) management Component:TableListView labels Jun 20, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@sebelga
Copy link
Contributor Author

sebelga commented Jun 27, 2023

This is a proposal of the API that we should aim for

// The table list view "wrapped" in a KibanaPage. Occupies the full page
const ListingPage = () => {
  <TableListViewKibanaProvider {...deps}>
    <TableListViewPage>
      <TableListViewPage.Header title="" />
      <TableListView.Table {...props} />
    </TableListViewPage>
  </TableListViewKibanaProvider>;
};

// The table list view "wrapped" in a KibanaPage with Tabs
// Would have solved this https://github.com/elastic/kibana/pull/157988
const ListingPageWithTabs = () => {
  <TableListViewKibanaProvider {...deps}>
    <TableListViewPage>
      <TableListViewPage.Tabs {...tabsProps}>
        <TableListViewPage.Tab title="My Tab 1">
          <TableListView.Table {...props} />
        </TableListViewPage.Tab>
        <TableListViewPage.Tab title="My Tab 2">
          <TableListView.Table {...props} />
        </TableListViewPage.Tab>
      </TableListViewPage.Tabs>
    </TableListViewPage>
  </TableListViewKibanaProvider>;
};

// "Just" the table + search + filters (no page wrapping)
const JustTheTableEmbedded = () => {
  <TableListViewKibanaProvider {...deps}>
    <TableListView.Table {...props} /> // Our current table with "defaults"
  </TableListViewKibanaProvider>;
};

// Leave full control over the layout and what is included
const FullGranularity = () => {
  <TableListViewKibanaProvider {...deps}>
    <TableListViewBase {...props}>
      { /* HEADER */ }
      <TableListViewHeader>
        <TableListViewHeaders.Search /> // Render the search bar
        <TableListViewHeaders.Filters /> // Render the filters
      </TableListViewHeader>

      { /* TABLE */ }
      <TableListViewColumns> 
        <TableListViewColumns.Column rowSelect /> // Render the row select checkbox
        <TableListViewColumns.Column id="id" title="Id" />
        <TableListViewColumns.Column id="title" title="Title" />
        <TableListViewColumns.Column id="description" title="Description" />
        <TableListViewColumns.Column id="custom" title="Custom prop"> // Custom content column
          {(item) => <span>{item.myCustomProp}</span>}
        </TableListViewColumns.Column>
        <TableListViewColumns.Column id="actions" /> // Actions column with defaults
        <TableListViewColumns.Column id="actions">
          <TableListViewColumns.Action name="save" onClick={onClickSave} />
          <TableListViewColumns.Action name="edit" onClick={onClickEdit} />
          <TableListViewColumns.Action name="duplicate" onClick={onClickDuplicate} />
          <TableListViewColumns.Action name="more" onClick={onClickMore} />
        </TableListView.Table.Column>
      </TableListViewColumns>

      { /* FOOTER */ }
      <TableListViewFooter /> // Pagination, page size...
    </TableListViewBase>
  </TableListViewKibanaProvider>;
};

@angorayc
Copy link
Contributor

angorayc commented Jun 27, 2023

Security requirements update:

Security:
The Security team would like to be able to "lock" the table items to only display those that contain a specific tag.
There was a PR to implement it that finally didn't get merged and got closed.

We no longer lock the default selected tags.
We'd like to have default selected tags, but they are still de-selectable by users.

Update: If the default selected tags do not exist, please create the tags automatically.

@vadimkibana
Copy link
Contributor

@vadimkibana
Copy link
Contributor

Visualizations team is tracking similar work here: #166738

@petrklapka petrklapka changed the title [TableListView] Upcoming requirements [Meta] [TableListView] Upcoming requirements Oct 30, 2023
@petrklapka petrklapka changed the title [Meta] [TableListView] Upcoming requirements [Epic] [TableListView] Upcoming requirements Oct 31, 2023
@petrklapka petrklapka changed the title [Epic] [TableListView] Upcoming requirements [Epic]: [TableListView] Upcoming requirements Nov 1, 2023
@petrklapka petrklapka removed the epic label Nov 1, 2023
@petrklapka petrklapka changed the title [Epic]: [TableListView] Upcoming requirements [TableListView] Upcoming requirements Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:TableListView Feature:Content Management User generated content (saved objects) management Meta Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

No branches or pull requests

6 participants