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 toggle column action in the discover page #8905

Merged
merged 13 commits into from
Dec 13, 2024

Conversation

tungsheng
Copy link
Contributor

@tungsheng tungsheng commented Nov 21, 2024

Description

The DocViewerTab component needs to be updated when the columns prop is updated.

This PR

  • Add the columns prop check in the shouldComponentUpdate lifecycle method.
  • Add unit test to test if component update when columns prop changed.

Issues Resolved

fixes

Screenshot

2024-11-20 20 19 49

Testing the changes

Changelog

  • fix: Fix toggle column action in the discover page

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
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 8905.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

@tungsheng tungsheng force-pushed the fix/8698-toggle-column branch from c72b308 to bf4cc6e Compare November 21, 2024 18:02
@tungsheng
Copy link
Contributor Author

tungsheng commented Nov 21, 2024

@abbyhu2000 Would you kindly help with the WhiteSource Security Check fail in this PR? Any required action on my side? Is there a way to re-run the checks? Thank you! 🙏

@tungsheng tungsheng changed the title [WIP] toggle column button in Doc Viewer Tab [WIP] Fix toggle column action in Doc Viewer Tab Nov 21, 2024
Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Signed-off-by: Tony Lee <[email protected]>
@abbyhu2000
Copy link
Member

@abbyhu2000 Would you kindly help with the WhiteSource Security Check fail in this PR? Any required action on my side? Is there a way to re-run the checks? Thank you! 🙏

let me re-run the check and see if it passes~

Copy link
Member

Choose a reason for hiding this comment

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

nice! Thanks for the unit test

abbyhu2000
abbyhu2000 previously approved these changes Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.84%. Comparing base (9f23442) to head (39f23f7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8905      +/-   ##
==========================================
- Coverage   60.87%   60.84%   -0.04%     
==========================================
  Files        3808     3808              
  Lines       91209    91209              
  Branches    14410    14410              
==========================================
- Hits        55526    55492      -34     
- Misses      32142    32222      +80     
+ Partials     3541     3495      -46     
Flag Coverage Δ
Linux_1 29.02% <ø> (ø)
Linux_2 ?
Linux_3 37.93% <ø> (+<0.01%) ⬆️
Linux_4 29.01% <ø> (ø)
Windows_1 29.03% <ø> (-0.02%) ⬇️
Windows_2 56.34% <ø> (ø)
Windows_3 37.93% <ø> (ø)
Windows_4 29.01% <ø> (ø)

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.

@tungsheng
Copy link
Contributor Author

@abbyhu2000 I am not sure how to trigger the WhiteSource Security Check from my side. Could you help review and trigger the check? or let me know what I can do to trigger, thank you for your help!

@tungsheng
Copy link
Contributor Author

@abbyhu2000 @sejli Would you kindly help look after this PR? Please do let me know if there's more changes/actions needed to get this PR merged. Thank you very much for your help! 🙏

@tungsheng
Copy link
Contributor Author

@abbyhu2000 @sejli @AMoo-Miki Just want to follow up with the PR review request. Please let me know the general process of working with the maintainer on merging a PR. I really appreciate your support!!

@sulabhjain-dev
Copy link

Thanks @tungsheng for moving this PR forward for review with OpenSearch Dashboards team.

We will also like to have it part of next OpenSearch Dashboards release as it is impacting critical customer workflow. It will be good to have it back-ported to 2.x branch.

@ananzh ananzh added backport 2.x v2.19.0 bug Something isn't working discover for discover reinvent labels Dec 13, 2024
@ananzh ananzh merged commit faa6b54 into opensearch-project:main Dec 13, 2024
76 of 77 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 13, 2024
* Update DocViewerTab if columns is changed
* Add unit test for DocViewerTab prop 'columns' changed
* Add changeset file
* Changeset file for PR #8905 created/updated
* Use the new license header

---------

Signed-off-by: Tony Lee <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Miki <[email protected]>
(cherry picked from commit faa6b54)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@tungsheng tungsheng deleted the fix/8698-toggle-column branch December 13, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working discover for discover reinvent first-time-contributor v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants