Change the color of first cell (for example, pick a #5599dd color)
Save the project
reload the page (palette has the color #5599dd in first cell)
Draw a cell
Expected behaviour:
Cell is drawn with color #5599dd
Current behaviour:
Cell is drawn with color #000000
Possible solution:
Now we have:
a paletteGridData prop as a List of objects {color, id}
a currentColor prop as an object {color, position}
I think there are redundant data that causes this kind of bugs when data is not well syncronized. I propose refactor the state to a List of colors and a cell active position. I think that in this case could be enough to represent the state of palette.
I'm working in converting the main reducer in a composition of subreducers that handles the different substates of aplication (palette, drawing tool, active grid, frames, etc) simplifying the relation between state and actions and allowing easier unit tests.
These are the branches where I'm working sequantially after #22 PR:
Steps to reproduce:
#5599dd
color)#5599dd
in first cell)Expected behaviour: Cell is drawn with color
#5599dd
Current behaviour: Cell is drawn with color#000000
Possible solution:
Now we have:
paletteGridData
prop as a List of objects {color, id}currentColor
prop as an object {color, position}I think there are redundant data that causes this kind of bugs when data is not well syncronized. I propose refactor the state to a List of colors and a cell active position. I think that in this case could be enough to represent the state of palette.
I'm working in converting the main reducer in a composition of subreducers that handles the different substates of aplication (palette, drawing tool, active grid, frames, etc) simplifying the relation between state and actions and allowing easier unit tests.
These are the branches where I'm working sequantially after #22 PR:
I could fix this issue after implementing palette reducer. I could be easier to fix.
Cheers!