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

[Enhancement] Reorder assets [apks] on GitHub releases page & update descriptions

Open david-allison opened this issue 11 months ago • 29 comments

[!WARNING] We should not rename past files, as this breaks links

Reference page: https://github.com/ankidroid/Anki-Android/releases/tag/v2.17.6

Currently, the order of our GitHub releases is:

  • AnkiDroid-2.17.6-amazon-universal.apk
  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-armeabi-v7a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6-play-universal.apk
  • AnkiDroid-2.17.6-x86.apk
  • AnkiDroid-2.17.6-x86_64.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk

https://github.com/ankidroid/Anki-Android/releases/tag/v2.17.6

Ordering issues

The following ABIs are VERY rarely used nowadays. Almost all are arm64-v8a. These should be 'below the fold'

  • AnkiDroid-2.17.6-x86.apk
  • AnkiDroid-2.17.6-x86_64.apk
  • AnkiDroid-2.17.6-armeabi-v7a.apk

The following is good for newbies (as it means they don't need to know the ABI), but is MUCH larger:

  • AnkiDroid-2.17.6-full-universal.apk

The following are missing permissions

  • AnkiDroid-2.17.6-amazon-universal.apk - no CAMERA
  • AnkiDroid-2.17.6-play-universal.apk - no MANAGE_EXTERNAL_STORAGE

Resolution

We should reconsider this order and fix our release script

In addition, we should simplify our release notes on the page.


I would propose the order:

  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk
  • AnkiDroid-2.17.6-play-universal.apk
  • AnkiDroid-2.17.6-armeabi-v7a.apk
  • AnkiDroid-2.17.6-x86.apk
  • AnkiDroid-2.17.6-x86_64.apk
  • AnkiDroid-2.17.6-amazon-universal.apk

Description

See if you can do better than this:

Current Description

For regular users:

Install the main APK below, trying the 'full-universal' build first for new installs. If it refuses to install and run correctly or you have previously installed from the Play Store, you must pick the APK that matches CPU instruction set for your device.

This will be arm64-v8a for most phones from the last few years but here is a guide to help you choose


For testers and multiple profiles users:

The builds with 'full', 'play' or 'amazon' are useful for testing our builds for different app stores.

The builds with letter codes below (A, B, etc) are universal parallel builds. They will install side-by-side with the main APK for testing, or to connect to a different AnkiWeb account in combination with changing the storage directory in preferences

EDIT: See comments by @NameLessGO at the start of this thread for great suggestions

Implementation

I suspect that this code needs to be changed https://github.com/ankidroid/Anki-Android/blob/8585c1142f8fcd1265e850c97edd921a418d888c/tools/release.sh#L178-L213

obsolete

You should first investigate whether the GitHub API allows us to reorder uploaded files for releases (assets)

A comment on the issue should be added detailing the outcome of your investigation

Depending on the result of the investigation, you should either:

  • (If reordering is possible): Use the functionality to reorder the assets after upload
  • (If reordering is not possible): Modify the above code to order the assets in the provided order

The file name determines the display order of the files

david-allison avatar Mar 18 '24 14:03 david-allison

Suggestion:

Try "arm64-v8a" build first for new installs. If it refuses to install and run correctly, then you must pick the APK that matches CPU instruction set for your device. here is a guide to help you choose

NamelessGO avatar Mar 18 '24 15:03 NamelessGO

That guide is really low quality in terms of information density. Do we have anything better?

The link to the app is dodgy (3 separate link redirects blocked by uBlock, one of which had a ton of malware-related Google results)

  • https://play.google.com/store/apps/details?id=com.inkwired.droidinfo is also somewhat dodgy (in-app purchases & ads?). Plus: This app is not available for any of your devices

I'd quickly be able to hack up a much better app and add it to F-Droid, it should only be a couple of lines of code to get the funtionality which we require.

I suspect an app like this would be out there if we looked for a little while

david-allison avatar Mar 18 '24 15:03 david-allison

Yes, there is https://github.com/kamgurgul/cpu-info for Play store, Fdroid, Huawei, and Amazon

ABI info in CPU > ABI

NamelessGO avatar Mar 18 '24 15:03 NamelessGO

Beautiful stuff!

Screenshot 2024-03-18 at 15 56 27

david-allison avatar Mar 18 '24 15:03 david-allison

Then for the webpage, we can make a documentation/Wiki with the screenshot and redirect users from release to there

Should make in FAQ or Development?

NamelessGO avatar Mar 18 '24 15:03 NamelessGO

I don't know if we need to bother, it replaces the article you linked above with a sentenance

david-allison avatar Mar 18 '24 16:03 david-allison

@david-allison we can also try to give numbering to files in start in the order in which we need to arrange. Is this a good approach?

Aditya13s avatar Mar 18 '24 18:03 Aditya13s

I don't know; I doubt it as the current list isn't alphabetically ordered

You should first investigate whether the GitHub API allows us to reorder uploaded files for releases (assets)

A comment on the issue should be added detailing the outcome of your investigation

Depending on the result of the investigation, you should either:

  • (If reordering is possible): Use the functionality to reorder the assets after upload
  • (If reordering is not possible): Modify the above code to order the assets in the provided order

david-allison avatar Mar 18 '24 18:03 david-allison

@david-allison current list is alphabetically ordered

Aditya13s avatar Mar 19 '24 16:03 Aditya13s

🤦‍♂️ I... should have taken advice and taken yesterday off. Totally right. Let's give it a go!

david-allison avatar Mar 19 '24 19:03 david-allison

I am looking into this issue, please assign me.

Aditya13s avatar Mar 19 '24 19:03 Aditya13s

@david-allison I searched about the issue but i think there is no option for reordering. Other way to do this is to give numbering in the start of each file to arrange them according to our needs.

Aditya13s avatar Mar 20 '24 08:03 Aditya13s

I don't particularly like numbering, are there any other prefixes which we can provide which an end-user would understand which also match alphabetical order?

For example: we currently have a difference of . or - which affects the order

Or:

Screenshot 2024-03-20 at 08 55 27

david-allison avatar Mar 20 '24 08:03 david-allison

What about Roman Numerals?

Aditya13s avatar Mar 20 '24 08:03 Aditya13s

Something 'obvious' to the users.

I think we can use dev- for

  • dev-AnkiDroid-2.17.6-play-universal.apk
  • dev-AnkiDroid-2.17.6-amazon-universal.apk

I'm not sure about the split ABIs yet, in the process of asking my LLM for suggestions. I want a word which isn't complex, fairly short, and conveys 'this may be useful in rare circumstances if you're using an old phone'.

  • variant-abi - I think this is my favourite
  • obsolete
  • alterntative

david-allison avatar Mar 20 '24 09:03 david-allison

dev- is good to use

Aditya13s avatar Mar 20 '24 09:03 Aditya13s

I want something obvious to users who may not be too technical.

For ABI splits: Ideally a word which isn't complex, fairly short, and conveys 'this may be useful in rare circumstances if you're using an old phone'.

I think this is a good solution/ordering:

  • AnkiDroid-2.17.6-arm64-v8a.apk
  • AnkiDroid-2.17.6-full-universal.apk
  • AnkiDroid-2.17.6.parallel.A.apk
  • AnkiDroid-2.17.6.parallel.B.apk
  • AnkiDroid-2.17.6.parallel.C.apk
  • AnkiDroid-2.17.6.parallel.D.apk
  • AnkiDroid-2.17.6.parallel.E.apk
  • dev-AnkiDroid-2.17.6-play-universal.apk
  • dev-AnkiDroid-2.17.6-amazon-universal.apk
  • variant-abi-AnkiDroid-2.17.6-armeabi-v7a.apk
  • variant-abi-AnkiDroid-2.17.6-x86.apk
  • variant-abi-AnkiDroid-2.17.6-x86_64.apk

david-allison avatar Mar 20 '24 09:03 david-allison

Looking good to me. We can try this.

Aditya13s avatar Mar 20 '24 09:03 Aditya13s

Great!

I think the only other task would be to simplify the description

Current Description

For regular users:

Install the main APK below, trying the 'full-universal' build first for new installs. If it refuses to install and run correctly or you have previously installed from the Play Store, you must pick the APK that matches CPU instruction set for your device.

This will be arm64-v8a for most phones from the last few years but here is a guide to help you choose


For testers and multiple profiles users:

The builds with 'full', 'play' or 'amazon' are useful for testing our builds for different app stores.

The builds with letter codes below (A, B, etc) are universal parallel builds. They will install side-by-side with the main APK for testing, or to connect to a different AnkiWeb account in combination with changing the storage directory in preferences


Proposed Description

[!IMPORTANT] GitHub does not auto-update apps

For regular users

Install arm64-v8a below. If it fails to install, use Parallel.A

Parallel builds install side-by-side with the main APK, allowing you to use different settings and profiles (via the AnkiDroid directory advanced setting & a different AnkiWeb login)

For testers

The builds with full, play and amazon are useful for testing our builds for different app stores

  • full: F-Droid & GitHub Parallel apks
  • play: Google Play - missing MANAGE_EXTERNAL_STORAGE [app data is deleted on uninstall]
  • amazon: Amazon - missing CAMERA

ABI variants

We perform ABI splits to reduce APK size. In rare cases, a phone may not be using the arm64-v8a ABI. You can find your phone's ABI using kamgurgul/cpu-info. If disk space isn't an issue, use the full apk

david-allison avatar Mar 20 '24 09:03 david-allison

@mikehardy pinging for a quick pre-review, I may have over-simplified the explanation

david-allison avatar Mar 20 '24 09:03 david-allison

I think this is great - it's a significant improvement on the big text blob I hacked up in a hurry and haven't touched since 🙈

+1 on all of it

mikehardy avatar Mar 21 '24 02:03 mikehardy

@Aditya13s Any progress here? Would be great to get this in for 2.18

david-allison avatar Apr 18 '24 04:04 david-allison

@Aditya13s Any progress here? Would be great to get this in for 2.18

I've looked into it, and it seems that when we upload assets , GitHub automatically sorts them in alphabetically order. We have to manually rename the assets

Aditya13s avatar Apr 18 '24 14:04 Aditya13s

We have control over the names and can change them in our release script

david-allison avatar Apr 18 '24 14:04 david-allison

Is there anything which i can do?

Aditya13s avatar Apr 18 '24 14:04 Aditya13s

You're assigned the issue, the 'Implementation' section lists the relevant script

david-allison avatar Apr 18 '24 15:04 david-allison

@Aditya13s Any progress here? Would be great to get this in for 2.18

david-allison avatar Apr 28 '24 08:04 david-allison

@david-allison Can I work on this issue? Where do we need to make the changes, and what exactly is needed?

Giyutomioka-SS avatar Jun 18 '24 19:06 Giyutomioka-SS

release.sh needs to be updated. The file is linked in the main issue description

The ideal ordering and release description are included in comments of this issue

david-allison avatar Jun 18 '24 19:06 david-allison

Good first issue, so I won't take this on

david-allison avatar Aug 04 '24 00:08 david-allison