osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.54k stars 1k forks source link

regression. color palette is much reduced #20255

Closed pebogufi closed 1 month ago

pebogufi commented 1 month ago

Description

A lot of colors are lost, default colors and user defined

Steps to reproduce

set a color of a poi

Actual result

Only 5 colors available

Expected result

My existing colors available (much more)

Your Environment (required)

OsmAnd Version: OsmAnd~ 4.8.0#2694m, veröffentlicht: 2024-07-06 Android version: 12 Device model: samsung S10

pebogufi commented 1 month ago

I made same investigations. I found this color formats in color handling, in example all with same color, bright yellow. (1) Color palette (FFEEEE10), first two digits are transparency (2) favorit, extension group def (color="#eeee10") (3) new file user_palette_default.txt (5.0,238,238,16,255)

The first two formats are the same, (1) with leading transparency, (2) without transparency. With Color palette it is possible to import or export color with the hex code via clipboard. So a user is able to get a special color from a different installation or source and import it via Color palette or export for different use. This is a very nice feature ! Unfortunately the new file "user_palette_default.txt" does NOT use hex format for RGB coding.

My recommendation: -1 please use new file user_palette_default also in xml format, then the coding format will be the same and transferable/interchangable between different installations or purpose.

-2 after installing a older version (about 4 weeks old), all my colors are back !! So it is obvious, that all my "old" colors are somewhere in the database. Please convert all existing colors to new version !

yuriiurshuliak commented 1 month ago

The bug was not reproduced. Try adding a Favorite and check the number of available colors in the settings during setup. I found that there were more than five colors available.

OsmAnd~ 4.8.0#2700m, released: 2024-07-08

https://github.com/osmandapp/OsmAnd/assets/127092082/4ad1cd2e-6f71-4459-894d-5540f74748a0

pebogufi commented 1 month ago

I suppose the problem occured after installing several nightlys during some days or weeks, while the new color handling was created. If you remove the file "user_palette_default.txt" the color palette is empty. Currently i get it work.

Please have a look on my ideas above in second posting...

My recommendation: -1 please use new file user_palette_default also in xml format, then the coding format will be the same and transferable/interchangable between different installations or purpose.

nazar-kutz commented 1 month ago

@pebogufi It seems like You already had old "user_palette_default.xml" file that contained only 3 predefined colors in it. This file was edited on repository and predefined colors count was increased, but new version of this file did't import when You install a new app version, becouse You already had one.

What about custom colors, we need more information to fix this problem. Could You please send us a backup file with Your settings?

We will fix both this problems and increase colors count presented by default.

pebogufi commented 1 month ago

I think our last posting were overlapping. On one device i got it work, then copied "user_palette_default.txt" to second device. So this problem is solved. I had NO user_palette_default.xml.

What do you think about my recommendation above to use user_palette_default in xml format for geting it transferable/interchangable between different purpose (same color code format with favorit and color code palette).

sonora commented 1 month ago

Perhaps this is somehow related to #20233, in particular to the second post there with my observation about the much reduced color selection for gpx tracks?

nazar-kutz commented 1 month ago

@pebogufi Yes, I accidentally made a mistake. I meant the file "user_palette_default.txt", not "user_palette_default.xml". Regarding the using of xml format, I need to discuss this idea with Product Owner.

nazar-kutz commented 1 month ago

@sonora Yes, it seems like it is the same problem, that I described in the comment above (https://github.com/osmandapp/OsmAnd/issues/20255#issuecomment-2213900470). These 3 colors were predefined in the previous version of the "user_palette_default.txt" file. Now the number of predefined colors has been increased, but the old file is not reloaded by itself if it is already present in the "palette colors" directory. I'm going to fix this problem in a slightly different way.

pebogufi commented 1 month ago

I suppose there is an old place (database) with colors before new file user_palette_default.txt was created. What about if this file does not exist, then create it new and fill it from the old db? So the situation with only 3 colors can be handled by deleting the file.