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

Implement Drag & Drop Support for TEXT/CSV Files in DeckPicker #17865

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

SanjaySargam
Copy link
Contributor

Purpose / Description

Implement Drag&Drop TEXT file in DeckPicker

Fixes

Approach

Modify the drag-and-drop handler to check for .txt and .csv files. If valid, call the onSelectedCsvForImport function to handle the import process.

How Has This Been Tested?

Physical Device ( Redmi Note 11 )

WhatsApp.Video.2025-01-25.at.1.46.32.AM.mp4

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Looks good, cheers!

Is this feasible to test, or could a @NeedsTest be added

AnkiDroid/src/main/java/com/ichi2/utils/ImportUtils.kt Outdated Show resolved Hide resolved
@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jan 26, 2025
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

No need to re-request approval if only minor changes are made, still good to go :)

@BrayanDSO BrayanDSO added the Needs Author Reply Waiting for a reply from the original author label Jan 29, 2025
@SanjaySargam SanjaySargam removed the Needs Author Reply Waiting for a reply from the original author label Jan 30, 2025
@SanjaySargam SanjaySargam force-pushed the text branch 2 times, most recently from 39b42f3 to 167b3b9 Compare February 1, 2025 10:44
@SanjaySargam
Copy link
Contributor Author

Unit tests deferred for a faster merge; will be added later.

@BrayanDSO BrayanDSO added the Needs Author Reply Waiting for a reply from the original author label Feb 5, 2025
@SanjaySargam SanjaySargam removed the Needs Author Reply Waiting for a reply from the original author label Feb 8, 2025
@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Feb 8, 2025
@BrayanDSO BrayanDSO added this pull request to the merge queue Feb 8, 2025
Merged via the queue into ankidroid:main with commit 3c181ef Feb 8, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Feb 8, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Feb 8, 2025
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.

[Feature Request] Implement Drag&Drop TEXT file in DeckPicker
3 participants