revanced-manager icon indicating copy to clipboard operation
revanced-manager copied to clipboard

feat: flutter_screenutil integration, dpi responsive ui

Open schrobingus opened this issue 2 years ago • 11 comments

Details

This addresses issue #333 and the Reddit post here, fixing the issue of widgets overflowing on low resolution or very high DPI settings. It adds flexibility to a chunk of widgets available, and integrates flutter_screenutil to scale the text when needed.

schrobingus avatar Oct 06 '22 18:10 schrobingus

I will take a look at this later.

Aunali321 avatar Oct 07 '22 12:10 Aunali321

Screenshot_20221010-001640 Some ui elements are too small like button here. Please make sure UI elements are the size before and after your changes when tested on the same device.

Aunali321 avatar Oct 09 '22 18:10 Aunali321

That makes sense; I'll adjust that real quick. The hardest part is the Update Manager widget, as it has a very specific design that can't be handled by an ellipsis.

schrobingus avatar Oct 09 '22 19:10 schrobingus

@afnzmn can you test this and make sure the ui is same as our design?

Aunali321 avatar Oct 16 '22 06:10 Aunali321

Any updates on testing by chance?

schrobingus avatar Nov 07 '22 00:11 schrobingus

@Ushie is this PR ready to be merged?

Aunali321 avatar Nov 09 '22 07:11 Aunali321

@Ushie is this PR ready to be merged?

Yes and no, it doesn't pass the requirement you have of looking exactly the same, some values could probably be tinkered to achieve that like increase font size a bit, nevertheless I don't have the time for this PR and nobody seems to work on it, it works and if we can compromise on the exact look it's a-okay, just need to sort the merge conflict

Ushie avatar Nov 09 '22 07:11 Ushie

Just resolved some conflicts, which caused some errors in the scripts, I'll quickly fix those. I'll also see if I can edit some font sizes to look a bit better.

schrobingus avatar Nov 09 '22 08:11 schrobingus

flutter_screenutil will make UI look bigger in bigger devices and smaller in smaller devices. If device is very small fonts may become unreadable. We should try to make app responsive by updating its layout not by changing the widget size.

2shrestha22 avatar Nov 27 '22 05:11 2shrestha22

My opinion personally, I actually think the opposite. Padding and widget size isn't really being affected, moreso the size of the text itself, but at the moment, the text is too large on those smaller displays, even with layout optimizations (which I did indeed apply some), everything gets cramped quickly, and due to lack of optimization, results in a variety of overflow errors.

However, updating the layout is also a priority of this pull request as well, as not everything can be done with scaling, I'll prioritize that in this next commit.

schrobingus avatar Nov 28 '22 10:11 schrobingus

Finished the said commit. I have tweaked some of the values (along with simplifying some operations, redoing layout optimizations, and bringing it up to speed from the old conflicts), so it should look closer to how one would expect. :^)

I'll admit, I did go a bit overboard with the integration initially, so I have toned down a lot of the dynamic scaling, particularly in areas that don't acutally need it, such as the settings section.

schrobingus avatar Nov 29 '22 00:11 schrobingus

Is there any issue with this commit holding it from getting merged?

As far as I'm aware, not really, I don't know what's stopping it at this point.

If it is to be merged, I'll need to bring it back up to speed by resolving the conflicts (which I can definitely do), but first, I want to make sure that the maintainers are going through with this, since this PR doesn't seem to be of priority.

schrobingus avatar May 14 '23 09:05 schrobingus

I'll take a second look when you resolve the conflicts, could you try making it look as close as the existing ReVanced Manager though? if I remember correctly, text sizes were decently smaller last time I checked this out

Ushie avatar May 17 '23 07:05 Ushie

@BrentBoyMeBob can we have the conflicts resolved and then request for another review?

I'll be on it. I'll also try and make sure it aligns with typical text sizes with some tweaks, as well as the original design.

schrobingus avatar May 23 '23 14:05 schrobingus

The old code doesn't quite fit with the current codebase anymore, and had some glaring issues, so I'm currently going to redo it. Will reopen when I'm committing again.

schrobingus avatar Jun 03 '23 17:06 schrobingus

Sounds good

Ushie avatar Jun 03 '23 18:06 Ushie

There are still a lot of overflow issues, but I don't know if flutter_screenutil is even necessary after re-evaluating, especially since there have been some changes in cleanliness for the layout since then, and font size isn't really the issue after inspection, it's how the text is handled in relation to the scale that causes them. Plus, it's much easier to manage without since font size is effectively unaffected, so it still will look visually the same on lower DPI devices.

To be honest, a lot of these can be solved with fixes that are conscious to screen size, such as adapting the often noted "Patched Applications" section to some tweaks with LayoutBuilder. I'm on that right now 👍

schrobingus avatar Jul 01 '23 11:07 schrobingus

@Ushie How does this look? I decided to go through with removing flutter_screenutil from the commit entirely, and now it mainly readjusts the layout depending on the room given in widgets, which should mean that devices with conventional screen sizes and DPI should look the same as before, whilst making the needed changes to more zoomed in ones.

schrobingus avatar Jul 27 '23 20:07 schrobingus

@TheAabedKhan Could you please take a look at this PR? it achieves better responsive UI which has been an issue in ReVanced Manager for smaller-sized devices where components end up going out of their containers and unusable

Ushie avatar Jul 27 '23 20:07 Ushie

@TheAabedKhan All of your suggestions have worked perfectly it seems, including the larger application_item block, so I've applied them in the newest commit.

schrobingus avatar Jul 28 '23 17:07 schrobingus

@Ushie Any final suggestions before merge?

validcube avatar Jul 31 '23 08:07 validcube

Did you test all pages?

  • App selector
  • Patches selector
  • Installer
  • Settings
  • Dialogs in settings

Ushie avatar Jul 31 '23 09:07 Ushie

Did you test all pages?

  • App selector
  • Patches selector
  • Installer
  • Settings
  • Dialogs in settings

@validcube have you tested the above mentioned pages?

Did you test all pages?

  • App selector
  • Patches selector
  • Installer
  • Settings
  • Dialogs in settings

@validcube have you tested the above mentioned pages?

Planning to test it today, I'm not at home at the moment

validcube avatar Aug 03 '23 05:08 validcube

Low and behold, the long awaited merge, thank you lots @BrentBoyMeBob for your patience and I'm glad to see your PR finally ship after such a long time in review, sorry about that!

Ushie avatar Aug 03 '23 21:08 Ushie