Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

[JS Addons] list addons from addons directory

Open krmanik opened this issue 4 years ago • 17 comments

Pull Request template

Purpose / Description

This is UI for addons listing in recycler view from addons directory. The list in view will contains details, remove and toggle switch button. Also addons menu added to side bar but it will be hidden till all the PR merged. The implementation will be used in next PR when addons listed from network for download and install.

Fixes

Fixes #7959

Approach

  1. dist package.json made empty when package.json loaded from local directory.
  2. Popup window class created to show info related the current clicked addons
  3. Added a class to list addons from directory, the validated AddonModel added to adapter
  4. Each view in list have three buttons details button - show popup with addons info like name, author, version etc. remove button - remove the addons from directory toggle switch - used to enable/disable addons, for enabled addons, the content will be added to reviewer or note editor

How Has This Been Tested?

Tested on emulator and devices. (Test will be added in next PR)

  1. Listing of empty folder
  2. Listing when one addon added manually (currently manually, in next PR download and install will be implemented)
  3. Info popup window test
  4. Toggle switch test
  5. Delete test

https://user-images.githubusercontent.com/12841290/164175561-6990f859-a3f0-4ed4-b61d-f0b2d174c4ee.mp4

Learning (optional, can help others)

Checklist

Please, go through these checks before submitting the PR.

  • [x] You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • [x] You have a descriptive commit message with a short title (first line, max 50 chars).
  • [x] Your code follows the style of the project (e.g. never omit braces in if statements)
  • [x] You have commented your code, particularly in hard-to-understand areas
  • [x] You have performed a self-review of your own code
  • [x] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • [x] UI Changes: You have tested your change using the Google Accessibility Scanner

krmanik avatar Apr 20 '22 07:04 krmanik

I think this is good idea to handle the addons related file/folder related from a centralized class. I will do refactor in next PR. (Added to TODO)

krmanik avatar Apr 24 '22 18:04 krmanik

I'm going to move this to draft just as a strategy to manage the PR review queue, and because I know you are focused on exams right now (as you should be!). Cheers

mikehardy avatar May 10 '22 15:05 mikehardy

I will update the PR later.

krmanik avatar May 11 '22 04:05 krmanik

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Jul 10 '22 05:07 github-actions[bot]

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Dec 12 '22 11:12 github-actions[bot]

Not stale - dormant because of too much work on my end and prioritizing scoped storage but this will all happen. JS addons are the future and this is the infrastructure...

mikehardy avatar Dec 13 '22 16:12 mikehardy

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Feb 16 '23 13:02 github-actions[bot]

Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Mar 05 '23 19:03 github-actions[bot]

The JS AddOn series needs to stay open. It is perfect for 2.17 once storage is finally done

mikehardy avatar Mar 05 '23 20:03 mikehardy

The JS AddOn series needs to stay open. It is perfect for 2.17 once storage is finally done

I will start implementing this after scope storage.

krmanik avatar Mar 06 '23 21:03 krmanik