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

feat(side-panel): Add functionality of order tables by drag & drop #425

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

Zer0S2m
Copy link
Contributor

@Zer0S2m Zer0S2m commented Nov 19, 2024

This PR solves the following issue #393.

Reorder tables.

Mechanism:

  1. When creating a new table, the order parameter is assigned the value 9999.
  2. When moving any table to a new position, all other tables change their index depending on the moved table.

The following functions have been tested:

  1. Exporting the database to a JSON file
  2. Importing a database from a JSON file

Preview:

preview_0

preview_1

preview_2

@Zer0S2m Zer0S2m changed the title The functionality of dragging and dropping DB The functionality of dragging and dropping tables DB Nov 19, 2024
@Zer0S2m Zer0S2m marked this pull request as ready for review November 19, 2024 17:46
@Zer0S2m Zer0S2m mentioned this pull request Nov 19, 2024
@guyb1 guyb1 force-pushed the feat-reorder-tables branch from fed7a93 to bc66315 Compare November 27, 2024 18:14
@guyb1
Copy link
Contributor

guyb1 commented Nov 27, 2024

Hey @Zer0S2m, thank you so much for your effort here! I just tested it, and it looks and works fantastic! 🎉

I made a few adjustments, including consolidating the sorting logic into a single place (rather than both in the storage provider and the table-list component) and updating the table schema in the database.

I’ll run a few additional tests to ensure everything works seamlessly and will merge it soon.

Thanks again for your valuable contribution! 🚀

@guyb1 guyb1 linked an issue Nov 27, 2024 that may be closed by this pull request
@guyb1 guyb1 changed the title The functionality of dragging and dropping tables DB feat(side-panel): Add functionality of order tables by drag & drop Nov 27, 2024
@guyb1 guyb1 merged commit a0e966b into chartdb:main Nov 28, 2024
1 check passed
@guyb1 guyb1 mentioned this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: reorder tables
2 participants