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

Add Drag & Drop Across Axis Functionality to Vis Builder #7107

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

LDrago27
Copy link
Collaborator

@LDrago27 LDrago27 commented Jun 25, 2024

Description

This change aims to enhance the drag and drop functionality present within Vis-Builder. The enhancements are

  • Users can drag a new field from left panel and drop it over an existing field (replacing the existing field)
  • User can move a selected field from one axis to an empty axis
  • User can move a selected field from one axis to another axis replacing an existing field.

To support the Drag and Drop functionality the custom Drag and Drop containers were converted to Draggable and Droppable Components (part of OUI). Besides the OUIAccordion didn't support Dragging of the elements present within the accordion hence instead of using it a custom version of Accordion was used.

Issues Resolved

#7015

Screenshot

EditedEnhancementVisBUilder.mp4

Testing the changes

Changelog

  • feat: Enhance Drag & Drop functionality in Vis Builder

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

❌ 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.

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.

opensearch-changeset-bot bot added a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jun 25, 2024
opensearch-changeset-bot bot added a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jun 25, 2024
Copy link

codecov bot commented Jun 25, 2024

Codecov Report

Attention: Patch coverage is 10.55901% with 144 lines in your changes missing coverage. Please review.

Project coverage is 67.54%. Comparing base (60ecd36) to head (2236da3).

Files Patch % Lines
...r/public/application/components/data_tab/index.tsx 0.00% 39 Missing ⚠️
...ta_tab/drag_drop/replace_field_in_configuration.ts 0.00% 23 Missing ⚠️
...s/data_tab/drag_drop/move_field_between_schemas.ts 0.00% 18 Missing ⚠️
...mponents/data_tab/utils/get_valid_aggregations.tsx 21.73% 18 Missing ⚠️
...s/data_tab/drag_drop/add_field_to_configuration.ts 0.00% 13 Missing ⚠️
...data_tab/drag_drop/reorder_fields_within_schema.ts 0.00% 11 Missing ⚠️
...pplication/components/data_tab/use/use_dropbox.tsx 0.00% 11 Missing ⚠️
...public/application/components/data_tab/dropbox.tsx 0.00% 9 Missing ⚠️
...c/application/components/data_tab/config_panel.tsx 0.00% 1 Missing ⚠️
...lication/components/data_tab/schema_to_dropbox.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7107      +/-   ##
==========================================
- Coverage   67.63%   67.54%   -0.09%     
==========================================
  Files        3471     3477       +6     
  Lines       68640    68757     +117     
  Branches    11174    11204      +30     
==========================================
+ Hits        46423    46443      +20     
- Misses      19511    19608      +97     
  Partials     2706     2706              
Flag Coverage Δ
Linux_1 33.24% <10.55%> (-0.07%) ⬇️
Linux_2 55.30% <ø> (ø)
Linux_3 45.26% <ø> (ø)
Linux_4 34.69% <ø> (ø)
Windows_1 33.28% <10.55%> (-0.05%) ⬇️
Windows_2 55.25% <ø> (ø)
Windows_3 45.27% <ø> (ø)
Windows_4 34.69% <ø> (ø)

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.

@LDrago27 LDrago27 force-pushed the pocDragDropMigration branch 2 times, most recently from 6e1483e to 56e4202 Compare June 26, 2024 00:03
@LDrago27 LDrago27 changed the title Add Drag Across Axis Functionality to Vis Builder Add Drag & Drop Across Axis Functionality to Vis Builder Jun 26, 2024
opensearch-changeset-bot bot added a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jun 26, 2024
@LDrago27 LDrago27 force-pushed the pocDragDropMigration branch 5 times, most recently from 4b31db9 to bd08a03 Compare June 27, 2024 17:53
@LDrago27 LDrago27 marked this pull request as ready for review June 27, 2024 18:38
ananzh
ananzh previously approved these changes Jul 1, 2024
opensearch-changeset-bot bot added a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jul 1, 2024
ananzh
ananzh previously approved these changes Jul 1, 2024
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Really nice PR. I just had a few minor comments. Let em know once you have responded or addressed them and this change should be good to go

ashwin-pc
ashwin-pc previously approved these changes Jul 15, 2024
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Nice, thanks for the changes. Wont block on it, but the newly added functions could use tests. I'll be happy to reapprove it if you can let me know once you have added the tests.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add tests for this file?

Copy link
Member

Choose a reason for hiding this comment

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

Can you add tests for this function?

Copy link
Member

Choose a reason for hiding this comment

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

Can you add tests for this function?

Copy link
Member

Choose a reason for hiding this comment

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

Can you add tests for this function?

ananzh
ananzh previously approved these changes Jul 15, 2024
opensearch-changeset-bot bot added a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jul 15, 2024
@opensearch-changeset-bot opensearch-changeset-bot bot dismissed stale reviews from ananzh and ashwin-pc via 86ce1a5 July 15, 2024 17:37
@LDrago27 LDrago27 merged commit 27669cf into opensearch-project:main Jul 16, 2024
65 of 67 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 16, 2024
* Add Drag Across Axis Functionality to Vis Builder

Signed-off-by: Suchit Sahoo <[email protected]>

* Changeset file for PR #7107 created/updated

---------

Signed-off-by: Suchit Sahoo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 27669cf)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
LDrago27 pushed a commit that referenced this pull request Jul 22, 2024
* Add Drag Across Axis Functionality to Vis Builder



* Changeset file for PR #7107 created/updated

---------



(cherry picked from commit 27669cf)

Signed-off-by: Suchit Sahoo <[email protected]>
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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 23, 2024
* Add Drag Across Axis Functionality to Vis Builder

* Changeset file for PR #7107 created/updated

---------

(cherry picked from commit 27669cf)

Signed-off-by: Suchit Sahoo <[email protected]>
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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit b1e5237)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ananzh added a commit that referenced this pull request Jul 24, 2024
…) (#7416)

* Add Drag Across Axis Functionality to Vis Builder

* Changeset file for PR #7107 created/updated

---------

(cherry picked from commit 27669cf)





(cherry picked from commit b1e5237)

Signed-off-by: Suchit Sahoo <[email protected]>
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>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Anan Zhuang <[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.

3 participants