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

Fix (TableVis): Properly filter table columns when sending to filter … #5619

Merged

Conversation

joshuarrrr
Copy link
Member

Description

…event handler

This ensures that the column and row indices match the table cell being renderered.

Note that this is a quick fix - long term, we also want a regression test (to validate that filter actions apply the right data), as well as some refactoring of this handler; it seems a little sill to pass both the entire table and column/row indices rather than the direct reference or even value.

Issues Resolved

fixes #5612

Screenshot

Testing the changes

Can validate via the steps in the linked issue.

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (bbd40e1) 66.97% compared to head (0e0f08c) 66.97%.

Files Patch % Lines
...table/public/components/table_vis_grid_columns.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5619   +/-   ##
=======================================
  Coverage   66.97%   66.97%           
=======================================
  Files        3301     3301           
  Lines       63437    63439    +2     
  Branches    10107    10107           
=======================================
+ Hits        42485    42487    +2     
- Misses      18499    18503    +4     
+ Partials     2453     2449    -4     
Flag Coverage Δ
Linux_1 35.22% <0.00%> (-0.01%) ⬇️
Linux_2 55.11% <ø> (ø)
Linux_3 43.93% <ø> (+<0.01%) ⬆️
Linux_4 35.27% <ø> (ø)
Windows_1 35.25% <0.00%> (-0.01%) ⬇️
Windows_2 55.08% <ø> (ø)
Windows_3 43.94% <ø> (ø)
Windows_4 35.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ananzh ananzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to add a test in the fun tst repo?

AMoo-Miki
AMoo-Miki previously approved these changes Feb 5, 2024
ashwin-pc
ashwin-pc previously approved these changes Feb 5, 2024
@joshuarrrr joshuarrrr dismissed stale reviews from ashwin-pc and AMoo-Miki via 78b4515 February 5, 2024 23:58
@joshuarrrr
Copy link
Member Author

do we want to add a test in the fun tst repo?

Yeah, I think the regression test would best belong there. But I don't think there will be time to do that for 2.12.

AMoo-Miki
AMoo-Miki previously approved these changes Feb 6, 2024
@ashwin-pc ashwin-pc merged commit 3e22939 into opensearch-project:main Feb 6, 2024
67 of 68 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 6, 2024
#5619)

* Fix (TableVis): Properly filter table columns when sending to filter event handler

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit 3e22939)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ashwin-pc pushed a commit that referenced this pull request Feb 7, 2024
#5619) (#5823)

* Fix (TableVis): Properly filter table columns when sending to filter event handler

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit 3e22939)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 7, 2024
#5619) (#5823)

* Fix (TableVis): Properly filter table columns when sending to filter event handler

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit 3e22939)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit a237e52)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 7, 2024
#5619)

* Fix (TableVis): Properly filter table columns when sending to filter event handler

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit 3e22939)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
abbyhu2000 pushed a commit that referenced this pull request Feb 7, 2024
#5619) (#5823) (#5829)

* Fix (TableVis): Properly filter table columns when sending to filter event handler



* add changelog



---------




(cherry picked from commit 3e22939)


# Conflicts:
#	CHANGELOG.md


(cherry picked from commit a237e52)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.11 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.11 2.11
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.11
# Create a new branch
git switch --create backport/backport-5619-to-2.11
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3e2293957c2bca6b17029b238ba077f86236b87d
# Push it to GitHub
git push --set-upstream origin backport/backport-5619-to-2.11
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.11

Then, create a pull request where the base branch is 2.11 and the compare/head branch is backport/backport-5619-to-2.11.

ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Feb 21, 2024
opensearch-project#5619)

* Fix (TableVis): Properly filter table columns when sending to filter event handler

Signed-off-by: Josh Romero <[email protected]>

* add changelog

Signed-off-by: Josh Romero <[email protected]>

---------

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] [TableVis] Filter actions don't work correctly when split table aggregations come first
8 participants