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

[BUG] Copying data from columns in discover includes extra data #5570

Closed
albgus opened this issue Dec 4, 2023 · 3 comments · Fixed by opensearch-project/oui#1198
Closed
Assignees
Labels
bug Something isn't working data explorer Issues related to the Data Explorer project discover for discover reinvent ux / ui Improvements or additions to user experience, flows, components, UI elements v2.12.0

Comments

@albgus
Copy link

albgus commented Dec 4, 2023

Describe the bug

When trying to copy the value of a column in the discover view the string "Row" is appended to the copied value.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://playground.opensearch.org/app/data-explorer
  2. Select an index then expand the details view of an item and toggle the column in the results table.
  3. Select the content of a column and copy it and paste it somewhere. For instance when copying the value EUR is pasted as EURRow

Expected behavior
Only the actual value of the column should be selected/copied.

OpenSearch Version
2.11.0

Dashboards Version
2.11.0

Host/Environment (please complete the following information):

  • OS: macOS 14.1
  • Browser and version: Chrome 119.0.6045.199
@albgus albgus added bug Something isn't working untriaged labels Dec 4, 2023
@joshuarrrr
Copy link
Member

joshuarrrr commented Dec 12, 2023

I can partially confirm this bug.

For example, selecting a whole row:

Dec 12, 2023 @ 10:17:17.000

Row: 1, Column: 2:
Women's Shoes

Row: 1, Column: 3:
Brigitte

Row: 1, Column: 4:
9P6UIowBD2EwTk8wFmCg

It is actually possible to select just the cell text, but the additional row and column info will be included when selecting an entire row or column. We probably want to take a look at the OUI component to improve its behavior - the row/column info is added for screen readers.

@kgcreative Can we have some UX assistance on how to better solve for copy/pasting from tables? Copy/paste and export is probably something we want to solve for globally.

@joshuarrrr joshuarrrr added the ux / ui Improvements or additions to user experience, flows, components, UI elements label Dec 12, 2023
@kgcreative
Copy link
Member

Thanks @joshuarrrr! My sense is we should copy/paste as either CSV or as a table -- let me think about this a bit more and see how different experiences copy/paste data back and forth. My sense is we'd want to make it easy to copy/paste as markdown/csv/html table

@abbyhu2000
Copy link
Member

abbyhu2000 commented Jan 5, 2024

@albgus @kgcreative @ashwin-pc For the two problems that are addressed:

  1. When copying and pasting the table, the extra text "Row # Column #" will be eliminated by this PR: Eliminate screenreader content when copying and pasting data grid table oui#1198

  2. However, for copying and pasting the data as a table format or CSV format, it requires OUI component <OuiDataGrid> to be entirely re-written and re-style as <table>; currently each table cells are <div> thus when copying and pasting, it does not format like a table, but format as a list of values.

I have created an issue in OUI for rewriting <OuiDataGrid> as table: opensearch-project/oui#1199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data explorer Issues related to the Data Explorer project discover for discover reinvent ux / ui Improvements or additions to user experience, flows, components, UI elements v2.12.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants