ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.48k stars 2.2k forks source link

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

Open david-allison opened 6 months ago

david-allison commented 6 months ago

[!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:

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'


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


The following are missing permissions

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:


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](https://www.howtogeek.com/339665/how-to-find-your-android-devices-info-for-correct-apk-downloads/)


**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

NameLessGO commented 6 months ago

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

david-allison commented 6 months ago

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)

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

NameLessGO commented 6 months ago

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

ABI info in CPU > ABI

david-allison commented 6 months ago

Beautiful stuff!

Screenshot 2024-03-18 at 15 56 27
NameLessGO commented 6 months ago

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?

david-allison commented 6 months ago

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

Aditya13s commented 6 months ago

@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?

david-allison commented 6 months ago

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
Aditya13s commented 6 months ago

@david-allison current list is alphabetically ordered

david-allison commented 6 months ago

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

Aditya13s commented 6 months ago

I am looking into this issue, please assign me.

Aditya13s commented 6 months ago

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

david-allison commented 6 months ago

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

Aditya13s commented 6 months ago

What about Roman Numerals?

david-allison commented 6 months ago

Something 'obvious' to the users.

I think we can use dev- for

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

Aditya13s commented 6 months ago

dev- is good to use

david-allison commented 6 months ago

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:

Aditya13s commented 6 months ago

Looking good to me. We can try this.

david-allison commented 6 months ago

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](https://www.howtogeek.com/339665/how-to-find-your-android-devices-info-for-correct-apk-downloads/)


**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

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 commented 6 months ago

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

mikehardy commented 6 months ago

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

david-allison commented 5 months ago

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

Aditya13s commented 5 months ago

@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

david-allison commented 5 months ago

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

Aditya13s commented 5 months ago

Is there anything which i can do?

david-allison commented 5 months ago

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

david-allison commented 5 months ago

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

Giyutomioka-SS commented 3 months ago

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

david-allison commented 3 months ago

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 commented 1 month ago

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

Aditya13s commented 1 month ago

I am working on it. @david-allison

david-allison commented 1 month ago

It's been months, what's the status and what're the next steps?