MuntashirAkon / AppManager

A full-featured package manager and viewer for Android
https://muntashirakon.github.io/AppManager/
Other
4.88k stars 277 forks source link

Multi tab Code Editor #1073

Open shuvashish76 opened 1 year ago

shuvashish76 commented 1 year ago

Please check before submitting an issue

Describe a description of the new feature

Feature request for an option to view/search/edit multiple files at the same time with AM Code Editor. This feature will be useful for multitasking for various purpose.

Describe the solution you'd like

Something similar to ๐Ÿ‘‡๐Ÿฟ Acode multi_tab

Screenshot source: Acode | F-Droid

Describe alternatives you've considered

No response

Additional context

Currently AM supports only creating new file, there is no option to open your files from device storage. Option to use open_with & share_to AM Code Editor would be nice.

App version : 3.2.0-alpha01-DEBUG (433)

MuntashirAkon commented 1 year ago

In Android, multitasking should done by maintaining separate tasks for each file, and letting the Android handle the tasks for you. Tabs like this aren't a good idea as a result for phones, at least.

Currently AM supports only creating new file, there is no option to open your files from device storage. Option to use open_with & share_to AM Code Editor would be nice.

Implemented in 48e3bcee71b5eddab276e3a2fb499226f8cbc1ee

shuvashish76 commented 1 year ago

Since I am not a dev, I can't comment how useful this feature is from the productivity point of view. But I've been using it for the last 2 days and found it super useful. (on phone)

Seems only exception to mutitab feature on Android is Browser apps but that would be a lame example in this case hence doesn't count.

MuntashirAkon commented 1 year ago

Since I am not a dev, I can't comment how useful this feature is from the productivity point of view. But I've been using it for the last 2 days and found it super useful. (on phone)

I've never really found any use of opening multiple editor window. So, it will take some time to perform a feasibility study, especially, because this has different implications in different devices and a few other features (eg. File Manager) also depend on the decision taken here. At present, I think, multiple tasks is more convenient in phones, and tabbed windows are more convenient in tablets and TVs. I've never used a tablet. So, I don't know how multi-tab feature of Chromium works in a tablet, but if tabs are to be used, it should be kept in mind that the number of tabs cannot be infinite for code editor because of the amount of memory required for each tab. Browsers and IDEs usually prevent high memory usage by removing the least recently used (LRU) tabs automatically from memory depending on thresholds (tab limit, memory limit, etc.). But even major IDEs (developed by experienced engineers) such as IntelliJ IDEA/Android Studio cannot always control memory usage resulting in huge memory footprint. On the other hand, when multiple tasks are used, Android can decide which tasks to drop making it easier to manage memory usage. So, I can't yet decide anything about this.

shuvashish76 commented 1 year ago

Few other features (eg. File Manager) also depend on the decision taken here. At present, I think, multiple tasks is more convenient in phones, and tabbed windows are more convenient in tablets and TVs.

AFM devs said exactly opposite of it when I requested for tasks view. According to them Android was never really made for managing tasks (from the same app) from device recents. Though IIRC Google use tasks view for their Gmail, Drive... apps. Here is their initial workspace design idea.

It will take some time to perform a feasibility study.

Agreed๐Ÿ‘๐Ÿฟ, I'm not 100% sure about this feature as I've never seen any apps use it.

shuvashish76 commented 1 year ago

Also have a look at how Krita manages their layers/workspace (only technical aspects of it not design). They use it for different purpose but works without any issue on my 3GB RAM tablet.

MuntashirAkon commented 1 year ago

Also have a look at how Krita manages their layers/workspace (only technical aspects of it not design). They use it for different purpose but works without any issue on my 3GB RAM tablet.

Last time I checked, it was unusable in my phone.

AFM devs said exactly opposite of it when I requested for tasks view. According to them Android was never really made for managing tasks (from the same app) from device recents. Though IIRC Google use tasks view for their Gmail, Drive... apps. Here is their initial workspace design idea.

I've never used tablets. But I've used both phone and TV. In a phone, using a multitab display used to be trivial when there was no gesture navigation (having a multitab display allows you to swipe right and left to get to the next or previous tab which is no longer an issue). But it doesn't just go well with minimalist/material design. But for TV, there are no visible task list. So, there's no choice available there at all (AM so far haven't actively tried to make things right for TV, but that AM supports Android TV should be an encouraging thought). IMO, some of your proposed amendments are better as they focus on UX without compromising UI. However, I do not believe that Chromium tabs are any good in Android as I tend to use preview and tab group a lot more than the actual tabs as I find them inconvenient to access. I think Chromium org decided to implement tabs this way because they have to account for a lot of UI interactions via JavaScript, and providing basic features such as swiping back and forth would intercept those interactions which they cannot simply allow it as per W3C specification. IMO, tabs or tasks whatever you call them should have the following features:

  1. Easy accessibility via swipe gesture (swipe right/left to move to the previous/next tab in a non-circular manner, ask user to open a new tab if end reached on any side)
  2. List most recently used tabs on top (default behaviour, but there should be an option to disable it as some people dislike it or simply have mental disorders which prevent them from keeping track of tabs), no other ordering is necessary and would simply be a waste of time and effort
  3. The list itself should be easy to access (the list items should be accessible from the bottom, this could be a button to open the list or a list of most recently used tabs along with a button to open the full list or simply a tab layout)
  4. List items should be easy to understand (must contain textual and/or graphical information that would allow a user to easily recognise the tab)
  5. List items should be easy to delete/close with an option to undelete/unclose it
  6. List items should be easy to find if there are too many items in the list
  7. It should be easy to create/insert a new item in the list
  8. Some list items should be able to be pinned to prevent deletion and allow continuation in a new session eg. process recreation (as opposed to disregarding all the tasks or continuing with everything from the last session)
  9. Open with functionality, if present, should prefer opening the newly created tab than sticking with the old tab (but can be modified in a preference)