JGeek00 / droid-hole

Pi-hole® client made with Flutter
Apache License 2.0
135 stars 11 forks source link

IPs in home tab are truncated when shown in 2 columns #7

Closed 7wells closed 1 year ago

7wells commented 1 year ago

Hello Geek00!

The IPs in the home tab are truncated when shown in 2 columns. If I set this to 1 column via the advanced settings, it's ok, but maybe you would like to consider adjusting the margins and/or font size just a bit to show the IPs completely also in 2 columns? Besides, in the advanced settings, could you maybe append to the already existing explanation "Use only one column for the legend" the text " on the home tab"? Where in the code are the strings? Do you want to have some help with translations? I could offer German, if you think it's worth it.

The bullets of the IPs in the home tab have different colors than the bullets of the same IPs shown in the statistics tab. Would it make sense to use the same colors? How are the IPs sorted in the home tab?

I would like to contribute (if you allow), know how to get along with GitHub, and have some very basic experience with VS (Windows 10 Pro, but I can set up a dev & build environment under Linux, too). My programming skills are very basic but maybe I can still be of help. Do you have some recommendation regarding how/what to set up if I could help? Thank you so much - and please accept my apologies that I got a bit OT here with regard to the subject. ;-)

Cheers 7wells

JGeek00 commented 1 year ago

Hi @7wells! I could try to reduce the margins or font size to fit the full IP address but that depends on the display size. I can't gurarantee that the IP will be displayed without being truncated on every device. If you want, tell me the display size and resolution of your device, so I can test it. Regarding the one column legend label, I will consider changing it. And about the colors of the bullets, i will explain you why that happens. On the statistics tab, there are only 10 clients, so I can define an array of colors to have every time the same order of colors. But on the chart at the home screen, there can be as many clients as de user has, so I am using a funtion to generate a random color for every client. I can't define an array of colors for the clients of that chart because one user could have only 10 clients, but another use could have 200 clients. But for the clients that appear on both places, I could try to assign the same color from the colors array, and for the clients that only appear on the home screen chart, generate a random color.

I highly appreciate your intention to contribute adding the German translation. For doing that, you don't need to have experience programming, because it's only translating some strings, but you will need to setup the development environment and the project on your computer. Windows 10 is ok for this, because you aren't going to compile the application, and for testing it you can do it with the Android emulator (you will need to install Android Studio). If you want to take a look about how the translations file looks, you have it inside lib/l10ndirectory. If you finally want to do the translation, let me know, so I will open a new issue for that adding there the instructions of how to do it.

7wells commented 1 year ago

Hi @JGeek00

Thanks a lot again for your detailed reply! My device has a screen resolution of 1080x2400 pixels. I don't know the density - do you need it?

I will look into Android Studio and the translation files.

Have a good Sunday! :-)

JGeek00 commented 1 year ago

I just only need the display size and the resolution. Also, I have done what you told me about matching the same colors for the same IPs on statistics and devices chart at homescreen (this only works if you don't have given a custom name to a decice) and changing the description for the reduced data option.

Have a nice Sunday too 😃

7wells commented 1 year ago

@JGeek00 I've forked your repo and have started with the translation locally - and created a new "issue" https://github.com/JGeek00/droid-hole/issues/8 for translation-related questions, hoping you don't mind. :-)

JGeek00 commented 1 year ago

That's ok.

JGeek00 commented 1 year ago

Changes applied in v3.0.2